23 #ifndef RDMNET_CPP_EPT_CLIENT_H_
24 #define RDMNET_CPP_EPT_CLIENT_H_
26 #include "etcpal/common.h"
151 uint16_t manufacturer_id,
152 uint16_t protocol_id,
158 const char* status_string =
nullptr);
166 NotifyHandler* notify_{
nullptr};
171 : cid(new_cid), protocols(new_protocols)
178 return (!cid.IsNull() && !protocols.empty());
190 ETCPAL_UNUSED_ARG(settings);
202 ETCPAL_UNUSED_ARG(disconnect_reason);
218 ETCPAL_UNUSED_ARG(
id);
219 ETCPAL_UNUSED_ARG(static_broker_addr);
234 ETCPAL_UNUSED_ARG(scope_config);
249 ETCPAL_UNUSED_ARG(static_broker_addr);
263 ETCPAL_UNUSED_ARG(scope_handle);
264 ETCPAL_UNUSED_ARG(disconnect_reason);
277 ETCPAL_UNUSED_ARG(scope_handle);
296 uint16_t manufacturer_id,
297 uint16_t protocol_id,
301 ETCPAL_UNUSED_ARG(scope_handle);
302 ETCPAL_UNUSED_ARG(dest_cid);
303 ETCPAL_UNUSED_ARG(manufacturer_id);
304 ETCPAL_UNUSED_ARG(protocol_id);
305 ETCPAL_UNUSED_ARG(data);
306 ETCPAL_UNUSED_ARG(data_len);
325 const char* status_string)
327 ETCPAL_UNUSED_ARG(scope_handle);
328 ETCPAL_UNUSED_ARG(dest_cid);
329 ETCPAL_UNUSED_ARG(status_code);
330 ETCPAL_UNUSED_ARG(status_string);
352 ETCPAL_UNUSED_ARG(scope_handle);
Information about a failed connection to a broker delivered to an RDMnet callback function.
Definition: client.h:219
Information about a successful connection to a broker delivered to an RDMnet callback function.
Definition: client.h:149
Information about a disconnect event from a broker delivered to an RDMnet callback function.
Definition: client.h:337
A base class for a class that receives notification callbacks from an EPT client.
Definition: ept_client.h:62
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 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.
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 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.
An instance of RDMnet EPT client functionality.
Definition: ept_client.h:50
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:261
static constexpr Handle kInvalidHandle
An invalid Handle value.
Definition: ept_client.h:55
rdmnet_ept_client_t Handle
A handle type used by the RDMnet library to identify EPT client instances.
Definition: ept_client.h:53
void Shutdown(rdmnet_disconnect_reason_t disconnect_reason=kRdmnetDisconnectShutdown)
Shut down this EPT client and deallocate resources.
Definition: ept_client.h:200
etcpal::Expected< Scope > scope(ScopeHandle scope_handle) const
Retrieve the scope configuration associated with a given scope handle.
Definition: ept_client.h:350
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:247
etcpal::Error RequestClientList(ScopeHandle scope_handle)
Request a client list from a broker.
Definition: ept_client.h:275
EptClient & operator=(EptClient &&other)=default
Move an EPT client instance.
NotifyHandler * notify_handler() const
Retrieve the NotifyHandler reference that this EPT client was configured with.
Definition: ept_client.h:341
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:294
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:322
Handle handle() const
Retrieve the handle of an EPT client instance.
Definition: ept_client.h:335
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:187
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:216
EptClient(EptClient &&other)=default
Move an EPT client instance.
A list of EPT client entries.
Definition: ept_client.h:122
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:166
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:460
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
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
@ kRdmnetDisconnectShutdown
The remote component is shutting down.
Definition: common.h:87
rdmnet_client_scope_t ScopeHandle
A handle to a scope that an RDMnet client participates in.
Definition: client.h:447
#define RDMNET_EPT_CLIENT_INVALID
An invalid RDMnet EPT Client handle value.
Definition: ept_client.h:55
int rdmnet_ept_client_t
A handle to an RDMnet EPT Client.
Definition: ept_client.h:53
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:118
bool IsValid() const
Determine whether an EPT client Settings instance contains valid data for RDMnet operation.
Definition: ept_client.h:176
etcpal::Uuid cid
The EPT client's CID.
Definition: ept_client.h:119
std::string search_domain
(optional) The EPT client's search domain for discovering brokers.
Definition: ept_client.h:121
std::vector< EptSubProtocol > protocols
The list of EPT sub-protocols that this EPT client supports.
Definition: ept_client.h:120
const uint8_t * response_buf
(optional) A data buffer to be used to respond synchronously to EPT data noficiations.
Definition: ept_client.h:123
Settings()=default
Create an empty, invalid data structure by default.