chrono::ros::ipc::IPCChannel Class Reference
Description
Bidirectional IPC channel using shared memory ring buffers.
#include <ChROSIPCChannel.h>
Public Member Functions | |
| ~IPCChannel () | |
| Destructor. | |
| bool | SendMessage (const Message &message) |
| Send a message through the channel. More... | |
| bool | ReceiveMessage (Message &message) |
| Receive a message from the channel (non-blocking) More... | |
| bool | IsReady () const |
| Check if channel is ready for communication. | |
| const std::string & | GetName () const |
| Get the channel name. | |
Static Public Member Functions | |
| static std::unique_ptr< IPCChannel > | CreateMainChannel (const std::string &channel_name, size_t buffer_size=512 *1024 *1024) |
| Create IPC channel for the main process (creates shared memory) More... | |
| static std::unique_ptr< IPCChannel > | ConnectToChannel (const std::string &channel_name) |
| Connect to existing IPC channel from subprocess (opens existing shared memory) More... | |
Member Function Documentation
◆ ConnectToChannel()
|
static |
Connect to existing IPC channel from subprocess (opens existing shared memory)
- Parameters
-
channel_name Name of the IPC channel to connect to
◆ CreateMainChannel()
|
static |
Create IPC channel for the main process (creates shared memory)
- Parameters
-
channel_name Unique name for this IPC channel buffer_size Size of each ring buffer in bytes (default: 512MB for high-bandwidth sensor data) Note: Total shared memory is 2x this size (bidirectional buffers) 512MB allows ~145 full 1280x720 RGBA8 images or ~15 4K images per direction
◆ ReceiveMessage()
| bool chrono::ros::ipc::IPCChannel::ReceiveMessage | ( | Message & | message | ) |
Receive a message from the channel (non-blocking)
- Parameters
-
message Output message buffer
- Returns
- true if message received, false if no message available
◆ SendMessage()
| bool chrono::ros::ipc::IPCChannel::SendMessage | ( | const Message & | message | ) |
Send a message through the channel.
- Parameters
-
message Message to send
- Returns
- true if successful, false if channel is full
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_ros/ipc/ChROSIPCChannel.h
- /builds/uwsbel/chrono/src/chrono_ros/ipc/ChROSIPCChannel.cpp