caret_analyze.value_objects.callback module

class caret_analyze.value_objects.callback.CallbackStructValue(node_name: str, symbol: str, subscribe_topic_name: str | None, service_name: str | None, publish_topics: tuple[PublishTopicInfoValue, ...] | None, construction_order: int, callback_name: str)

Bases: Summarizable

Callback value base class.

property callback_name: str

Get callback name.

Returns

str

Callback name.

abstract property callback_type: CallbackType

Get callback type name.

Returns

CallbackType

Callback type.

property callback_type_name: str

Get callback type name.

Returns

str

Callback type name.

property construction_order: int

Get construction order.

Returns

int

Construction order.

property node_name: str

Get node name.

Returns

str

Node name.

property publish_topics: tuple[PublishTopicInfoValue, ...] | None

Get publisher topic info.

Returns

tuple[PublishTopicInfoValue, …] | None

publish topics

property service_name: str | None

Get service name.

Returns

str | None

Service name.

property subscribe_topic_name: str | None

Get subscribe topic name.

Returns

str | None

Subscribe topic name.

abstract property summary: Summary

Get summary.

Returns

Summary

Summary about value objects and runtime data objects.

property symbol: str

Get callback symbol name.

Returns

str

Callback symbol name.

class caret_analyze.value_objects.callback.CallbackType(name: str)

Bases: ValueObject

callback group type class.

SERVICE: CallbackType = <caret_analyze.value_objects.callback.CallbackType object>
SUBSCRIPTION: CallbackType = <caret_analyze.value_objects.callback.CallbackType object>
TIMER: CallbackType = <caret_analyze.value_objects.callback.CallbackType object>
property type_name: str

Return callback type name.

Returns

str

Type name.

class caret_analyze.value_objects.callback.CallbackValue(callback_id: str, node_name: str, node_id: str, symbol: str, subscribe_topic_name: str | None, service_name: str | None, publish_topics: tuple[PublishTopicInfoValue, ...] | None, construction_order: int, *, callback_name: str | None = None)

Bases: ValueObject

Value object class for representing a callback.

This class has minimal information and no structure. It’s used as the return value of ArchitectureReader.

property callback_id: str

Get callback id.

Callback id is is used to bind. Callback id should be the same if the node name and other properties are the same. If any properties is different, it should be a different callback id.

Returns

str

Callback unique id.

property callback_name: str | None

Get callback name.

Returns

str

Callback name.

Note:

Different architecture_readers may return different values.

abstract property callback_type: CallbackType

Get callback type name.

Returns

CallbackType

Callback type.

property construction_order: int

Get construction order.

Returns

int

Construction order.

property node_id: str

Get node id.

Returns

str

Node id.

property node_name: str

Get node name.

Returns

str

Node name.

property publish_topics: tuple[PublishTopicInfoValue, ...] | None

Get publisher topic info.

Returns

tuple[PublishTopicInfoValue, …]] | None

publish topics

Note:

Since callback publishes multiple topics, there are multiple publish topic names & construction_order.

property service_name: str | None

Get service name.

Returns

str

Service name.

property subscribe_topic_name: str | None

Get subscription topic name.

Returns

str | None

Topic name which the callback subscribes.

Note:

Only one subscription callback have a single subscribe topic name.

property symbol: str

Get callback symbol name.

Returns

str

Callback symbol name.

class caret_analyze.value_objects.callback.ServiceCallbackStructValue(node_name: str, symbol: str, service_name: str, publish_topics: tuple[PublishTopicInfoValue, ...] | None, construction_order: int, callback_name: str)

Bases: CallbackStructValue, ValueObject

Structured service callback value.

property callback_type: CallbackType

Get callback type name.

Returns

CallbackType

Callback type.

property summary: Summary

Get summary.

Returns

Summary

Summary about value objects and runtime data objects.

class caret_analyze.value_objects.callback.ServiceCallbackValue(callback_id: str, node_name: str, node_id: str, symbol: str, service_name: str, publish_topics: tuple[PublishTopicInfoValue, ...] | None, construction_order: int, *, callback_name: str | None = None)

Bases: CallbackValue

Value object class for representing a service.

property callback_type: CallbackType

Get callback type name.

Returns

CallbackType

Callback type.

property service_name: str

Get service name.

Returns

str

Service name.

class caret_analyze.value_objects.callback.SubscriptionCallbackStructValue(node_name: str, symbol: str, subscribe_topic_name: str, publish_topics: tuple[PublishTopicInfoValue, ...] | None, construction_order: int, callback_name: str)

Bases: CallbackStructValue, ValueObject

Structured subscription callback value.

property callback_type: CallbackType

Get callback type name.

Returns

CallbackType

Callback type.

property subscribe_topic_name: str

Get subscription topic name.

Returns

str

Topic name which the callback subscribes.

property summary: Summary

Get summary.

Returns

Summary

Summary about value objects and runtime data objects.

class caret_analyze.value_objects.callback.SubscriptionCallbackValue(callback_id: str, node_name: str, node_id: str, symbol: str, subscribe_topic_name: str, publish_topics: tuple[PublishTopicInfoValue, ...] | None, construction_order: int, *, callback_name: str | None = None)

Bases: CallbackValue

Subscription callback value.

property callback_type: CallbackType

Get callback type name.

Returns

CallbackType

Callback type.

property subscribe_topic_name: str

Get subscription topic name.

Returns

str

Topic name which the callback subscribes.

class caret_analyze.value_objects.callback.TimerCallbackStructValue(node_name: str, symbol: str, period_ns: int, publish_topics: tuple[PublishTopicInfoValue, ...] | None, construction_order: int, callback_name: str)

Bases: CallbackStructValue, ValueObject

Structured timer callback value.

property callback_type: CallbackType

Get callback type name.

Returns

CallbackType

Callback type.

property period_ns: int

Get period.

Returns

int

Period of the timer.

property summary: Summary

Get summary.

Returns

Summary

Summary about value objects and runtime data objects.

class caret_analyze.value_objects.callback.TimerCallbackValue(callback_id: str, node_name: str, node_id: str, symbol: str, period_ns: int, publish_topics: tuple[PublishTopicInfoValue, ...] | None, construction_order: int, *, callback_name: str | None = None)

Bases: CallbackValue

Value object class for representing a timer.

This class has minimal information and no structure, and used as the return value of ArchitectureReader.

property callback_type: CallbackType

Get callback type name.

Returns

CallbackType

Callback type.

property period_ns: int

Get period.

Returns

int

Period of the timer.