ros2agnocast_discovery_agent.agent module
Per-IPC-namespace discovery agent.
Reads the local Agnocast state via the existing NS-scoped ioctl wrapper
(libagnocast_ioctl_wrapper.so) and publishes it as AgnocastDaemonState on
/_agnocast_discovery so other namespaces and ECUs running ros2agnocast
tooling can observe and make bridge generation decisions.
One daemon process is intended to run per IPC namespace. Lifecycle is the user’s responsibility (systemd unit, ros2 launch include, container entrypoint, etc.).
- class ros2agnocast_discovery_agent.agent.DiscoveryAgent(*args: Any, **kwargs: Any)
Bases:
Noderclpy Node that publishes the local Agnocast state every PUBLISH_INTERVAL_SEC.
Also subscribes to its own gossip topic so the bridge decider can observe remote namespace state; the callback records the latest snapshot keyed by
(host_uuid, ipc_ns_inode).- build_state() ros2agnocast_discovery_msgs.msg.AgnocastDaemonState
- publish_snapshot() None
Build and publish the current local AgnocastDaemonState.
- property remote_states: dict
Map of
(host_uuid, ipc_ns_inode)to(msg, received_at_sec).
- class ros2agnocast_discovery_agent.agent.TopicInfoRet
Bases:
StructureMirror of
struct topic_info_retin agnocast_ioctl.hpp.- is_bridge
Structure/Union member
- node_name
Structure/Union member
- qos_depth
Structure/Union member
- qos_is_reliable
Structure/Union member
- qos_is_transient_local
Structure/Union member
- ros2agnocast_discovery_agent.agent.main(argv=None) int
- ros2agnocast_discovery_agent.agent.read_local_topics(lib) list
Snapshot the current namespace’s Agnocast topics via the ioctl wrapper.
Returns a list of AgnocastTopic msgs. The ioctl returns only the caller’s IPC namespace, so the daemon process just being inside that namespace is sufficient to scope the result.