23 #ifndef RDMNET_CPP_EPT_CLIENT_H_
24 #define RDMNET_CPP_EPT_CLIENT_H_
26 #include "etcpal/common.h"
157 uint16_t manufacturer_id,
158 uint16_t protocol_id,
164 const char* status_string =
nullptr);
172 NotifyHandler* notify_{
nullptr};
177 : cid(new_cid), protocols(new_protocols)
184 return (!cid.IsNull() && !protocols.empty());
196 ETCPAL_UNUSED_ARG(settings);
208 ETCPAL_UNUSED_ARG(disconnect_reason);
224 ETCPAL_UNUSED_ARG(
id);
225 ETCPAL_UNUSED_ARG(static_broker_addr);
240 ETCPAL_UNUSED_ARG(scope_config);
255 ETCPAL_UNUSED_ARG(static_broker_addr);
269 ETCPAL_UNUSED_ARG(scope_handle);
270 ETCPAL_UNUSED_ARG(disconnect_reason);
283 ETCPAL_UNUSED_ARG(scope_handle);
302 uint16_t manufacturer_id,
303 uint16_t protocol_id,
307 ETCPAL_UNUSED_ARG(scope_handle);
308 ETCPAL_UNUSED_ARG(dest_cid);
309 ETCPAL_UNUSED_ARG(manufacturer_id);
310 ETCPAL_UNUSED_ARG(protocol_id);
311 ETCPAL_UNUSED_ARG(data);
312 ETCPAL_UNUSED_ARG(data_len);
331 const char* status_string)
333 ETCPAL_UNUSED_ARG(scope_handle);
334 ETCPAL_UNUSED_ARG(dest_cid);
335 ETCPAL_UNUSED_ARG(status_code);
336 ETCPAL_UNUSED_ARG(status_string);
358 ETCPAL_UNUSED_ARG(scope_handle);
Information about a failed connection to a broker delivered to an RDMnet callback function.
Definition: client.h:228
Information about a successful connection to a broker delivered to an RDMnet callback function.
Definition: client.h:158
Information about a disconnect event from a broker delivered to an RDMnet callback function.
Definition: client.h:346
A base class for a class that receives notification callbacks from an EPT client.
Definition: ept_client.h:68
virtual void HandleBrokerConnectFailed(Handle client_handle, ScopeHandle scope_handle, const ClientConnectFailedInfo &info)=0
A connection attempt failed between an EPT client and a broker.
virtual void HandleClientListUpdate(Handle client_handle, ScopeHandle scope_handle, client_list_action_t list_action, const EptClientList &list)=0
A client list update has been received from a broker.
virtual void HandleDisconnectedFromBroker(Handle client_handle, ScopeHandle scope_handle, const ClientDisconnectedInfo &info)=0
An EPT client which was previously connected to a broker has disconnected.
virtual void HandleEptStatus(Handle client_handle, ScopeHandle scope_handle, const EptStatus &status)=0
An EPT status message has been received in response to a previously-sent EPT data message.
virtual EptResponseAction HandleEptData(Handle client_handle, ScopeHandle scope_handle, const EptData &data)=0
EPT data has been received addressed to an EPT client.
virtual void HandleConnectedToBroker(Handle client_handle, ScopeHandle scope_handle, const ClientConnectedInfo &info)=0
An EPT client has successfully connected to a broker.
An instance of RDMnet EPT client functionality.
Definition: ept_client.h:58
etcpal::Error Startup(NotifyHandler ¬ify_handler, const Settings &settings)
Allocate resources and start up this EPT client with the given configuration.
Definition: ept_client.h:193
etcpal::Expected< ScopeHandle > AddDefaultScope(const etcpal::SockAddr &static_broker_addr=etcpal::SockAddr{})
Shortcut to add the default RDMnet scope to an EPT client instance.
Definition: ept_client.h:253
EptClient & operator=(EptClient &&other)=default
Move an EPT client instance.
etcpal::Error SendStatus(ScopeHandle scope_handle, const etcpal::Uuid &dest_cid, ept_status_code_t status_code, const char *status_string=nullptr)
Send a status message from an EPT client on a scope.
Definition: ept_client.h:328
Handle handle() const
Retrieve the handle of an EPT client instance.
Definition: ept_client.h:341
EptClient(EptClient &&other)=default
Move an EPT client instance.
etcpal::Error RequestClientList(ScopeHandle scope_handle)
Request a client list from a broker.
Definition: ept_client.h:281
NotifyHandler * notify_handler() const
Retrieve the NotifyHandler reference that this EPT client was configured with.
Definition: ept_client.h:347
void Shutdown(rdmnet_disconnect_reason_t disconnect_reason=kRdmnetDisconnectShutdown)
Shut down this EPT client and deallocate resources.
Definition: ept_client.h:206
etcpal::Expected< Scope > scope(ScopeHandle scope_handle) const
Retrieve the scope configuration associated with a given scope handle.
Definition: ept_client.h:356
etcpal::Error RemoveScope(ScopeHandle scope_handle, rdmnet_disconnect_reason_t disconnect_reason)
Remove a previously-added scope from this EPT client instance.
Definition: ept_client.h:267
etcpal::Error SendData(ScopeHandle scope_handle, const etcpal::Uuid &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.h:300
etcpal::OpaqueId< detail::EptClientHandleType, rdmnet_ept_client_t, RDMNET_EPT_CLIENT_INVALID > Handle
A handle type used by the RDMnet library to identify EPT client instances.
Definition: ept_client.h:61
etcpal::Expected< ScopeHandle > AddScope(const char *id, const etcpal::SockAddr &static_broker_addr=etcpal::SockAddr{})
Add a new scope to this EPT client instance.
Definition: ept_client.h:222
A list of EPT client entries.
Definition: ept_client.h:123
An EPT data message received over RDMnet and delivered to an RDMnet callback function.
Definition: ept_data.h:41
A class representing a synchronous action to take in response to a received EPT data message.
Definition: common.h:215
An EPT status message received over RDMnet and delivered to an RDMnet callback function.
Definition: ept_status.h:41
An RDMnet scope configuration.
Definition: client.h:469
Definition: ept_client.h:49
C++ wrapper for RDMnet client API definitions.
C++ wrapper for the RDMnet init/deinit functions.
RDMnet C++ message type definitions.
Definitions for the RDMnet EPT Client API.
ept_status_code_t
Definition: common.h:76
rdmnet_disconnect_reason_t
Definition: common.h:85
client_list_action_t
Definition: client.h:50
@ kRdmnetDisconnectShutdown
Definition: common.h:87
etcpal::OpaqueId< detail::ScopeHandleType, rdmnet_client_scope_t, RDMNET_CLIENT_SCOPE_INVALID > ScopeHandle
Definition: client.h:456
A namespace which contains all C++ language definitions in the RDMnet library.
Definition: broker.h:45
A set of configuration settings that an EPT client needs to initialize.
Definition: ept_client.h:124
Settings()=default
Create an empty, invalid data structure by default.
const uint8_t * response_buf
(optional) A data buffer to be used to respond synchronously to EPT data noficiations.
Definition: ept_client.h:129
std::vector< EptSubProtocol > protocols
The list of EPT sub-protocols that this EPT client supports.
Definition: ept_client.h:126
std::string search_domain
Definition: ept_client.h:127
etcpal::Uuid cid
The EPT client's CID.
Definition: ept_client.h:125
bool IsValid() const
Determine whether an EPT client Settings instance contains valid data for RDMnet operation.
Definition: ept_client.h:182