25 #ifndef RDMNET_EPT_CLIENT_H_
26 #define RDMNET_EPT_CLIENT_H_
28 #include "etcpal/uuid.h"
55 #define RDMNET_EPT_CLIENT_INVALID -1
188 #define RDMNET_EPT_CLIENT_CONFIG_DEFAULT_INIT \
190 {{0}}, {NULL, NULL, NULL, NULL, NULL, NULL, NULL}, NULL, 0, NULL, NULL \
230 uint16_t manufacturer_id,
231 uint16_t protocol_id,
238 const char* status_string);
API definitions used by RDMnet clients (controllers and devices)
Functions and definitions common to all RDMnet API modules.
ept_status_code_t
EPT status code definitions.
Definition: common.h:76
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
int rdmnet_client_scope_t
A handle to a scope that an RDMnet client participates in.
Definition: client.h:41
etcpal_error_t rdmnet_ept_client_request_client_list(rdmnet_ept_client_t client_handle, rdmnet_client_scope_t scope_handle)
Request a client list from a broker.
Definition: ept_client.c:273
void rdmnet_ept_client_config_init(RdmnetEptClientConfig *config)
Initialize an RdmnetEptClientConfig with default values for the optional config options.
Definition: ept_client.c:39
void(* RdmnetEptClientDisconnectedCallback)(rdmnet_ept_client_t client_handle, rdmnet_client_scope_t scope_handle, const RdmnetClientDisconnectedInfo *info, void *context)
An EPT client which was previously connected to a broker has disconnected.
Definition: ept_client.h:88
etcpal_error_t rdmnet_ept_client_create(const RdmnetEptClientConfig *config, rdmnet_ept_client_t *handle)
Create a new instance of RDMnet EPT client functionality.
Definition: ept_client.c:96
struct RdmnetEptClientConfig RdmnetEptClientConfig
A set of information that defines the startup parameters of an EPT client.
void(* RdmnetEptClientDataReceivedCallback)(rdmnet_ept_client_t client_handle, rdmnet_client_scope_t scope_handle, const RdmnetEptData *data, RdmnetSyncEptResponse *response, void *context)
EPT data has been received addressed to an EPT client.
Definition: ept_client.h:116
void(* RdmnetEptClientConnectedCallback)(rdmnet_ept_client_t client_handle, rdmnet_client_scope_t scope_handle, const RdmnetClientConnectedInfo *info, void *context)
An EPT client has successfully connected to a broker.
Definition: ept_client.h:64
etcpal_error_t rdmnet_ept_client_remove_scope(rdmnet_ept_client_t client_handle, rdmnet_client_scope_t scope_handle, rdmnet_disconnect_reason_t disconnect_reason)
Remove a previously-added scope from an EPT client instance.
Definition: ept_client.c:191
etcpal_error_t rdmnet_ept_client_change_scope(rdmnet_ept_client_t client_handle, rdmnet_client_scope_t scope_handle, const RdmnetScopeConfig *new_scope_config, rdmnet_disconnect_reason_t disconnect_reason)
Change the configuration of a scope on an EPT client.
Definition: ept_client.c:218
etcpal_error_t rdmnet_ept_client_destroy(rdmnet_ept_client_t client_handle, rdmnet_disconnect_reason_t disconnect_reason)
Destroy an EPT client instance.
Definition: ept_client.c:117
etcpal_error_t rdmnet_ept_client_send_data(rdmnet_ept_client_t client_handle, rdmnet_client_scope_t scope_handle, const EtcPalUuid *dest_cid, uint16_t manufacturer_id, uint16_t protocol_id, const uint8_t *data, size_t data_len)
Send data from an EPT client on a scope.
Definition: ept_client.c:298
void(* RdmnetEptClientStatusReceivedCallback)(rdmnet_ept_client_t client_handle, rdmnet_client_scope_t scope_handle, const RdmnetEptStatus *status, void *context)
An EPT status message has been received in response to a previously-sent EPT data message.
Definition: ept_client.h:129
void(* RdmnetEptClientClientListUpdateReceivedCallback)(rdmnet_ept_client_t client_handle, rdmnet_client_scope_t scope_handle, client_list_action_t list_action, const RdmnetEptClientList *client_list, void *context)
A client list update has been received from a broker.
Definition: ept_client.h:102
struct RdmnetEptClientCallbacks RdmnetEptClientCallbacks
A set of notification callbacks received about an EPT client.
etcpal_error_t rdmnet_ept_client_add_scope(rdmnet_ept_client_t client_handle, const RdmnetScopeConfig *scope_config, rdmnet_client_scope_t *scope_handle)
Add a new scope to an EPT client instance.
Definition: ept_client.c:142
void rdmnet_ept_client_set_callbacks(RdmnetEptClientConfig *config, RdmnetEptClientConnectedCallback connected, RdmnetEptClientConnectFailedCallback connect_failed, RdmnetEptClientDisconnectedCallback disconnected, RdmnetEptClientClientListUpdateReceivedCallback client_list_update_received, RdmnetEptClientDataReceivedCallback data_received, RdmnetEptClientStatusReceivedCallback status_received, void *context)
Set the callbacks in an RDMnet EPT client configuration structure.
Definition: ept_client.c:61
etcpal_error_t rdmnet_ept_client_send_status(rdmnet_ept_client_t client_handle, rdmnet_client_scope_t scope_handle, const EtcPalUuid *dest_cid, ept_status_code_t status_code, const char *status_string)
Send a status message from an EPT client on a scope.
Definition: ept_client.c:331
etcpal_error_t rdmnet_ept_client_add_default_scope(rdmnet_ept_client_t client_handle, rdmnet_client_scope_t *scope_handle)
Add a new scope representing the default RDMnet scope to an EPT client instance.
Definition: ept_client.c:168
etcpal_error_t rdmnet_ept_client_get_scope(rdmnet_ept_client_t client_handle, rdmnet_client_scope_t scope_handle, char *scope_str_buf, EtcPalSockAddr *static_broker_addr)
Retrieve the scope string of a previously-added scope.
Definition: ept_client.c:247
void(* RdmnetEptClientConnectFailedCallback)(rdmnet_ept_client_t client_handle, rdmnet_client_scope_t scope_handle, const RdmnetClientConnectFailedInfo *info, void *context)
A connection attempt failed between an EPT client and a broker.
Definition: ept_client.h:76
int rdmnet_ept_client_t
A handle to an RDMnet EPT Client.
Definition: ept_client.h:53
Basic types for parsed RDMnet messages.
Information provided by the library about an unsuccessful RDMnet client connection.
Definition: client.h:164
Information provided by the library about a successful RDMnet client connection.
Definition: client.h:151
Information provided by the library about an RDMnet client connection that disconnected after a succe...
Definition: client.h:196
A set of notification callbacks received about an EPT client.
Definition: ept_client.h:136
RdmnetEptClientConnectFailedCallback connect_failed
Required.
Definition: ept_client.h:138
void * context
(optional) Pointer to opaque data passed back with each callback.
Definition: ept_client.h:143
RdmnetEptClientConnectedCallback connected
Required.
Definition: ept_client.h:137
RdmnetEptClientStatusReceivedCallback status_received
Required.
Definition: ept_client.h:142
RdmnetEptClientDataReceivedCallback data_received
Required.
Definition: ept_client.h:141
RdmnetEptClientDisconnectedCallback disconnected
Required.
Definition: ept_client.h:139
RdmnetEptClientClientListUpdateReceivedCallback client_list_update_received
Required.
Definition: ept_client.h:140
A set of information that defines the startup parameters of an EPT client.
Definition: ept_client.h:148
const RdmnetEptSubProtocol * protocols
The list of EPT sub-protocols that this EPT client supports.
Definition: ept_client.h:158
const char * search_domain
(optional) The EPT client's configured search domain for discovery.
Definition: ept_client.h:176
RdmnetEptClientCallbacks callbacks
A set of callbacks for the client to receive RDMnet notifications.
Definition: ept_client.h:156
uint8_t * response_buf
(optional) A data buffer to be used to respond synchronously to EPT data notifications.
Definition: ept_client.h:170
size_t num_protocols
The size of the protocols array.
Definition: ept_client.h:160
EtcPalUuid cid
The EPT client's CID.
Definition: ept_client.h:154
A structure that represents a list of EPT Client Entries.
Definition: message.h:414
An RDMnet EPT data message received by a local component.
Definition: message.h:270
An RDMnet EPT status message received by a local component.
Definition: message.h:309
A description of an EPT sub-protocol.
Definition: message.h:379
A set of configuration information for a single scope in which an RDMnet client is participating.
Definition: client.h:224
This structure should not be manipulated directly - use the macros to access it:
Definition: common.h:293