ros2_control - galactic
Loading...
Searching...
No Matches
ZenbeddedClient< StateCodec, CommandCodec > Class Template Reference
Inheritance diagram for ZenbeddedClient< StateCodec, CommandCodec >:
Collaboration diagram for ZenbeddedClient< StateCodec, CommandCodec >:

Public Types

using StateInitParams = typename StateCodec::InitParams
using CommandInitParams = typename CommandCodec::InitParams
using StateValue = typename StateCodec::Value
using CommandValue = typename CommandCodec::Value

Public Member Functions

int init (uint32_t control_freq, const StateInitParams &state_params={}, const CommandInitParams &cmd_params={}, const char *locator=ZENBEDDED_DEFAULT_LOCATOR)
int init (uint32_t control_freq, const char *locator)
void write_state (const StateValue &value)
bool read_command (CommandValue &out)
Public Member Functions inherited from ZenbeddedClientBase
void destroy ()
 Deinitialize the client and underlying transport.
int zenoh_publish_state ()
 Publish current state buffer over Zenoh transport.
int start_thread (uint32_t control_freq)
 Start the control publish thread.
void stop_thread ()
 Stop the control publish thread.
bool is_initialized () const
 Check if client is initialized.
bool is_control_thread_running ()
 Check if publish thread is running.
uint32_t accepted_command_count () const
 Monotonic count of command payloads accepted from the transport.

Additional Inherited Members

Protected Member Functions inherited from ZenbeddedClientBase
int init_base (uint32_t control_freq, size_t state_payload_size, size_t cmd_payload_size, const char *locator=ZENBEDDED_DEFAULT_LOCATOR)
 Initializes base buffers, transport layer, and background thread.
uint8_t * get_state_buffer_slot (size_t slot_idx)
 Direct slot access for state codec template initialization.
uint8_t * prepare_state_write_slot (int &out_write_idx)
 Acquire inactive state buffer index for thread-safe writing.
void commit_state_write_slot (int write_idx)
 Commit atomic state buffer write and flip active index.
bool read_latest_command_raw (uint8_t *data, size_t size)
 Read raw latest command bytes from double buffer.
void reset_buffers ()
 Reset atomic buffer states and versions.
Protected Attributes inherited from ZenbeddedClientBase
bool initialized_ = false
size_t state_payload_size_ = 0
size_t cmd_payload_size_ = 0

The documentation for this class was generated from the following file: