caret_analyze.value_objects.node module
- class caret_analyze.value_objects.node.DiffNode(left_node: NodeStructValue, right_node: NodeStructValue)
Bases:
object
- class caret_analyze.value_objects.node.NodeStructValue(node_name: str, publishers: tuple[PublisherStructValue, ...], subscriptions_info: tuple[SubscriptionStructValue, ...], services_info: tuple[ServiceStructValue, ...], timers: tuple[TimerStructValue, ...], node_paths: tuple[NodePathStructValue, ...], callback_groups: tuple[CallbackGroupStructValue, ...] | None, variable_passings: tuple[VariablePassingStructValue, ...] | None)
Bases:
ValueObject
,Summarizable
StructValue object class for representing a node.
This class is a structure that includes other related StructValue classes, such as callbacks, and used as the return value of Architecture object.
- property callback_group_names: tuple[str, ...] | None
Get callback group names.
Returns
- tuple[str, …] | None
Callback group names that the node contains.
- property callback_groups: tuple[CallbackGroupStructValue, ...] | None
Get callback groups.
Returns
- tuple[CallbackGroupStructValue, …] | None
Callback groups that the node contains.
- property callback_names: tuple[str, ...] | None
Get callback names.
Returns
- tuple[str, …] | None
Callback names that the node contains.
- property callbacks: tuple[CallbackStructValue, ...] | None
Get callbacks.
Returns
- tuple[CallbackStructValue, …] | None
Callbacks that the node contains.
- get_path(subscribe_topic_name: str | None, subscription_construction_order: int | None, publish_topic_name: str | None, publisher_construction_order: int | None) NodePathStructValue
Get node path.
Parameters
- subscribe_topic_namestr | None
Topic name to which the node subscribes.
- subscription_construction_orderint | None
Construction order to which the node subscribes.
- publish_topic_namestr | None
Topic name to which the node publishes.
- publisher_construction_orderint | None
Construction order to which the node publishes.
Returns
- NodePathStructValue
Node path that matches the condition.
Raises
- ItemNotFoundError
Occurs when no items were found.
- MultipleItemFoundError
Occurs when several items were found.
- get_publisher(publish_topic_name: str, construction_order: int | None) PublisherStructValue
Get publisher.
Parameters
- publish_topic_namestr
Publisher topic name to get.
- construction_orderint | None
Construction order to get.
Returns
- PublisherStructValue
A publisher that matches the condition.
Raises
- ItemNotFoundError
Occurs when no items were found.
- get_service(service_name: str, construction_order: int | None) ServiceStructValue
Get service.
Parameters
- service_namestr
Service name to get.
- construction_orderint | None
Construction order to get.
Returns
- ServiceStructValue
Service instance that matches the condition.
Raises
- ItemNotFoundError
Occurs when no items were found.
- get_subscription(subscribe_topic_name: str, construction_order: int | None) SubscriptionStructValue
Get subscription.
Parameters
- subscribe_topic_namestr
Topic name to get.
- construction_orderint | None
Construction order to get.
Returns
- SubscriptionStructValue
Subscription instance that matches the condition.
Raises
- ItemNotFoundError
Occurs when no items were found.
- get_timer(timer_period: int, construction_order: int | None) TimerStructValue
Get timer.
Parameters
- timer_period: int
Timer period to get.
- construction_orderint | None
Construction order to get.
Returns
- TimerStructValue
A timer that matches the condition.
Raises
- ItemNotFoundError
Occurs when no items were found.
- property paths: tuple[NodePathStructValue, ...]
Get node paths.
Node paths are defined by subscription and publisher pair.
Returns
- tuple[NodePathStructValue, …]
Node paths that the node contains.
- property publish_topic_names: tuple[str, ...]
Get topic names to publish.
Returns
- tuple[str, …]
Topic names to publish.
- property publishers: tuple[PublisherStructValue, ...]
Get publishers.
Returns
- tuple[PublisherStructValue, …]
Node path publishers.
- property service_names: tuple[str, ...]
Get service names.
Returns
- tuple[str, …]
Service names that the node contains.
- property services: tuple[ServiceStructValue, ...]
Get services.
Returns
- tuple[ServiceStructValue, …]
Services that the node contains.
- property subscribe_topic_names: tuple[str, ...]
Get topic names to subscribe to.
Returns
- tuple[str, …]
Topic names to subscribe to.
- property subscriptions: tuple[SubscriptionStructValue, ...]
Get subscriptions.
Returns
- tuple[SubscriptionStructValue, …]
Subscriptions to subscribe to.
- property summary: Summary
Get summary.
Returns
- Summary
Summary about value objects and runtime data objects.
- property timers: tuple[TimerStructValue, ...]
Get timers.
Returns
- tuple[TimerStructValue, …]
Timers that the node contains.
- property variable_passings: tuple[VariablePassingStructValue, ...] | None
Get variable passings.
Returns
- tuple[VariablePassingStructValue, …] | None
Variable passings in all child elements that the node contains.
- class caret_analyze.value_objects.node.NodeValue(node_name: str, node_id: str | None)
Bases:
ValueObject
Value object class for representing a node.
This class has minimal information and no structure, and used as the return value of ArchitectureReader.