Skip to content

runtime

CARET runtime package.

This package provides a set of classes with static (e.g., node names) and dynamic information (e.g., execution times). It has a ROS-friendly class structure that allows application developers to obtain the information they need for evaluation.

Application #

Bases: Summarizable

A class that represents the entire application to be measured.

callback_group_names: List[str] property #

Get callback group names.

Returns:

Type Description
List[str]

All callback group names defined in the architecture.

callback_groups: List[CallbackGroup] property #

Get callback groups.

Returns:

Type Description
List[CallbackGroup]

All callback groups defined in the architecture.

callback_names: List[str] property #

Get callback names.

Returns:

Type Description
List[str]

All callback names defined in the architecture.

callbacks: List[CallbackBase] property #

Get callbacks.

Returns:

Type Description
List[CallbackBase]

All callbacks defined in the architecture.

communications: List[Communication] property #

Get communications.

Returns:

Type Description
List[Communication]

All communications defined in the architecture.

executor_names: List[str] property #

Get executor names.

Returns:

Type Description
List[str]

All executor names defined in the architecture.

executors: List[Executor] property #

Get executors.

Returns:

Type Description
List[Executor]

All executors defined in the architecture.

node_names: List[str] property #

Get node names.

Returns:

Type Description
List[str]

All node names defined in the architecture.

node_paths: List[NodePathStructValue] property #

Get paths.

Returns:

Type Description
List[NodePathStructValue]

app node paths defined in the entire application.

nodes: List[Node] property #

Get nodes.

Returns:

Type Description
List[Node]

All nodes defined in the architecture.

path_names: List[str] property #

Get path names.

Returns:

Type Description
List[str]

App path names defined in the architecture.

paths: List[Path] property #

Get paths.

Returns:

Type Description
List[Path]

All paths defined in the architecture.

publishers: List[Publisher] property #

Get publishers.

Returns:

Type Description
List[Publisher]

All publishers defined in the architecture.

subscriptions: List[Subscription] property #

Get subscriptions.

Returns:

Type Description
List[Subscription]

All subscriptions defined in the architecture.

summary: Summary property #

Get summary [override].

Returns:

Type Description
Summary

Summary info.

topic_names: List[str] property #

Get topic names.

Returns:

Type Description
List[str]

All topic names defined in architecture.

__init__(architecture, infra) #

Construct an instance.

Parameters:

Name Type Description Default
architecture Architecture

Application architecture to be evaluated.

required
infra InfraBase

Measurement results.

required

Raises:

Type Description
UnsupportedTypeError

Occurs when the invalid infra is given.

get_callback(callback_name) #

Get a callback that matches the condition.

Parameters:

Name Type Description Default
callback_name str

callback name to get.

required

Returns:

Type Description
CallbackBase

callback that matches the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

ItemNotFoundError

Occurs when no items were found.

MultipleItemFoundError

Occurs when several items were found.

get_callback_group(callback_group_name) #

Get a callback group that matches the condition.

Parameters:

Name Type Description Default
callback_group_name str

callback group name to get.

required

Returns:

Type Description
CallbackBase

callback group that matches the condition.

Raises:

Type Description
InvalidArgumentError

Given argument type is invalid.

ItemNotFoundError

Failed to find an item that matches the condition.

MultipleItemFoundError

Failed to identify an item that matches the condition.

get_callbacks(*callback_names) #

Get callbacks that match the condition.

Parameters:

Name Type Description Default
callback_names Tuple[str, ...]

callback names to get.

()

Returns:

Type Description
List[CallbackBase]

callbacks that match the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

ItemNotFoundError

Occurs when no items were found.

MultipleItemFoundError

Occurs when several items were found.

get_communication(publisher_node_name, subscription_node_name, topic_name) #

Get communication that matches the condition.

Parameters:

Name Type Description Default
publisher_node_name str

node name that publishes the topic.

required
subscription_node_name str

node name that subscribes to the topic.

required
topic_name str

topic name.

required

Returns:

Type Description
Communication

communication that matches the condition.

Raises:

Type Description
InvalidArgumentError

Given argument type is invalid.

ItemNotFoundError

Failed to find an item that matches the condition.

MultipleItemFoundError

Failed to identify an item that matches the condition.

get_communications(topic_name) #

Get communication that matches the condition.

Parameters:

Name Type Description Default
topic_name str

topic name to get.

required

Returns:

Type Description
List[Communication]

communications that match the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

ItemNotFoundError

Failed to find an item that matches the condition.

get_executor(executor_name) #

Get an executor that matches the condition.

Parameters:

Name Type Description Default
executor_name str

executor name to get. The name is defined in the architecture file (ex: executor_0).

required

Returns:

Type Description
Executor

executor that matches the condition.

Raises:

Type Description
InvalidArgumentError

Given argument type is invalid.

ItemNotFoundError

Failed to find an item that matches the condition.

MultipleItemFoundError

Failed to identify an item that matches the condition.

get_node(node_name) #

Get a node that matches the condition.

Parameters:

Name Type Description Default
node_name str

node name to get.

required

Returns:

Type Description
Node

A node that matches the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

ItemNotFoundError

Occurs when no items were found.

MultipleItemFoundError

Occurs when several items were found.

get_node_path(node_name, subscribe_topic_name, publish_topic_name) #

Get a node path that matches the condition.

Parameters:

Name Type Description Default
node_name str

node name to get.

required
subscribe_topic_name Optional[str]

topic name which the node subscribes.

required
publish_topic_name Optional[str]

topic name which the node publishes.

required

Returns:

Type Description
NodePathStructValue

node path that matches the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

ItemNotFoundError

Occurs when no items were found.

MultipleItemFoundError

Occurs when several items were found.

get_node_paths(node_name) #

Get node paths.

Parameters:

Name Type Description Default
node_name str

node name to get.

required

Returns:

Type Description
List[NodePathStructValue]

node paths that match the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

get_path(path_name) #

Get a path that matches the condition.

Parameters:

Name Type Description Default
path_name str

path name to get. paths and their names are defined in the architecture.

required

Returns:

Type Description
Path

A path that matches the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

ItemNotFoundError

Occurs when no items were found.

MultipleItemFoundError

Occurs when several items were found.

get_publishers(topic_name) #

Get publishers that match the condition.

Parameters:

Name Type Description Default
topic_name str

topic name to get.

required

Returns:

Type Description
List[Publisher]

publishers that match the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

ItemNotFoundError

Failed to find an item that matches the condition.

get_subscriptions(topic_name) #

Get subscriptions that match the condition.

Parameters:

Name Type Description Default
topic_name str

topic name to get.

required

Returns:

Type Description
List[Publisher]

subscriptions that match the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

ItemNotFoundError

Failed to find an item that matches the condition.

CallbackBase #

Bases: PathBase, Summarizable

A base class that represents callback.

callback_name: str property #

Get callback name defined in the architecture.

Returns:

Type Description
str

callback name defined in architecture.

callback_type: CallbackType property #

Get callback type.

Returns:

Type Description
CallbackType

callback type.

node_name: str property #

Get node name.

Returns:

Type Description
str

node name containing this callback.

publish_topic_names: Optional[List[str]] property #

Get publisher topic names.

Returns:

Type Description
Optional[List[str]]

topic name list to be published by the callback.

publishers: Optional[List[Publisher]] property #

Get publishers.

Returns:

Type Description
Optional[List[Publisher]]

publishers to which the callback publishes.

subscribe_topic_name: Optional[str] property #

Get subscription topic name.

Returns:

Type Description
Optional[str]

topic name to be subscribed by the callback. None except for subscription callback.

subscription: Optional[Subscription] property #

Get subscription.

Returns:

Type Description
Optional[Subscription]

subscription which the callback is attached. None except for subscription callback.

summary: Summary property #

Get summary [override].

Returns:

Type Description
Summary

summary info.

symbol: str property #

Get callback symbol name.

Returns:

Type Description
str

callback function symbol name.

timer: Optional[Timer] property #

Get timer.

Returns:

Type Description
Optional[Timer]

timer which the callback is attached. None except for timer callback.

value: CallbackStructValue property #

Get StructValue object.

Returns:

Type Description
CallbackStructValue

callback group value.

Notes#

This property is for CARET debugging purposes.

__init__(info, records_provider, subscription, publishers, timer) #

Construct an instance.

Parameters:

Name Type Description Default
info CallbackStructValue

static info.

required
records_provider RecordsProvider

provider to be evaluated.

required
subscription Optional[Subscription]

None except for subscription callbacks.

required
publishers Optional[List[Publisher]]

publishers to which the callback publishes.

required
timer Optional[Timer]

None except for timer callbacks.

required

CallbackGroup #

Bases: Summarizable

A class that represents the callback group.

callback_group_name: str property #

Get callback group name.

Returns:

Type Description
str

callback group name defined in the architecture.

callback_group_type: CallbackGroupType property #

Get callback_group_type.

Returns:

Name Type Description
CallbackGroupType CallbackGroupType

REENTRANT / MUTUALLY_EXCLUSIVE

callback_group_type_name: str property #

Get callback_group_type name.

Returns:

Type Description
CallbackGroupType name

'reentrant' / 'mutually_exclusive'

callbacks: List[CallbackBase] property #

Get callbacks.

Returns:

Type Description
List[CallbackBase]

callbacks which are contained in this callback group.

node_name: str property #

Get node name.

Returns:

Type Description
str

node name which is contained this callback group.

summary: Summary property #

Get summary [override].

Returns:

Type Description
Summary

summary info.

value: CallbackGroupStructValue property #

Get StructValue object.

Returns:

Type Description
CallbackGroupStructValue

callback group value.

Notes#

This property is for CARET debugging purposes.

__init__(callback_group_info, callbacks) #

Construct an instance.

Parameters:

Name Type Description Default
callback_group_info CallbackGroupStructValue

static information.

required
callbacks List[CallbackBase]

callbacks to be added to the callback group.

required

get_callback(callback_name) #

Get a callback that matches the condition.

Parameters:

Name Type Description Default
callback_name str

callback name to get.

required

Returns:

Type Description
CallbackBase

callback that matches the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

ItemNotFoundError

Occurs when no items were found.

MultipleItemFoundError

Occurs when several items were found.

get_callbacks(*callback_names) #

Get callbacks that match the condition.

Returns:

Type Description
List[CallbackBase]

callbacks that match the condition.

Communication #

Bases: PathBase, Summarizable

Class that represents topic communication.

callback_publish: Optional[List[CallbackBase]] property #

Get publisher callback.

Returns:

Type Description
Optional[List[CallbackBase]]

callback which publishes this communication.

callback_subscription: Optional[CallbackBase] property #

Get subscribe callback.

Returns:

Type Description
Optional[CallbackBase]

callback to which subscribe this communication.

is_intra_proc_comm: Optional[bool] property #

Get whether this communication is intra-process-communication.

Returns:

Type Description
Optional[bool]

True when intra-process-communication. otherwise False.

publish_node: Node property #

Get publish node.

Returns:

Type Description
Node

A node that publishes this communication.

publish_node_name: str property #

Get publish node name.

Returns:

Type Description
str

node name which publishes this communication.

publisher: Publisher property #

Get publisher.

Returns:

Type Description
Publisher

publisher to publish this communication.

rmw_implementation: Optional[str] property #

Get rmw implementation.

Returns:

Type Description
Optional[str]

rmw implementation.

subscribe_node: Node property #

Get subscribe node.

Returns:

Type Description
Node

node to which subscribes this communication.

subscribe_node_name: str property #

Get subscribe node name.

Returns:

Type Description
str

node name which subscribes to this communication.

subscription: Subscription property #

Get subscription.

Returns:

Type Description
Subscription

subscription to subscribe to this communication.

summary: Summary property #

Get summary [override].

Returns:

Type Description
Summary

summary info.

topic_name: str property #

Get a topic name.

Returns:

Type Description
str

topic name of this communication.

value: CommunicationStructValue property #

Get StructValue object.

Returns:

Type Description
CommunicationStructValue

communication value.

Notes#

This property is for CARET debugging purposes.

__init__(node_publish, node_subscription, publisher, subscription, communication_value, records_provider, callbacks_publish, callback_subscription) #

Construct an instance.

Parameters:

Name Type Description Default
node_publish Node

publish node.

required
node_subscription Node

subscribe node

required
publisher Publisher

publisher

required
subscription Subscription

subscription

required
communication_value CommunicationStructValue

static info.

required
records_provider Union[RecordsProvider, RuntimeDataProvider, None]

provider to be evaluated.

required
callbacks_publish Optional[List[CallbackBase]]

callbacks publish

required
callback_subscription Optional[CallbackBase]

callback subscription

required

verify() #

Verify whether latency can be generated.

Returns:

Type Description
bool

True if valid. Otherwise False.

Executor #

Bases: Summarizable

Class that represents executor.

callback_group_names: List[str] property #

Get callback group names.

Returns:

Type Description
List[str]

Callback group names added to the executor.

callback_groups: List[CallbackGroup] property #

Get callback groups.

Returns:

Type Description
List[CallbackGroup]

Callback groups added to the executor.

callback_names: List[str] property #

Get callback names.

Returns:

Type Description
List[str]

callback names added to the executor.

callbacks: List[CallbackBase] property #

Get callbacks.

Returns:

Type Description
List[CallbackBase]

Callbacks added to the executor.

executor_name: str property #

Get executor name.

Returns:

Type Description
str

executor name defined in the architecture.

executor_type: ExecutorType property #

Get executor type.

Returns:

Type Description
ExecutorType

executor type.

summary: Summary property #

Get summary [override].

Returns:

Type Description
Summary

summary info.

value: ExecutorStructValue property #

Get StructValue object.

Returns:

Type Description
ExecutorStructValue

executor value.

Notes#

This property is for CARET debugging purposes.

__init__(executor_value, callback_groups) #

Construct an instance.

Parameters:

Name Type Description Default
executor_value ExecutorStructValue

Static info.

required
callback_groups List[CallbackGroup]

Callback groups added to the executor.

required

get_callback(callback_name) #

Get callback.

Parameters:

Name Type Description Default
callback_name str

callback name to get.

required

Returns:

Type Description
CallbackBase

callback that matches the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

ItemNotFoundError

Occurs when no items were found.

MultipleItemFoundError

Occurs when several items were found.

get_callback_group(callback_group_name) #

Get callback group.

Parameters:

Name Type Description Default
callback_group_name str

callback group name to get.

required

Returns:

Type Description
CallbackGroup

Callback group that matches the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

ItemNotFoundError

Occurs when no items were found.

MultipleItemFoundError

Occurs when several items were found.

get_callbacks(*callback_names) #

Get callbacks.

Returns:

Type Description
List[CallbackBase]

callbacks that match the condition.

Node #

Bases: Summarizable

A class that represents a node.

callback_group_names: Optional[List[str]] property #

Get callback group names.

Returns:

Type Description
Optional[List[str]]

callback group names that the node contains.

callback_groups: Optional[List[CallbackGroup]] property #

Get callback groups.

Returns:

Type Description
Optional[List[CallbackGroup]]

callback groups that the node contains.

callback_names: Optional[List[str]] property #

Get callback names.

Returns:

Type Description
Optional[List[str]]

callback names that the node contains.

callbacks: Optional[List[CallbackBase]] property #

Get callbacks.

Returns:

Type Description
Optional[List[CallbackBase]]

callbacks that the node contains.

node_name: str property #

Get node name.

Returns:

Type Description
str

node name.

paths: List[NodePath] property #

Get node paths.

Node paths are defined by subscription and publisher pair.

Returns:

Type Description
List[NodePath]

node paths that the node contains.

publish_topic_names: List[str] property #

Get topic names the node publishes.

Returns:

Type Description
List[str]

topic names that the node publishes to.

publishers: List[Publisher] property #

Get publishers.

Returns:

Type Description
List[Publisher]

publishers used by the node.

subscribe_topic_names: List[str] property #

Get subscribe topic names.

Returns:

Type Description
List[str]

topic names to which the node subscribes.

subscriptions: List[Subscription] property #

Get subscriptions the node subscribes.

Returns:

Type Description
List[Subscription]

subscriptions that the node subscribes to.

summary: Summary property #

Get summary [override].

Returns:

Type Description
Summary

summary info.

timers: List[Timer] property #

Get timers.

Returns:

Type Description
List[Timer]

timers that the node contains.

value: NodeStructValue property #

Get StructValue object.

Returns:

Type Description
NodeStructValue

node value.

Notes#

This property is for CARET debugging purposes.

variable_passings: Optional[List[VariablePassing]] property #

Get variable passings.

Returns:

Type Description
Optional[List[VariablePassing]]

Variable passings that the node contains.

__init__(node, publishers, subscription, timers, node_paths, callback_groups, variable_passings) #

Construct an instance.

Parameters:

Name Type Description Default
node NodeStructValue

static info

required
publishers List[Publisher]

publishers in the node.

required
subscription List[Subscription]

subscriptions in the node.

required
timers List[Timer]

timers in the node.

required
node_paths List[NodePath]

node paths in the node.

required
callback_groups Optional[List[CallbackGroup]]

callback groups in the node.

required
variable_passings Optional[List[VariablePassing]]

variable passings in the node.

required

get_callback(callback_name) #

Get callback.

Parameters:

Name Type Description Default
callback_name str

callback name to get.

required

Returns:

Type Description
CallbackBase

callback that matches the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

ItemNotFoundError

Occurs when no items were found.

MultipleItemFoundError

Occurs when several items were found.

get_callback_group(callback_group_name) #

Get callback group.

Parameters:

Name Type Description Default
callback_group_name str

callback group name to get.

required

Returns:

Type Description
CallbackGroup

callback group that matches the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

ItemNotFoundError

Occurs when no items were found.

MultipleItemFoundError

Occurs when several items were found.

get_callbacks(*callback_names) #

Get callbacks.

Parameters:

Name Type Description Default
callback_names str

callback names to get.

()

Returns:

Type Description
List[CallbackBase]

callbacks that match the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

ItemNotFoundError

Occurs when no items were found.

get_path(subscribe_topic_name, publish_topic_name) #

Get node path.

Parameters:

Name Type Description Default
subscribe_topic_name Optional[str]

topic name to which the node subscribes.

required
publish_topic_name Optional[str]

topic name to which the node publishes.

required

Returns:

Type Description
NodePath

node path that matches the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

ItemNotFoundError

Occurs when no items were found.

MultipleItemFoundError

Occurs when several items were found.

get_publisher(topic_name) #

Get publisher.

Parameters:

Name Type Description Default
topic_name str

publisher topic name to get.

required

Returns:

Type Description
Publisher

A publisher that matches the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

ItemNotFoundError

Occurs when no items were found.

MultipleItemFoundError

Occurs when several items were found.

get_subscription(topic_name) #

Get subscription.

Parameters:

Name Type Description Default
topic_name str

topic name to get.

required

Returns:

Type Description
Subscription

Subscription instance that matches the condition.

Raises:

Type Description
InvalidArgumentError

Occurs when the given argument type is invalid.

ItemNotFoundError

Occurs when no items were found.

MultipleItemFoundError

Occurs when several items were found.

NodePath #

Bases: PathBase, Summarizable

A class that represents a path inside a node.

Node path is defined as subscription-publisher pair. subscribe-publish policies are defined as "message context"

callbacks: Optional[List[CallbackBase]] property #

Get callbacks.

Returns:

Type Description
Optional[List[CallbackBase]]

Callbacks in node path. None except for message context is callback chain.

message_context: Optional[MessageContext] property #

Get message context.

Returns:

Type Description
Optional[MessageContext]

message context for this node path.

node_name: str property #

Get node name.

Returns:

Type Description
str

Node name which contains this node path.

publish_topic_name: Optional[str] property #

Get a topic name to publish.

Returns:

Type Description
Optional[str]

topic name to publish.

publisher: Optional[Publisher] property #

Get publisher.

Returns:

Type Description
Optional[Publisher]

node path publisher.

subscribe_topic_name: Optional[str] property #

Get a topic name to subscribe to.

Returns:

Type Description
Optional[str]

topic name to subscribe to.

subscription: Optional[Subscription] property #

Get a subscription.

Returns:

Type Description
Optional[Subscription]

subscription to subscribe to.

summary: Summary property #

Get summary [override].

Returns:

Type Description
Summary

summary info.

value: NodePathStructValue property #

Get StructValue object.

Returns:

Type Description
NodePathStructValue

node path value.

Notes#

This property is for CARET debugging purposes.

__init__(node_path_value, records_provider, subscription, publisher, callbacks) #

Construct an instance.

Parameters:

Name Type Description Default
node_path_value NodePathStructValue

static info.

required
records_provider RecordsProvider

provider to be evaluated.

required
subscription Optional[Subscription]

node path subscription

required
publisher Optional[Publisher]

node path publisher

required
callbacks Optional[List[CallbackBase]]

Callbacks in node path. Needed only if message context is CallbackChain.

required

Path #

Bases: PathBase, Summarizable

A class that represents a path.

A single path is composed of node paths and communications.

callback_chain: Optional[List[CallbackBase]] property #

Get callback chain.

Returns:

Type Description
Optional[List[CallbackBase]]

callbacks that compose the path. return None except for all of the node paths are callback chains.

callbacks: List[CallbackBase] property #

Get callbacks.

Returns:

Type Description
List[CallbackBase]

callbacks in all nodes that comprise the node path.

child: List[Union[NodePath, Communication]] property #

Get path children.

Returns:

Type Description
List[Union[NodePath, Communication]]

node paths and communications in the target path. node paths and communications are alternately contained.

child_names: List[str] property #

Get path children's names.

Returns:

Type Description
List[str]

node names and topic names in the target path.

communications: List[Communication] property #

Get communications.

Returns:

Type Description
List[Communication]

Communications in target path.

node_names: List[str] property #

Get node names.

Returns:

Type Description
List[str]

node names in the target path.

node_paths: List[NodePath] property #

Get node-paths.

Returns:

Type Description
List[NodePath]

node paths in target path.

path_name: Optional[str] property #

Get path name.

Returns:

Type Description
Optional[str]

Path name defined in the architecture.

summary: Summary property #

Get summary [override].

Returns:

Type Description
Summary

summary info.

topic_names: List[str] property #

Get topic names.

Returns:

Type Description
List[str]

topic names in the target path.

value: PathStructValue property #

Get StructValue object.

Returns:

Type Description
PathStructValue

path value.

Notes#

This property is for CARET debugging purposes.

__init__(path, child, callbacks) #

Construct an instance.

Parameters:

Name Type Description Default
path PathStructValue

static info

required
child List[Union[NodePath, Communication]]

path children's which compose path (node paths and communications).

required
callbacks Optional[List[CallbackBase]]

callbacks that compose the path. return None except for all of node paths are not callback-chain.

required

clear_cache() #

Clear to_records/to_dataframe cache.

verify() #

Verify whether the path can generate latencies.

Returns:

Type Description
bool

True if both architecture and measurement results are valid, otherwise false.

PathBase #

Base class for Latency.

column_names: List[str] property #

Get column names.

Returns:

Type Description
List[str]

column names

to_dataframe(remove_dropped=False, treat_drop_as_delay=False, lstrip_s=0, rstrip_s=0, *, shaper=None) #

Calculate dataframe.

Parameters:

Name Type Description Default
remove_dropped

If true, eliminate the records that caused the drop.

False
treat_drop_as_delay

Convert dropped records as a delay. Valid only when remove_dropped=false.

False
lstrip_s float

Remove from beginning. [s]

0
rstrip_s float

Remove from end [s]

0
shaper Optional[DataFrameShaper]

shaper

None

Returns:

Type Description
pandas.DataFrame

Execution time of each operation.

to_histogram(binsize_ns=1000000, treat_drop_as_delay=False, lstrip_s=0, rstrip_s=0, *, shaper=None) #

Calculate histogram data.

Parameters:

Name Type Description Default
binsize_ns int

bin size for histogram. default 1ms.

1000000
treat_drop_as_delay bool

Convert dropped records as a delay.

False
lstrip_s float

Remove from beginning. [s]

0
rstrip_s float

Remove from end [s]

0
shaper Optional[DataFrameShaper]

shaper

None

Returns:

Type Description
Tuple[np.ndarray, np.ndarray]

frequency, latency[ns]

len(frequency)+1 == len(latency)

See Also#
https://numpy.org/doc/stable/reference/generated/numpy.histogram.html

to_records() #

Calculate records.

Returns:

Type Description
RecordsInterface

Execution time of each operation.

to_timeseries(remove_dropped=False, treat_drop_as_delay=False, lstrip_s=0, rstrip_s=0, *, shaper=None) #

Calculate timeseries data.

Parameters:

Name Type Description Default
remove_dropped Optional[bool]

If true, eliminate the records that caused the drop. default: False.

False
treat_drop_as_delay Optional[bool]

Convert dropped records as a delay. Valid only when remove_dropped=false. default: False.

False
lstrip_s float

Remove from beginning. [s] default: 0

0
rstrip_s float

Remove from end [s] default: 0

0
shaper Optional[DataFrameShaper]

shaper

None

Returns:

Type Description
Tuple[np.ndarray, np.ndarray]

time[ns], latency[ns] len(time) == len(latency)

Publisher #

Bases: PathBase, Summarizable

Class that represents publisher.

callback_names: Optional[List[str]] property #

Get callback names.

Returns:

Type Description
Optional[List[str]]

Callback names which uses the publisher to publish.

node_name: str property #

Get node name.

Returns:

Type Description
str

node name which contains the publisher.

qos: Optional[Qos] property #

Get QoS.

Returns:

Type Description
Optional[Qos]

Publisher QoS

summary: Summary property #

Get summary [override].

Returns:

Type Description
Summary

summary info.

topic_name: str property #

Get a topic name.

Returns:

Type Description
str

A topic name that the publisher publishes.

value: PublisherStructValue property #

Get StructValue object.

Returns:

Type Description
PublisherStructValue

publisher value.

Notes#

This property is for CARET debugging purposes.

__init__(publisher, provider) #

Construct an instance.

Parameters:

Name Type Description Default
publisher PublisherStructValue

static info.

required
provider Union[RecordsProvider, RuntimeDataProvider]

provider to be evaluated.

required

Subscription #

Bases: PathBase, Summarizable

A class that represents subscription.

callback_name: Optional[str] property #

Get a subscription callback name.

Returns:

Type Description
Optional[str]

callback name to which the subscription is attached.

node_name: str property #

Get node name.

Returns:

Type Description
str

node name to which the subscription subscribes.

qos: Optional[Qos] property #

Get QoS.

Returns:

Type Description
Optional[Qos]

Subscription QoS.

summary: Summary property #

Get summary [override].

Returns:

Type Description
Summary

summary info.

topic_name: str property #

Get a topic name.

Returns:

Type Description
str

A topic name to which the subscription subscribes.

value: SubscriptionStructValue property #

Get StructValue object.

Returns:

Type Description
SubscriptionStructValue

subscription value.

Notes#

This property is for CARET debugging purposes.

__init__(val, data_provider) #

Construct an instance.

Parameters:

Name Type Description Default
val SubscriptionStructValue

static info.

required
data_provider Union[RecordsProvider, RuntimeDataProvider]

provider to be evaluated.

required

SubscriptionCallback #

Bases: CallbackBase

A class that represents subscription callback.

__init__(callback_info, records_provider, subscription, publishers=None) #

Construct an instance.

Parameters:

Name Type Description Default
callback_info SubscriptionCallbackStructValue

static info.

required
records_provider RecordsProvider

provider to be evaluated.

required
subscription Subscription

subscription to which callback subscribes.

required
publishers Optional[List[Publisher]]

publishers to which the callback publishers

None

Timer #

Bases: PathBase, Summarizable

A class that represents timer.

callback_name: Optional[str] property #

Get callback name.

Returns:

Type Description
Optional[str]

callback name defined in the architecture.

node_name: str property #

Get node name.

Returns:

Type Description
str

node name which defines the timer.

period_ns: int property #

Get timer period.

Returns:

Type Description
int

timer period [ns].

summary: Summary property #

Get summary [override].

Returns:

Type Description
Summary

summary info.

value: TimerStructValue property #

Get StructValue object.

Returns:

Type Description
TimerStructValue

timer value.

Notes#

This property is for CARET debugging purposes.

__init__(val, data_provider) #

Construct an instance.

Parameters:

Name Type Description Default
val TimerStructValue

static info.

required
data_provider Union[RecordsProvider, RuntimeDataProvider]

provider to be evaluated.

required

TimerCallback #

Bases: CallbackBase

Class that represents timer callback.

period_ns: int property #

Get timer period.

Returns:

Type Description
int

timer period [ns].

__init__(callback, records_provider, publishers, timer) #

Construct an instance.

Parameters:

Name Type Description Default
callback TimerCallbackStructValue

static info.

required
records_provider RecordsProvider

provider to be evaluated.

required
publishers Optional[List[Publisher]]

publishers to which the callback publishers

required
timer Timer

timer

required

VariablePassing #

Bases: PathBase, Summarizable

callback_name_read property #

Get read side callback name.

Returns:

Type Description
[str]

read-side callback name.

callback_name_write: str property #

Get write side callback name.

Returns:

Type Description
[str]

write-side callback name.

node_name: str property #

Get node name.

Returns:

Type Description
str

node name which has the variable passing.

summary: Summary property #

Get summary [override].

Returns:

Type Description
Summary

summary info.

value: VariablePassingStructValue property #

Get StructValue object.

Returns:

Type Description
VariablePassingStructValue

variable passing value.

Notes#

This property is for CARET debugging purposes.

__init__(variable_passing, records_provider) #

Construct an instance.

Parameters:

Name Type Description Default
variable_passing VariablePassingStructValue

static info.

required
records_provider RecordsProvider

provider to be evaluated.

required