Architecture
Architecture
#
Bases: Summarizable
diff_node_names(left_arch, right_arch)
staticmethod
#
Compare two architecture objects and return the difference of nodes name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
left_arch |
Architecture
|
Architecture object |
required |
right_arch |
Architecture
|
Architecture object |
required |
Returns:
Type | Description |
---|---|
tuple[tuple[str, ...], tuple[str, ...]]
|
Returns node names that exist only in the respective architectures. |
diff_node_pubs(left_node, right_node)
staticmethod
#
Compare two nodes of architecture objects and return the difference of publish topic names.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
left_node |
NodeStructValue
|
Node in architecture |
required |
right_node |
NodeStructValue
|
Node in architecture |
required |
Returns:
Type | Description |
---|---|
tuple[tuple[str, ...], tuple[str, ...]]
|
Returns publish topic names that exist only in the respective nodes. |
diff_node_subs(left_node, right_node)
staticmethod
#
Compare two nodes of architecture objects and return the difference of subscribe topic names.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
left_node |
NodeStructValue
|
Node in architecture |
required |
right_node |
NodeStructValue
|
Node in architecture |
required |
Returns:
Type | Description |
---|---|
tuple[tuple[str, ...], tuple[str, ...]]
|
Returns subscribe topic names that exist only in the respective nodes. |
diff_topic_names(left_arch, right_arch)
staticmethod
#
Compare two architecture objects and return the difference of pub/sub topic names.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
left_arch |
Architecture
|
Architecture object |
required |
right_arch |
Architecture
|
Architecture object |
required |
Returns:
Type | Description |
---|---|
tuple[tuple[str, ...], tuple[str, ...]]
|
Returns pub/sub topic names that exist only in the respective architectures. |
insert_publisher_callback(node_name, publish_topic_name, callback_name, publisher_construction_order)
#
Insert association of callback with publisher in "node_name" node.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node_name |
str
|
name of target node |
required |
publish_topic_name |
str
|
topic name of target publisher into which callback is inserted |
required |
callback_name |
str
|
name of callback to be inserted for publisher |
required |
publisher_construction_order |
int
|
construction order of target publisher |
required |
insert_variable_passing(node_name, callback_name_write, callback_name_read)
#
Insert variable_passing in "node_name" node.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node_name |
str
|
name of target node |
required |
callback_name_write |
str
|
name of write callback to be inserted in variable_passing |
required |
callback_name_read |
str
|
name of read callback to be inserted in variable_passing |
required |
remove_publisher_callback(node_name, publish_topic_name, callback_name, publisher_construction_order)
#
Remove association of callback with publisher in "node_name" node.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node_name |
str
|
name of target node |
required |
publish_topic_name |
str
|
topic name of target publisher from which callback is removed |
required |
callback_name |
str
|
name of callback to be removed for publisher |
required |
publisher_construction_order |
int
|
construction order of target publisher |
required |
remove_variable_passing(node_name, callback_name_write, callback_name_read)
#
Remove variable_passing in "node_name" node.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node_name |
str
|
name of target node |
required |
callback_name_write |
str
|
name of write callback to be removed from variable_passing |
required |
callback_name_read |
str
|
name of read callback to be removed from variable_passing |
required |
rename_callback(src, dst)
#
Update callback name from "src" to "dst" in architecture.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
src |
str
|
current callback name |
required |
dst |
str
|
updated callback name |
required |
rename_executor(src, dst)
#
Update executor name from "src" to "dst" in architecture.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
src |
str
|
current executor name |
required |
dst |
str
|
updated executor name |
required |
rename_node(src, dst)
#
Update node name from "src" to "dst" in architecture.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
src |
str
|
current node name |
required |
dst |
str
|
updated node name |
required |
rename_path(src, dst)
#
Update path name from "src" to "dst" in architecture.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
src |
str
|
current path name |
required |
dst |
str
|
updated path name |
required |
rename_topic(src, dst)
#
Update topic name from "src" to "dst" in architecture.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
src |
str
|
current topic name |
required |
dst |
str
|
updated topic name |
required |
update_message_context(node_name, context_type, subscribe_topic_name, publish_topic_name)
#
Update message_context of node_path in "node_name" node.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node_name |
str
|
name of target node |
required |
context_type |
str
|
type name of message_context to be added |
required |
subscribe_topic_name |
str
|
name of subscribe topic of target node_path |
required |
publish_topic_name |
str
|
name of publish topic of target node_path |
required |
ArchitectureReader
#
Architecture reader base class.
get_callback_groups(node)
abstractmethod
#
Get callback group values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node |
NodeInfo
|
target node |
required |
Returns:
Type | Description |
---|---|
Sequence[CallbackGroupValue]
|
callback group values |
get_executors()
abstractmethod
#
get_message_contexts(node)
abstractmethod
#
Get message contexts.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node |
NodeValue
|
target node |
required |
Returns:
Type | Description |
---|---|
Sequence[dict]
|
|
get_node_names_and_cb_symbols(callback_group_id)
abstractmethod
#
Get node names and callback symbols from callback group id.
Returns:
Type | Description |
---|---|
Sequence[tuple[str | None, str | None]]
|
node names and callback symbols. tuple structure: (node_name, callback_symbol) |
get_paths()
abstractmethod
#
Get path value.
Returns:
Type | Description |
---|---|
Sequence[PathInfo]
|
path values |
get_publishers(node_info)
abstractmethod
#
Get publishers info.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node_info |
NodeValue
|
target node |
required |
Returns:
Type | Description |
---|---|
Sequence[PublisherValue]
|
publisher values |
get_service_callbacks(node)
abstractmethod
#
Get service callback values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node |
NodeInfo
|
target node |
required |
Returns:
Type | Description |
---|---|
Sequence[ServiceCallbackInfo]
|
service callback values |
get_services(node)
abstractmethod
#
Get service values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node |
NodeInfo
|
target node |
required |
Returns:
Type | Description |
---|---|
Sequence[ServiceValue]
|
service values |
get_subscription_callbacks(node)
abstractmethod
#
Get subscription callback values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node |
NodeInfo
|
target node |
required |
Returns:
Type | Description |
---|---|
Sequence[SubscriptionCallbackInfo]
|
subscription callback values |
get_subscriptions(node)
abstractmethod
#
Get subscription values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node |
NodeInfo
|
target node |
required |
Returns:
Type | Description |
---|---|
Sequence[SubscriptionValue]
|
subscription values |
get_timer_callbacks(node)
abstractmethod
#
Get timer callback values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node |
NodeValue
|
target node |
required |
Returns:
Type | Description |
---|---|
Sequence[TimerCallbackStructInfo]
|
timer callback values |
get_timers(node)
abstractmethod
#
Get timers info.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node |
NodeValue
|
target node |
required |
Returns:
Type | Description |
---|---|
Sequence[TimerValue]
|
timers values |
get_variable_passings(node)
abstractmethod
#
Get variable passing values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node |
NodeInfo
|
target node |
required |
Returns:
Type | Description |
---|---|
Sequence[VariablePassingvalue]
|
variable passing values |