RDMnet  0.3.0
Implementation of ANSI E1.33 (RDMnet)
View other versions:
rdmnet::llrp::Manager Class Reference

Overview

An instance of LLRP manager functionality.

See Using the LLRP Manager API for details of how to use this API.

#include <rdmnet/cpp/llrp_manager.h>

Data Structures

class  NotifyHandler
 A class that receives notification callbacks from an LLRP manager. More...
 

Public Types

using Handle = llrp_manager_t
 A handle type used by the RDMnet library to identify LLRP manager instances.
 

Public Member Functions

 Manager (const Manager &other)=delete
 
Manageroperator= (const Manager &other)=delete
 
 Manager (Manager &&other)=default
 Move a manager instance.
 
Manageroperator= (Manager &&other)=default
 Move a manager instance.
 
etcpal::Error Startup (NotifyHandler &notify_handler, uint16_t manufacturer_id, unsigned int netint_index, etcpal_iptype_t ip_type=kEtcPalIpTypeV4, const etcpal::Uuid &cid=etcpal::Uuid::OsPreferred())
 Allocate resources and startup this LLRP manager with the given configuration. More...
 
void Shutdown ()
 Shut down this LLRP manager and deallocate resources.
 
etcpal::Error StartDiscovery (uint16_t filter=0)
 Start LLRP discovery. More...
 
etcpal::Error StopDiscovery ()
 Stop LLRP discovery. More...
 
etcpal::Expected< uint32_t > SendRdmCommand (const DestinationAddr &destination, rdmnet_command_class_t command_class, uint16_t param_id, const uint8_t *data=nullptr, uint8_t data_len=0)
 Send an RDM command from an LLRP manager. More...
 
etcpal::Expected< uint32_t > SendGetCommand (const DestinationAddr &destination, uint16_t param_id, const uint8_t *data=nullptr, uint8_t data_len=0)
 Send an RDM GET command from an LLRP manager. More...
 
etcpal::Expected< uint32_t > SendSetCommand (const DestinationAddr &destination, uint16_t param_id, const uint8_t *data=nullptr, uint8_t data_len=0)
 Send an RDM SET command from an LLRP manager. More...
 
constexpr Handle handle () const
 Retrieve the handle of an LLRP manager instance.
 
constexpr NotifyHandlernotify_handler () const
 Retrieve the NotifyHandler reference that this LLRP manager was configured with.
 

Static Public Attributes

static constexpr Handle kInvalidHandle = LLRP_MANAGER_INVALID
 An invalid Handle value.
 

Member Function Documentation

◆ SendGetCommand()

etcpal::Expected< uint32_t > rdmnet::llrp::Manager::SendGetCommand ( const DestinationAddr destination,
uint16_t  param_id,
const uint8_t *  data = nullptr,
uint8_t  data_len = 0 
)
inline

Send an RDM GET command from an LLRP manager.

The response will be delivered via the NotifyHandler::HandleLlrpRdmResponse() callback.

Parameters
destinationThe destination addressing information for the RDM command.
param_idThe command's RDM parameter ID.
data[optional] The command's RDM parameter data, if it has any.
data_len[optional] The length of the RDM parameter data (or 0 if data is nullptr).
Returns
On success, a sequence number which can be used to match the command with a response.
On failure, error codes from llrp_manager_send_rdm_command().

◆ SendRdmCommand()

etcpal::Expected< uint32_t > rdmnet::llrp::Manager::SendRdmCommand ( const DestinationAddr destination,
rdmnet_command_class_t  command_class,
uint16_t  param_id,
const uint8_t *  data = nullptr,
uint8_t  data_len = 0 
)
inline

Send an RDM command from an LLRP manager.

The response will be delivered via the NotifyHandler::HandleLlrpRdmResponse() callback.

Parameters
destinationThe destination addressing information for the RDM command.
command_classThe command's RDM command class (GET or SET).
param_idThe command's RDM parameter ID.
data[optional] The command's RDM parameter data, if it has any.
data_len[optional] The length of the RDM parameter data (or 0 if data is nullptr).
Returns
On success, a sequence number which can be used to match the command with a response.
On failure, error codes from llrp_manager_send_rdm_command().

◆ SendSetCommand()

etcpal::Expected< uint32_t > rdmnet::llrp::Manager::SendSetCommand ( const DestinationAddr destination,
uint16_t  param_id,
const uint8_t *  data = nullptr,
uint8_t  data_len = 0 
)
inline

Send an RDM SET command from an LLRP manager.

The response will be delivered via the NotifyHandler::HandleLlrpRdmResponse() callback.

Parameters
destinationThe destination addressing information for the RDM command.
param_idThe command's RDM parameter ID.
data[optional] The command's RDM parameter data, if it has any.
data_len[optional] The length of the RDM parameter data (or 0 if data is nullptr).
Returns
On success, a sequence number which can be used to match the command with a response.
On failure, error codes from llrp_manager_send_rdm_command().

◆ StartDiscovery()

etcpal::Error rdmnet::llrp::Manager::StartDiscovery ( uint16_t  filter = 0)
inline

Start LLRP discovery.

Configure a manager to start discovery and send the first discovery message. Fails if a previous discovery process is still ongoing.

Parameters
filterDiscovery filter, made up of one or more of the LLRP_FILTERVAL_* constants defined in rdmnet/defs.h.
Returns
etcpal::Error::Ok(): Discovery started successfully.
Errors from llrp_manager_start_discovery().

◆ Startup()

etcpal::Error rdmnet::llrp::Manager::Startup ( NotifyHandler notify_handler,
uint16_t  manufacturer_id,
unsigned int  netint_index,
etcpal_iptype_t  ip_type = kEtcPalIpTypeV4,
const etcpal::Uuid cid = etcpal::Uuid::OsPreferred() 
)
inline

Allocate resources and startup this LLRP manager with the given configuration.

Parameters
notify_handlerA class instance to handle callback notifications from this manager.
manufacturer_idThe LLRP manager's ESTA manufacturer ID.
netint_indexThe network interface index on which this manager should operate.
ip_typeThe IP protocol type with which this manager should operate.
cidThe manager's Component Identifier (CID).
Returns
etcpal::Error::Ok(): LLRP manager started successfully.
Errors forwarded from llrp_manager_create().

◆ StopDiscovery()

etcpal::Error rdmnet::llrp::Manager::StopDiscovery ( )
inline

Stop LLRP discovery.

Clears all discovery state and known discovered targets.

Returns
etcpal::Error::Ok(): Discovery stopped successfully.
Errors from llrp_manager_stop_discovery().

The documentation for this class was generated from the following file: