1
0
Fork 0

make the ACN EPI 19 Fixed name only asignable at initilization

This commit is contained in:
Kevin Matz 2022-11-19 15:43:02 -05:00
parent 0cad3288d7
commit e528abe5e1
29 changed files with 67 additions and 77 deletions

View File

@ -10,14 +10,13 @@
* @brief QSacnNode::QSacnNode
* @param parent
* @param cid
* @param fctn
*/
QSacnNode::QSacnNode(QObject *parent, QUuid cid)
: Component(UUID::uuid(cid.toString().toStdString()))
QSacnNode::QSacnNode(QObject *parent, QUuid cid, QString fctn)
: Component(UUID::uuid(cid.toString().toStdString()), fctn.toStdString())
, QUdpSocket(parent)
, is_discovering_(false)
{
fctn_ = "OpenLCP QSacnNode";
bind(QHostAddress::AnyIPv4, sACN::ACN_SDT_MULTICAST_PORT);
connect(this, &QUdpSocket::readyRead,

View File

@ -20,7 +20,8 @@ class QT_EXPORT QSacnNode
Q_OBJECT
public:
explicit QSacnNode(QObject *parent = nullptr, QUuid = QUuid::createUuid());
explicit QSacnNode(QObject *parent = nullptr,
QUuid = QUuid::createUuid(), QString fctn = "OpenLCP QSacnNode");
~QSacnNode();
// rlp component

View File

@ -49,12 +49,13 @@ class Component {
public:
/**
* @brief Component
* @param cid the Component Identifier
* @param cid
* @param fctn
*/
Component(UUID::uuid cid = UUID::uuid())
: fctn_(std::string("OpenLCP ACN Component"))
Component(UUID::uuid cid = UUID::uuid(), std::string fctn = "OpenLCP ACN Component")
: cid_(cid)
, fctn_(fctn)
, uacn_(std::string())
, cid_(cid)
{};
/**
@ -95,12 +96,10 @@ public:
*/
void assignUserName(const std::string s) { uacn_ = s; }
protected:
std::string fctn_; //!< Fixed Component Type Name (FCTN)
std::string uacn_; //!< User Assigned Component Name (UACN)
private:
const UUID::uuid cid_;
const std::string fctn_; //!< Fixed Component Type Name (FCTN)
std::string uacn_; //!< User Assigned Component Name (UACN)
};
}; // ACN

View File

@ -30,13 +30,12 @@ namespace ACN::DMP {
/**
* @brief Appliance::Appliance
* @param cid
* @param fctn
*/
Appliance::Appliance(UUID::uuid cid)
: SDT::Member(cid)
Appliance::Appliance(UUID::uuid cid, std::string fctn)
: SDT::Member(cid, fctn)
, DMP::Device()
{
fctn_ = "OpenLCP DMP Component";
RlpRegisterVector(DMP_PROTOCOL_ID, std::bind(&Appliance::RlpReceiver, this,
std::placeholders::_1));
}

View File

@ -39,7 +39,7 @@ class Appliance
, public DMP::Device
{
public:
Appliance(UUID::uuid = UUID::uuid());
Appliance(UUID::uuid = UUID::uuid(), std::string fctn = "OpenLCP DMP Component");
virtual void RlpReceiver(PDU::Message<RLP::Pdu>);
};

View File

@ -30,12 +30,11 @@ namespace ACN::DMP {
/**
* @brief Controller::Controller
* @param cid
* @param fctn
*/
Controller::Controller(UUID::uuid cid)
: SDT::Leader(cid)
Controller::Controller(UUID::uuid cid, std::string fctn)
: SDT::Leader(cid, fctn)
{
fctn_ = "OpenLCP DMP Controller";
RlpRegisterVector(DMP_PROTOCOL_ID, std::bind(&Controller::RlpReceiver, this,
std::placeholders::_1));
}

View File

@ -34,7 +34,7 @@ class Controller
: public SDT::Leader
{
public:
Controller(UUID::uuid = UUID::uuid());
Controller(UUID::uuid = UUID::uuid(), std::string fctn = "OpenLCP DMP Controller");
virtual void RlpReceiver(PDU::Message<RLP::Pdu>);
};

View File

@ -30,14 +30,13 @@ namespace RDMnet::LLRP {
/**
* @brief Manager::Manager
* @param cid
* @param fctn
*/
Manager::Manager(UUID::uuid cid)
: ACN::RLP::Component(cid)
Manager::Manager(UUID::uuid cid, std::string fctn)
: ACN::RLP::Component(cid, fctn)
, transactionNumber(0)
, probeInactiveOnly(true)
{
fctn_ = "OpenLCP LLRP Manager";
RlpRegisterVector(VECTOR_ROOT_LLRP, std::bind(&Manager::rlpLlrpReceiver,
this, std::placeholders::_1));
}

View File

@ -38,7 +38,7 @@ class Manager
: public ACN::RLP::Component
{
public:
Manager(UUID::uuid = UUID::uuid());
Manager(UUID::uuid = UUID::uuid(), std::string fctn = "OpenLCP LLRP Manager");
void rlpLlrpReceiver(ACN::PDU::Message<ACN::RLP::Pdu>);

View File

@ -29,15 +29,14 @@ namespace RDMnet {
/**
* @brief Broker::Broker
* @param cid
* @param fctn
* @param uid
*/
Broker::Broker(UUID::uuid cid, RDM::UID uid)
: Implementation(cid, uid)
Broker::Broker(UUID::uuid cid, std::string fctn, RDM::UID uid)
: Implementation(cid, fctn, uid)
, EPT::Broker()
, RPT::Broker()
{
fctn_ = "OpenLCP RDMnet Broker";
RlpRegisterVector(VECTOR_ROOT_BROKER, std::bind(&Broker::rlpBrokerReceiver,
this, std::placeholders::_1));
}

View File

@ -38,7 +38,8 @@ class Broker
, public RPT::Broker
{
public:
Broker(UUID::uuid = UUID::uuid(), RDM::UID = RDM::UID());
Broker(UUID::uuid = UUID::uuid(), std::string ftcn = "OpenLCP RDMnet Broker",
RDM::UID = RDM::UID());
void rlpBrokerReceiver(ACN::PDU::Message<ACN::RLP::Pdu>);

View File

@ -28,15 +28,14 @@ namespace RDMnet {
/**
* @brief Controller::Controller
* @param cid
* @param fctn
* @param uid
*/
Controller::Controller(UUID::uuid cid, RDM::UID uid)
: Implementation(cid, uid)
Controller::Controller(UUID::uuid cid, std::string fctn, RDM::UID uid)
: Implementation(cid, fctn, uid)
, RDM::Controller()
, RPT::Controller()
{
fctn_ = "OpenLCP RDMnet Controller";
RlpRegisterVector(VECTOR_ROOT_RPT, std::bind(&Controller::rlpRptReceiver,
this, std::placeholders::_1));
}

View File

@ -38,7 +38,8 @@ class Controller
, public RPT::Controller
{
public:
Controller(UUID::uuid = UUID::uuid(), RDM::UID = RDM::UID());
Controller(UUID::uuid = UUID::uuid(), std::string fctn = "OpenLCP RDMnet Controller",
RDM::UID = RDM::UID());
void rlpRptReceiver(ACN::PDU::Message<ACN::RLP::Pdu>);
};

View File

@ -28,16 +28,15 @@ namespace RDMnet {
/**
* @brief Device::Device
* @param cid
* @param fctn
* @param uid
* @param rid
*/
Device::Device(UUID::uuid cid, RDM::UID uid, UUID::uuid rid)
: Implementation(cid, uid)
Device::Device(UUID::uuid cid, std::string fctn, RDM::UID uid, UUID::uuid rid)
: Implementation(cid, fctn, uid)
, RPT::Device()
, rid_(rid)
{
fctn_ = "OpenLCP RDMnet Device";
RlpRegisterVector(VECTOR_ROOT_RPT, std::bind(&Device::rlpRptReceiver,
this, std::placeholders::_1));
}

View File

@ -36,9 +36,8 @@ class Device
, public RPT::Device
{
public:
Device(UUID::uuid cid = UUID::uuid(),
RDM::UID uid = RDM::UID(),
UUID::uuid rid = UUID::uuid());
Device(UUID::uuid cid = UUID::uuid(), std::string fctn = "OpenLCP RDMnet Device",
RDM::UID uid = RDM::UID(), UUID::uuid rid = UUID::uuid());
void rlpRptReceiver(ACN::PDU::Message<ACN::RLP::Pdu>);

View File

@ -29,15 +29,14 @@ namespace RDMnet {
/**
* @brief Implementation::Implementation
* @param cid
* @param fctn
* @param uid
*/
Implementation::Implementation(UUID::uuid cid, RDM::UID uid)
: ACN::RLP::Component(cid)
Implementation::Implementation(UUID::uuid cid, std::string fctn, RDM::UID uid)
: ACN::RLP::Component(cid, fctn)
, RDM::Responder(uid)
, LLRP::Target()
{
fctn_ = "OpenLCP RDMnet Implementation";
RlpRegisterVector(VECTOR_ROOT_LLRP, std::bind(&Implementation::rlpLlrpReceiver,
this, std::placeholders::_1));
RlpRegisterVector(VECTOR_ROOT_EPT, std::bind(&Implementation::rlpEptReceiver,

View File

@ -40,7 +40,7 @@ class Implementation
, public EPT::Client
{
public:
Implementation(UUID::uuid = UUID::uuid(),
Implementation(UUID::uuid = UUID::uuid(), std::string fctn = "OpenLCP RDMnet Implementation",
RDM::UID = RDM::UID());
protected:

View File

@ -31,11 +31,11 @@ namespace ACN::RLP {
/**
* @brief Component::Component
* @param cid
* @param fctn
*/
Component::Component(UUID::uuid cid)
: ACN::Component(cid)
Component::Component(UUID::uuid cid, std::string fctn)
: ACN::Component(cid, fctn)
{
fctn_ = "OpenLCP RLP Component";
};

View File

@ -46,7 +46,7 @@ class Component
: public ACN::Component
{
public:
Component(UUID::uuid = UUID::uuid());
Component(UUID::uuid = UUID::uuid(), std::string fctn = "OpenLCP RLP Component");
// EPI 17 - ACN RLP on UDP
virtual void UdpPayloadReceiver(PDU::Stream);

View File

@ -5,11 +5,11 @@ namespace sACN {
/**
* @brief Node::Node
* @param cid
* @param fctn
*/
Node::Node(UUID::uuid cid)
: Component(cid)
Node::Node(UUID::uuid cid, std::string fctn)
: Component(cid, fctn)
{
fctn_ = "OpenLCP sACN Node";
}
} // SACN

View File

@ -36,7 +36,7 @@ class Node
, public Source
{
public:
Node(UUID::uuid = UUID::uuid());
Node(UUID::uuid = UUID::uuid(), std::string fctn = "OpenLCP sACN Node");
};
} // SACN

View File

@ -30,15 +30,14 @@ namespace sACN {
/**
* @brief Receiver::Receiver
* @param cid
* @param fctn
*
* Constructor. Register RLP vector callbacks.
*/
Receiver::Receiver(UUID::uuid cid)
: Component(cid)
Receiver::Receiver(UUID::uuid cid, std::string fctn)
: Component(cid, fctn)
, HoldLastLook(true)
{
fctn_ = "OpenLCP sACN Receiver";
RlpRegisterVector(VECTOR_ROOT_E131_DATA, std::bind(&Receiver::dataReceiver,
this, std::placeholders::_1));
RlpRegisterVector(VECTOR_ROOT_E131_EXTENDED, std::bind(&Receiver::extendedReceiver,

View File

@ -65,7 +65,7 @@ class Receiver
: public virtual ACN::RLP::Component
{
public:
Receiver(UUID::uuid = UUID::uuid());
Receiver(UUID::uuid = UUID::uuid(), std::string fctn = "OpenLCP sACN Receiver");
~Receiver();
void setHoldLastLook(const bool);

View File

@ -30,14 +30,14 @@ namespace sACN {
/**
* @brief Source::Source
* @param cid
* @param fctn
*/
Source::Source(UUID::uuid cid)
: Component(cid)
Source::Source(UUID::uuid cid, std::string fctn)
: Component(cid, fctn)
, discovery_future_(discovery_exitSignal_.get_future())
, discovery_worker_(&Source::discovery_loop_, this)
, sendNullDiscovery(false)
{
fctn_ = "OpenLCP sACN Source";
}

View File

@ -47,7 +47,7 @@ class Source
: public virtual ACN::RLP::Component
{
public:
Source(UUID::uuid = UUID::uuid());
Source(UUID::uuid = UUID::uuid(), std::string fctn = "OpenLCP sACN Source");
~Source();
virtual void create(const uint16_t);

View File

@ -29,12 +29,11 @@ namespace ACN::SDT {
/**
* @brief Leader::Leader
* @param cid
* @param fctn
*/
Leader::Leader(UUID::uuid cid)
: ACN::RLP::Component(cid)
Leader::Leader(UUID::uuid cid, std::string fctn)
: ACN::RLP::Component(cid, fctn)
{
fctn_ = "OpenLCP SDT Leader";
/**
* 1.3.1. Recursive use of PDU Format in Other Protocols
* ... within ACN as currently specified, there is just one higher layer

View File

@ -38,7 +38,7 @@ class Leader
: public ACN::RLP::Component
{
public:
Leader(UUID::uuid = UUID::uuid());
Leader(UUID::uuid = UUID::uuid(), std::string fctn = "OpenLCP SDT Leader");
// RLP->SDT frames
virtual void SdtReceiver(PDU::Message<RLP::Pdu>);

View File

@ -30,12 +30,11 @@ namespace ACN::SDT {
/**
* @brief Member::Member
* @param cid
* @param fctn
*/
Member::Member(UUID::uuid cid)
: ACN::RLP::Component(cid)
Member::Member(UUID::uuid cid, std::string fctn)
: ACN::RLP::Component(cid, fctn)
{
fctn_ = "OpenLCP SDT Member";
RlpRegisterVector(SDT_PROTOCOL_ID, std::bind(&Member::SdtReceiver, this,
std::placeholders::_1));
}

View File

@ -34,7 +34,7 @@ class Member
: public ACN::RLP::Component
{
public:
Member(UUID::uuid = UUID::uuid());
Member(UUID::uuid = UUID::uuid(), std::string fctn = "OpenLCP SDT Member");
virtual void SdtReceiver(PDU::Message<RLP::Pdu>);
};