25 #ifndef RDMNET_CLIENT_H_
26 #define RDMNET_CLIENT_H_
30 #include "etcpal/inet.h"
31 #include "etcpal/uuid.h"
43 #define RDMNET_CLIENT_SCOPE_INVALID -1
106 #define RDMNET_ADDR_TO_DEFAULT_RESPONDER(manu_id, dev_id) \
108 {(manu_id), (dev_id)}, E133_NULL_ENDPOINT, {(manu_id), (dev_id)}, 0 \
117 #define RDMNET_ADDR_TO_DEFAULT_RESPONDER_SUBDEV(manu_id, dev_id, subdevice) \
119 {(manu_id), (dev_id)}, E133_NULL_ENDPOINT, {(manu_id), (dev_id)}, (subdevice) \
130 #define RDMNET_ADDR_TO_SUB_RESPONDER(rdmnet_manu, rdmnet_dev, endpoint, rdm_manu, rdm_dev) \
132 {(rdmnet_manu), (rdmnet_dev)}, (endpoint), {(rdm_manu), (rdm_dev)}, 0 \
144 #define RDMNET_ADDR_TO_SUB_RESPONDER_SUBDEV(rdmnet_manu, rdmnet_dev, endpoint, rdm_manu, rdm_dev, subdevice) \
146 {(rdmnet_manu), (rdmnet_dev)}, (endpoint), {(rdm_manu), (rdm_dev)}, (subdevice) \
247 #define RDMNET_SCOPE_CONFIG_DEFAULT_INIT \
249 E133_DEFAULT_SCOPE, { 0, ETCPAL_IP_INVALID_INIT } \
262 #define RDMNET_CLIENT_SET_SCOPE(configptr, scope_str) \
265 (configptr)->scope = scope_str; \
266 ETCPAL_IP_SET_INVALID(&(configptr)->static_broker_addr.ip); \
277 #define RDMNET_CLIENT_SET_DEFAULT_SCOPE(configptr) \
280 (configptr)->scope = E133_DEFAULT_SCOPE; \
281 ETCPAL_IP_SET_INVALID(&(configptr)->static_broker_addr.ip); \
295 #define RDMNET_CLIENT_SET_STATIC_SCOPE(configptr, scope_str, broker_addr) \
298 (configptr)->scope = (scope_str); \
299 (configptr)->static_broker_addr = (broker_addr); \
312 #define RDMNET_CLIENT_SET_STATIC_DEFAULT_SCOPE(configptr, broker_addr) \
315 (configptr)->scope = E133_DEFAULT_SCOPE; \
316 (configptr)->static_broker_addr = (broker_addr); \
Functions and definitions common to all RDMnet API modules.
struct RdmnetClientConnectFailedInfo RdmnetClientConnectFailedInfo
Information provided by the library about an unsuccessful RDMnet client connection.
struct RdmnetScopeConfig RdmnetScopeConfig
A set of configuration information for a single scope in which an RDMnet client is participating.
rdmnet_disconnect_reason_t
Disconnect reason defines for the BrokerDisconnectMsg.
Definition: common.h:85
client_list_action_t
How to apply the client entries to the existing client list in a client_list_update_received callback...
Definition: client.h:50
rdmnet_connect_fail_event_t
A high-level reason for RDMnet connection failure.
Definition: common.h:149
struct RdmnetClientConnectedInfo RdmnetClientConnectedInfo
Information provided by the library about a successful RDMnet client connection.
rdmnet_disconnect_event_t
A high-level reason for RDMnet connection to be disconnected after successful connection.
Definition: common.h:174
int rdmnet_client_scope_t
A handle to a scope that an RDMnet client participates in.
Definition: client.h:41
struct RdmnetDestinationAddr RdmnetDestinationAddr
A destination address for an RDM command in RDMnet's RPT protocol.
struct RdmnetClientDisconnectedInfo RdmnetClientDisconnectedInfo
Information provided by the library about an RDMnet client connection that disconnected after a succe...
struct RdmnetSourceAddr RdmnetSourceAddr
The source address for an unsolicited RDM response generated by a local component.
rdmnet_connect_status_t
Connect status defines for the BrokerConnectReplyMsg.
Definition: common.h:117
@ kRdmnetClientListAppend
The client entries should be appended to the existing client list.
Definition: client.h:52
@ kRdmnetClientListRemove
The client entries should be removed from the existing client list.
Definition: client.h:54
@ kRdmnetClientListUpdate
The client entries should be updated in the existing client list.
Definition: client.h:56
@ kRdmnetClientListReplace
The existing client list should be replaced wholesale with this one.
Definition: client.h:58
Information provided by the library about an unsuccessful RDMnet client connection.
Definition: client.h:164
rdmnet_connect_status_t rdmnet_reason
The reason given in the RDMnet-level connection refuse message.
Definition: client.h:176
bool will_retry
Whether the connection will be retried automatically.
Definition: client.h:188
rdmnet_connect_fail_event_t event
The high-level reason that this connection failed.
Definition: client.h:166
etcpal_error_t socket_err
The system error code associated with the failure.
Definition: client.h:171
Information provided by the library about a successful RDMnet client connection.
Definition: client.h:151
const char * broker_name
The DNS name of the broker, if it was discovered using DNS-SD; otherwise an empty string.
Definition: client.h:155
EtcPalSockAddr broker_addr
The IP address and port of the remote broker to which we have connected.
Definition: client.h:153
RdmUid broker_uid
The RDM UID of the connected broker.
Definition: client.h:159
EtcPalUuid broker_cid
The CID of the connected broker.
Definition: client.h:157
Information provided by the library about an RDMnet client connection that disconnected after a succe...
Definition: client.h:196
etcpal_error_t socket_err
The system error code associated with the disconnect.
Definition: client.h:203
rdmnet_disconnect_event_t event
The high-level reason for the disconnect.
Definition: client.h:198
rdmnet_disconnect_reason_t rdmnet_reason
The reason given in the RDMnet-level disconnect message.
Definition: client.h:208
bool will_retry
Whether the connection will be retried automatically.
Definition: client.h:216
A destination address for an RDM command in RDMnet's RPT protocol.
Definition: client.h:84
RdmUid rdm_uid
The UID of the RDM responder to which this message is addressed.
Definition: client.h:96
uint16_t subdevice
The sub-device to which this command is addressed, or 0 for the root device.
Definition: client.h:98
RdmUid rdmnet_uid
The UID of the RDMnet component to which this command is addressed.
Definition: client.h:86
uint16_t endpoint
The endpoint on the RDMnet component to which this message is addressed.
Definition: client.h:91
A set of configuration information for a single scope in which an RDMnet client is participating.
Definition: client.h:224
EtcPalSockAddr static_broker_addr
The broker address to which to connect, if a static broker has been configured.
Definition: client.h:235
const char * scope
The scope string.
Definition: client.h:229
The source address for an unsolicited RDM response generated by a local component.
Definition: client.h:66
uint16_t source_endpoint
The endpoint from which this response is being sent.
Definition: client.h:68
RdmUid rdm_source_uid
The UID of the RDM responder from which this response is being sent.
Definition: client.h:70
uint16_t subdevice
The sub-device from which this response is being sent, or 0 for the root device.
Definition: client.h:72