![]() |
SolarCapture C Bindings User Guide
SF-115721-CD
Issue 1
|
Export packets or messages to a shared memory channel with multiple consumers.
This node is used in conjunction with sc_shm_import to pass packets one or more consumer processes. Packets delivered to sc_shm_broadcast are forwarded over the channel to one or more sc_shm_import nodes in consumer processes.
See also sc_shm_export, which is more suitable when there is only a single consumer, or a reliable channel is needed.
Argument | Optional? | Default | Type | Description |
---|---|---|---|---|
path | No | SC_PARAM_STR | Prefix of a path in the filesystem used for creating a socket and shared memory files. | |
max_channels | Yes | 1 | SC_PARAM_INT | The maximum number of consumers that can connect to this channel. |
max_in_flight | Yes | "100%" | SC_PARAM_STR | Maximum total amount of buffering that can be in flight at any one time. Specified as a percentage of the incoming pool ('' suffix), or in bytes ('B', 'KiB', 'MiB' or 'GiB' suffix). |
max_in_flight_per_channel | Yes | "100%" | SC_PARAM_STR | Maximum amount of buffering that can be in flight per consumer. Specified as a percentage of the incoming pool ('' suffix), or in bytes ('B', 'KiB' or 'GiB' suffix). max_in_flight_per_channel cannot exceed max_in_flight. |
in_flight_reserved_per_channel | Yes | 50% / max_channels | SC_PARAM_STR | Proportion of buffering that is dedicated to each channel. The remainder is shared and can be used by any channel. This can be specified as a percentage of max_in_flight (with a '' suffix), or in bytes (with 'B', 'KiB', 'MiB' or 'GiB' suffix). max_channels * in_flight_reserved cannot exceed max_in_flight. |
min_connected_reliable_channels | Yes | 0 | SC_PARAM_INT | Packets reaching this node are buffered until at least this many reliable channels are connected. |
send_retry_ns | Yes | 10000 | SC_PARAM_INT | Period for retrying sending packets if ring is full. |
drop_notification_retry_ns | Yes | 10000000 | SC_PARAM_INT | Period for retrying drop notifications if ring is full. |
exit_on_disconnect | Yes | 0 | SC_PARAM_INT | Exit as soon as a client disconnects. This can only be set if max_channels is set to 1. |
reliable_mode | Yes | 0 | SC_PARAM_INT | If this is set, all connections are treated as reliable. |
None
Link | Description |
---|---|
"" | sc_packet objects received over the shared memory interface. |
Statistics exposed by the sc_shm_broadcast and sc_shm_import nodes.
Name | Type | Data Type | Description |
---|---|---|---|
pkts_dropped | uint64_t | pkt_count | The number of packets dropped by the node. |
wake_msgs | uint64_t | ev_count | The number of wake messages. |
sleep_notifies | uint64_t | ev_count | The number of sleep notifications. |
pkts_in_flight | uint64_t | pkt_count | The number of packets in flight. |
reliable_pkts_in_flight | uint64_t | pkt_count | The number of packets in flight in reliable mode. |