1
0
Fork 0

rename RLP vector registration function

This commit is contained in:
Kevin Matz 2021-08-15 11:22:01 -04:00
parent c033be5b6e
commit e6507c738d
3 changed files with 10 additions and 13 deletions

View File

@ -41,12 +41,10 @@ Appliance::Appliance(UUID::uuid cid)
{
fctn_ = "libESTA ACN Appliance";
RlpRegisterVectorHandler(SDT::SDT_PROTOCOL_ID,
std::bind(&Appliance::SdtReceiver, this,
std::placeholders::_1));
RlpRegisterVectorHandler(DMP::DMP_PROTOCOL_ID,
std::bind(&Appliance::DmpReceiver, this,
std::placeholders::_1));
RlpRegisterVector(SDT::SDT_PROTOCOL_ID, std::bind(&Appliance::SdtReceiver,
this, std::placeholders::_1));
RlpRegisterVector(DMP::DMP_PROTOCOL_ID, std::bind(&Appliance::DmpReceiver,
this, std::placeholders::_1));
};
@ -105,8 +103,7 @@ void Appliance::RlpReceiver(std::shared_ptr<RLP::Pdu> root)
*
* Add callback handler for a given RLP vector.
*/
void Appliance::RlpRegisterVectorHandler(uint32_t vect,
PDU::Handler<RLP::Pdu> handle)
void Appliance::RlpRegisterVector(uint32_t vect, PDU::Handler<RLP::Pdu> handle)
{
rlp_vectors_[vect].push_back(handle);
}

View File

@ -62,7 +62,7 @@ protected:
// RLP
void RlpReceiver(std::shared_ptr<RLP::Pdu>);
void RlpRegisterVectorHandler(uint32_t, PDU::Handler<RLP::Pdu>);
void RlpRegisterVector(uint32_t, PDU::Handler<RLP::Pdu>);
void RlpDerigsterVector(uint32_t);
void RlpDerigsterVector();

View File

@ -38,10 +38,10 @@ Receiver::Receiver(UUID::uuid cid)
{
fctn_ = "libESTA sACN Receiver";
RlpRegisterVectorHandler(VECTOR_ROOT_E131_DATA,
std::bind(&Receiver::dataReceiver, this, std::placeholders::_1));
RlpRegisterVectorHandler(VECTOR_ROOT_E131_EXTENDED,
std::bind(&Receiver::extendedReceiver, this, std::placeholders::_1));
RlpRegisterVector(VECTOR_ROOT_E131_DATA, std::bind(&Receiver::dataReceiver,
this, std::placeholders::_1));
RlpRegisterVector(VECTOR_ROOT_E131_EXTENDED, std::bind(&Receiver::extendedReceiver,
this, std::placeholders::_1));
}