Class ParameterTransport

Inheritance Relationships

Derived Type

Class Documentation

class ParameterTransport

Subclassed by ros2_medkit_gateway::ros2::Ros2ParameterTransport

Public Functions

ParameterTransport() = default
ParameterTransport(const ParameterTransport&) = delete
ParameterTransport &operator=(const ParameterTransport&) = delete
ParameterTransport(ParameterTransport&&) = delete
ParameterTransport &operator=(ParameterTransport&&) = delete
virtual ~ParameterTransport() = default
virtual bool is_self_node(const std::string &node_name) const = 0

True iff node_name resolves to the gateway’s own node (self-parameter lookup short-circuit). Manager uses this to avoid IPC for own params.

virtual ParameterResult list_parameters(const std::string &node_name) = 0

List all parameters with descriptors for node_name.

virtual ParameterResult get_parameter(const std::string &node_name, const std::string &param_name) = 0

Get one parameter with descriptor.

virtual ParameterResult set_parameter(const std::string &node_name, const std::string &param_name, const json &value) = 0

Set one parameter; result.data echoes the committed descriptor.

virtual ParameterResult list_own_parameters() = 0

Self-node variants. Read-fast path that does not go via IPC.

virtual ParameterResult get_own_parameter(const std::string &param_name) = 0
virtual ParameterResult get_default(const std::string &node_name, const std::string &param_name) = 0

Look up the cached default (initial) value for a single parameter. On success, result.data is the JSON value of the default. The transport owns the defaults cache; manager-level reset operations compose this with set_parameter to perform the actual reset.

Error codes follow the same contract as the rest of the surface:

  • NO_DEFAULTS_CACHED: nothing cached for node_name yet

  • NOT_FOUND: the node has cached defaults but not for param_name

  • SERVICE_UNAVAILABLE / TIMEOUT / SHUT_DOWN: as per IPC reachability

virtual ParameterResult list_defaults(const std::string &node_name) = 0

List all cached default (initial) values for a node. On success, result.data is a JSON array of {"name", "value", "type"} entries. Used by reset_all_parameters to drive a chain of set_parameter calls.

virtual bool is_node_available(const std::string &node_name) const = 0

Service availability check (same semantics as today’s negative cache).

virtual void invalidate(const std::string &node_name) = 0

Drop client/cached state for a given node (called by the manager when reset / refresh is requested).

virtual void shutdown() = 0

Tear down all cached clients before rclcpp::shutdown(). Idempotent.