25 #ifndef RDMNET_COMMON_H_
26 #define RDMNET_COMMON_H_
28 #include "etcpal/error.h"
29 #include "etcpal/inet.h"
30 #include "etcpal/log.h"
31 #include "rdm/message.h"
32 #include "rdmnet/defs.h"
240 #define RDMNET_SYNC_SEND_RDM_ACK(response_ptr, response_data_len_in) \
243 (response_ptr)->response_action = kRdmnetRdmResponseActionSendAck; \
244 (response_ptr)->response_data.response_data_len = (response_data_len_in); \
252 #define RDMNET_SYNC_SEND_RDM_NACK(response_ptr, nack_reason_in) \
255 (response_ptr)->response_action = kRdmnetRdmResponseActionSendNack; \
256 (response_ptr)->response_data.nack_reason = (nack_reason_in); \
264 #define RDMNET_SYNC_DEFER_RDM_RESPONSE(response_ptr) ((response_ptr)->response_action = kRdmnetRdmResponseActionDefer)
318 #define RDMNET_SYNC_SEND_EPT_DATA(response_ptr, response_data_len_in) \
321 (response_ptr)->response_action = kRdmnetEptResponseActionSendData; \
322 (response_ptr)->response_data.response_data_len = (response_data_len_in); \
330 #define RDMNET_SYNC_SEND_EPT_STATUS(response_ptr, status_code_in) \
333 (response_ptr)->response_action = kRdmnetEptResponseActionSendStatus; \
334 (response_ptr)->response_data.status_code = (status_code_in); \
341 #define RDMNET_SYNC_DEFER_EPT_RESPONSE(response_ptr) ((response_ptr)->response_action = kRdmnetEptResponseActionDefer)
rdmnet_ept_response_action_t
Enumeration representing an action to take after an "EPT data received" callback completes.
Definition: common.h:270
const char * rdmnet_rpt_status_code_to_string(rpt_status_code_t code)
Get a string representation of an RPT status code.
Definition: common.c:231
const char * rdmnet_ept_status_code_to_string(ept_status_code_t code)
Get a string representation of an EPT status code.
Definition: common.c:250
ept_status_code_t
EPT status code definitions.
Definition: common.h:76
const char * rdmnet_dynamic_uid_status_to_string(rdmnet_dynamic_uid_status_t code)
Get a string description of an RDMnet Dynamic UID status code.
Definition: common.c:392
struct RdmnetNetintConfig RdmnetNetintConfig
Network interface configuration information to give the RDMnet library at initialization.
rdmnet_disconnect_reason_t
Disconnect reason defines for the BrokerDisconnectMsg.
Definition: common.h:85
rdmnet_command_class_t
An RDM command class, for RDMnet purposes.
Definition: common.h:350
rdmnet_connect_fail_event_t
A high-level reason for RDMnet connection failure.
Definition: common.h:149
struct RdmnetSyncEptResponse RdmnetSyncEptResponse
This structure should not be manipulated directly - use the macros to access it:
rdmnet_disconnect_event_t
A high-level reason for RDMnet connection to be disconnected after successful connection.
Definition: common.h:174
const char * rdmnet_connect_fail_event_to_string(rdmnet_connect_fail_event_t event)
Get a string description of an RDMnet connection failure event.
Definition: common.c:276
const char * rdmnet_disconnect_event_to_string(rdmnet_disconnect_event_t event)
Get a string description of an RDMnet disconnect event.
Definition: common.c:304
struct RdmnetSyncRdmResponse RdmnetSyncRdmResponse
This structure should not be manipulated directly - use the macros to access it:
rpt_status_code_t
RPT status code definitions.
Definition: common.h:53
void rdmnet_deinit(void)
Deinitialize the RDMnet library.
Definition: common.c:201
struct RdmnetMcastNetintId RdmnetMcastNetintId
A set of identifying information for a network interface, for multicast purposes.
rdmnet_rdm_response_action_t
Enumeration representing an action to take after an "RDM command received" callback completes.
Definition: common.h:194
const char * rdmnet_disconnect_reason_to_string(rdmnet_disconnect_reason_t code)
Get a string description of an RDMnet disconnect reason code.
Definition: common.c:364
etcpal_error_t rdmnet_init(const EtcPalLogParams *log_params, const RdmnetNetintConfig *netint_config)
Initialize the RDMnet library.
Definition: common.c:149
rdmnet_connect_status_t
Connect status defines for the BrokerConnectReplyMsg.
Definition: common.h:117
const char * rdmnet_connect_status_to_string(rdmnet_connect_status_t code)
Get a string description of an RDMnet connect status code.
Definition: common.c:333
rdmnet_dynamic_uid_status_t
Dynamic UID Status Codes for the BrokerDynamicUidMapping struct.
Definition: common.h:134
@ kRdmnetEptResponseActionSendStatus
Send an EPT status message to the originating EPT client.
Definition: common.h:274
@ kRdmnetEptResponseActionSendData
Send an EPT data message to the originating EPT client.
Definition: common.h:272
@ kRdmnetEptResponseActionDefer
Do nothing; either the application will send the response later or no response is required.
Definition: common.h:279
@ kEptStatusUnknownCid
The destination CID in the EPT PDU could not be found.
Definition: common.h:78
@ kEptStatusUnknownVector
An EPT PDU was received with an unsupported Vector.
Definition: common.h:80
@ kRdmnetDisconnectSoftwareFault
The component must disconnect due to a software fault.
Definition: common.h:93
@ kRdmnetDisconnectUserReconfigure
The component was reconfigured via some other means, and the new configuration requires connection te...
Definition: common.h:112
@ kRdmnetDisconnectHardwareFault
The component must disconnect due to an internal hardware fault.
Definition: common.h:91
@ kRdmnetDisconnectShutdown
The remote component is shutting down.
Definition: common.h:87
@ kRdmnetDisconnectRptReconfigure
The component was reconfigured using RPT, and the new configuration requires connection termination.
Definition: common.h:102
@ kRdmnetDisconnectIncorrectScope
Sent by brokers that are not on the desired Scope.
Definition: common.h:97
@ kRdmnetDisconnectLlrpReconfigure
The component was reconfigured using LLRP, and the new configuration requires connection termination.
Definition: common.h:107
@ kRdmnetDisconnectSoftwareReset
The component must terminated because of a software reset.
Definition: common.h:95
@ kRdmnetDisconnectCapacityExhausted
The remote component no longer has the ability to support this connection.
Definition: common.h:89
@ kRdmnetCCSetCommand
An RDMnet RDM SET command.
Definition: common.h:354
@ kRdmnetCCGetCommand
An RDMnet RDM GET command.
Definition: common.h:352
@ kRdmnetConnectFailRejected
The remote broker rejected the connection at the RDMnet protocol level.
Definition: common.h:169
@ kRdmnetConnectFailNoReply
The TCP connection was established, but no reply was received from the RDMnet protocol handshake.
Definition: common.h:164
@ kRdmnetConnectFailSocketFailure
The connection was unable to be started because of an error returned from the system during a lower-l...
Definition: common.h:154
@ kRdmnetConnectFailTcpLevel
The connection started but the TCP connection was never established.
Definition: common.h:159
@ kRdmnetDisconnectNoHeartbeat
The TCP connection was deemed unhealthy due to no heartbeat message being received before the heartbe...
Definition: common.h:181
@ kRdmnetDisconnectRedirected
The client was redirected to another broker address.
Definition: common.h:183
@ kRdmnetDisconnectAbruptClose
The TCP connection was closed without an RDMnet disconnect message being sent.
Definition: common.h:176
@ kRdmnetDisconnectGracefulRemoteInitiated
The remote component sent an RDMnet disconnect message with a reason code.
Definition: common.h:185
@ kRdmnetDisconnectGracefulLocalInitiated
A disconnect was requested locally.
Definition: common.h:187
@ kRptStatusRdmTimeout
No RDM response was received from a Gateway's RDM responder.
Definition: common.h:57
@ kRptStatusUnknownEndpoint
The Destination Endpoint ID in the RPT PDU could not be found.
Definition: common.h:63
@ kRptStatusUnknownVector
An RPT PDU was received with an unsupported Vector.
Definition: common.h:67
@ kRptStatusInvalidMessage
The inner PDU contained by the RPT PDU was malformed.
Definition: common.h:69
@ kRptStatusInvalidRdmResponse
An invalid RDM response was received from a Gateway's RDM responder.
Definition: common.h:59
@ kRptStatusInvalidCommandClass
The Command Class of an encapsulated RDM Command was invalid.
Definition: common.h:71
@ kRptStatusBroadcastComplete
A Broadcasted RPT Request was sent to at least one Device.
Definition: common.h:65
@ kRptStatusUnknownRdmUid
The Destination UID in an encapsulated RDM Command could not be found.
Definition: common.h:61
@ kRptStatusUnknownRptUid
The Destination UID in the RPT PDU could not be found.
Definition: common.h:55
@ kRdmnetRdmResponseActionSendNack
Send an RDM NACK with reason to the originating controller.
Definition: common.h:198
@ kRdmnetRdmResponseActionDefer
Do nothing; the application will send the response later.
Definition: common.h:200
@ kRdmnetRdmResponseActionSendAck
Send an RDM ACK to the originating controller.
Definition: common.h:196
@ kRdmnetConnectInvalidClientEntry
The client's Client Entry is invalid.
Definition: common.h:127
@ kRdmnetConnectDuplicateUid
The client's static UID matches another connected client's static UID.
Definition: common.h:125
@ kRdmnetConnectOk
Connection completed successfully.
Definition: common.h:119
@ kRdmnetConnectInvalidUid
The UID sent in the Client Entry PDU is malformed.
Definition: common.h:129
@ kRdmnetConnectScopeMismatch
The client's scope does not match the broker's scope.
Definition: common.h:121
@ kRdmnetConnectCapacityExceeded
The broker has no further capacity for new clients.
Definition: common.h:123
@ kRdmnetDynamicUidStatusOk
The Dynamic UID Mapping was fetched or assigned successfully.
Definition: common.h:136
@ kRdmnetDynamicUidStatusUidNotFound
The requested Dynamic UID was not found in the broker's Dynamic UID mapping table.
Definition: common.h:140
@ kRdmnetDynamicUidStatusCapacityExhausted
The broker has exhausted its capacity to generate Dynamic UIDs.
Definition: common.h:144
@ kRdmnetDynamicUidStatusDuplicateRid
This RID has already been assigned a Dynamic UID by this broker.
Definition: common.h:142
@ kRdmnetDynamicUidStatusInvalidRequest
The corresponding request contained a malformed UID value.
Definition: common.h:138
A set of identifying information for a network interface, for multicast purposes.
Definition: common.h:364
etcpal_iptype_t ip_type
The IP protocol used on the network interface.
Definition: common.h:366
unsigned int index
The index of the network interface.
Definition: common.h:368
Network interface configuration information to give the RDMnet library at initialization.
Definition: common.h:376
size_t num_netints
Size of netints array.
Definition: common.h:380
const RdmnetMcastNetintId * netints
An array of network interface IDs to which to restrict RDMnet traffic.
Definition: common.h:378
This structure should not be manipulated directly - use the macros to access it:
Definition: common.h:293
union RdmnetSyncEptResponse::@1 response_data
Data associated with certain response actions (use the macros to access).
rdmnet_ept_response_action_t response_action
Represents the response action to take.
Definition: common.h:295
ept_status_code_t status_code
The EPT status code.
Definition: common.h:306
size_t response_data_len
The length of the response data which has been copied into the buffer given at initialization time.
Definition: common.h:304
This structure should not be manipulated directly - use the macros to access it:
Definition: common.h:214
union RdmnetSyncRdmResponse::@0 response_data
Data associated with certain response actions (use the macros to access).
size_t response_data_len
The length of the response data which has been copied into the buffer given at initialization time.
Definition: common.h:225
rdm_nack_reason_t nack_reason
The NACK reason code.
Definition: common.h:227
rdmnet_rdm_response_action_t response_action
Represents the response action to take.
Definition: common.h:216