Open Lighting Architecture
0.9.1
|
Construct and dissect RDM messages.
Files | |
file | RDMCommand.cpp |
file | RDMCommand.h |
Classes that represent RDM commands. | |
file | RDMCommandSerializer.h |
Write RDMCommands to a memory buffer. |
Classes | |
class | ola::rdm::RDMCommand |
The base class that all RDM commands inherit from. More... | |
class | ola::rdm::RDMRequest |
RDM Commands that represent requests (GET, SET or DISCOVER). More... | |
class | ola::rdm::RDMGetSetRequest |
The parent class for GET/SET requests. More... | |
class | ola::rdm::BaseRDMRequest< command_class > |
class | ola::rdm::RDMResponse |
The set of RDM Commands that represent responses (GET, SET or DISCOVER). More... | |
class | ola::rdm::RDMGetSetResponse |
The base class for GET/SET responses. More... | |
class | ola::rdm::BaseRDMResponse< command_class > |
class | ola::rdm::RDMDiscoveryRequest |
An RDM request of type DISCOVER_COMMAND. More... | |
class | ola::rdm::RDMDiscoveryResponse |
An RDM response of type DISCOVER_COMMAND. More... |
Enumerations | |
enum | ola::rdm::rdm_message_type { ola::rdm::RDM_REQUEST, ola::rdm::RDM_RESPONSE, ola::rdm::RDM_INVALID } |
An OLA specific enum that allows us to tell if a command is a request or a response. See RDMCommandClass for more information. More... |
Functions | |
bool | ola::rdm::GuessMessageType (rdm_message_type *type_arg, RDMCommand::RDMCommandClass *command_class_arg, const uint8_t *data, unsigned int length) |
RDMResponse * | ola::rdm::NackWithReason (const RDMRequest *request, rdm_nack_reason reason_enum, uint8_t outstanding_messages) |
RDMResponse * | ola::rdm::GetResponseFromData (const RDMRequest *request, const uint8_t *data, unsigned int length, rdm_response_type type, uint8_t outstanding_messages) |
RDMResponse * | ola::rdm::GetResponseWithPid (const RDMRequest *request, uint16_t pid, const uint8_t *data, unsigned int length, uint8_t type, uint8_t outstanding_messages) |
RDMDiscoveryRequest * | ola::rdm::NewDiscoveryUniqueBranchRequest (const UID &source, const UID &lower, const UID &upper, uint8_t transaction_number, uint8_t port_id=1) |
Create a new DUB request object. | |
RDMDiscoveryRequest * | ola::rdm::NewMuteRequest (const UID &source, const UID &destination, uint8_t transaction_number, uint8_t port_id=1) |
Create a new Mute Request Object. | |
RDMDiscoveryRequest * | ola::rdm::NewUnMuteRequest (const UID &source, const UID &destination, uint8_t transaction_number, uint8_t port_id) |
ola::rdm::RDMCommand::RDMCommand (const UID &source, const UID &destination, uint8_t transaction_number, uint8_t port_id, uint8_t message_count, uint16_t sub_device, uint16_t param_id, const uint8_t *data, unsigned int length) | |
bool | ola::rdm::RDMCommand::operator== (const RDMCommand &other) const |
Equality Operator. | |
void | ola::rdm::RDMCommand::Write (ola::io::OutputStream *stream) const |
Write this RDMCommand to an OutputStream. | |
static RDMCommand * | ola::rdm::RDMCommand::Inflate (const uint8_t *data, unsigned int length) |
void | ola::rdm::RDMCommand::SetParamData (const uint8_t *data, unsigned int length) |
static rdm_response_code | ola::rdm::RDMCommand::VerifyData (const uint8_t *data, unsigned int length, RDMCommandHeader *command_message) |
static RDMCommandClass | ola::rdm::RDMCommand::ConvertCommandClass (uint8_t command_type) |
static RDMRequest * | ola::rdm::RDMRequest::InflateFromData (const uint8_t *data, unsigned int length) |
static RDMRequest * | ola::rdm::RDMRequest::InflateFromData (const std::string &data) |
static RDMResponse * | ola::rdm::RDMResponse::InflateFromData (const uint8_t *data, unsigned int length, rdm_response_code *response_code, const RDMRequest *request=NULL) |
static RDMResponse * | ola::rdm::RDMResponse::InflateFromData (const uint8_t *data, unsigned int length, rdm_response_code *response_code, const RDMRequest *request, uint8_t transaction_number) |
static RDMResponse * | ola::rdm::RDMResponse::InflateFromData (const std::string &data, rdm_response_code *response_code, const RDMRequest *request=NULL) |
static RDMResponse * | ola::rdm::RDMResponse::InflateFromData (const std::string &data, rdm_response_code *response_code, const RDMRequest *request, uint8_t transaction_number) |
static RDMResponse * | ola::rdm::RDMResponse::CombineResponses (const RDMResponse *response1, const RDMResponse *response2) |
static RDMDiscoveryRequest * | ola::rdm::RDMDiscoveryRequest::InflateFromData (const uint8_t *data, unsigned int length) |
static RDMDiscoveryRequest * | ola::rdm::RDMDiscoveryRequest::InflateFromData (const std::string &data) |
static RDMDiscoveryResponse * | ola::rdm::RDMDiscoveryResponse::InflateFromData (const uint8_t *data, unsigned int length) |
static RDMDiscoveryResponse * | ola::rdm::RDMDiscoveryResponse::InflateFromData (const std::string &data) |
String Methods | |
std::string | ola::rdm::RDMCommand::ToString () const |
Create a string from the RDMCommand object. | |
std::ostream & | ola::rdm::RDMCommand::operator<< (std::ostream &out, const RDMCommand &command) |
Output an RDMCommand object to an ostream. |
|
static |
This combines two RDMResponses into one. It's used to combine the data from two responses in an ACK_OVERFLOW session together.
response1 | the first response. |
response2 | the second response. |
RDMResponse * ola::rdm::GetResponseWithPid | ( | const RDMRequest * | request, |
uint16_t | pid, | ||
const uint8_t * | data, | ||
unsigned int | length, | ||
uint8_t | type, | ||
uint8_t | outstanding_messages | ||
) |
Construct a RDM response from a RDMRequest object.
bool ola::rdm::GuessMessageType | ( | rdm_message_type * | type_arg, |
RDMCommand::RDMCommandClass * | command_class_arg, | ||
const uint8_t * | data, | ||
unsigned int | length | ||
) |
Guess the type of an RDM message, so we know whether we should unpack it as a request or response. This doesn't perform any data checking (that's left to the Inflate* methods).
type_arg | a pointer to a rdm_message_type variable which is set to RDM_REQUEST or RDM_RESPONSE. |
data | a pointer to the rdm message (excluding the start code) |
length | length of the rdm data |
|
static |
Attempt to inflate RDM data (excluding the start code) into an RDMCommand object. This is really only useful for sniffer-style programs.
|
static |
Inflate from some data
Reimplemented in ola::rdm::RDMDiscoveryRequest.
|
static |
Inflate a request from some data
data | the request data |
length | the length of the request data |
response_code | a pointer to a rdm_response_code to set |
request | an optional RDMRequest object that this response is for |
|
static |
Inflate from some data
|
static |
Inflate from some data
|
static |
Inflate a discovery request.
Reimplemented from ola::rdm::RDMRequest.
|
static |
Inflate from some data
Reimplemented from ola::rdm::RDMRequest.
|
static |
Inflate a discovery response.
RDMDiscoveryRequest * ola::rdm::NewUnMuteRequest | ( | const UID & | source, |
const UID & | destination, | ||
uint8_t | transaction_number, | ||
uint8_t | port_id | ||
) |
Create a new UnMute request object.
bool ola::rdm::RDMCommand::operator== | ( | const RDMCommand & | other | ) | const |
Equality Operator.
other | is the other RDMCommand you wish to compare against. |
|
protected |
Set the parameter data
std::string ola::rdm::RDMCommand::ToString | ( | ) | const |
Create a string from the RDMCommand object.
void ola::rdm::RDMCommand::Write | ( | ola::io::OutputStream * | stream | ) | const |
Write this RDMCommand to an OutputStream.
stream | is a pointer to an OutputStream |
|
friend |
Output an RDMCommand object to an ostream.
out | ostream to output to |
command | is the RDMCommand to print |