devices have style codes

This commit is contained in:
Kevin Matz 2023-05-21 12:41:39 -04:00
parent c6e8c2528d
commit 506deb7e5e
4 changed files with 10 additions and 4 deletions

View File

@ -27,7 +27,8 @@
namespace ARTNET { namespace ARTNET {
Controller::Controller() Controller::Controller()
: minimum_polling_interval(2500) : Device(StController)
, minimum_polling_interval(2500)
, _periodic_polling_enabled(true) , _periodic_polling_enabled(true)
, _pollster(std::thread(&Controller::_periodic_polling, this)) , _pollster(std::thread(&Controller::_periodic_polling, this))
, last_poll(std::chrono::system_clock::from_time_t(0)) , last_poll(std::chrono::system_clock::from_time_t(0))

View File

@ -28,13 +28,15 @@ namespace ARTNET {
/** /**
* @brief Device::Device * @brief Device::Device
* @param style
* *
* \note A ArtPollReply packet is required to be broadcast to the Directed Broadcast address by * \note A ArtPollReply packet is required to be broadcast to the Directed Broadcast address by
* all Art-Net devices on power up. Since information in that packet requres a fully configured * all Art-Net devices on power up. Since information in that packet requres a fully configured
* device, it must be specifically sent later. * device, it must be specifically sent later.
*/ */
Device::Device() Device::Device(Style style)
: diagnostic_reporting_threshold(DpCritial) : styleCode(style)
, diagnostic_reporting_threshold(DpCritial)
, _shortName("OpenLCP Device") , _shortName("OpenLCP Device")
, _longName("Generic OpenLCP Art-Net Device") , _longName("Generic OpenLCP Art-Net Device")
{ {

View File

@ -38,7 +38,9 @@ using ACN::SDT::UDP::ipAddress;
class Device class Device
{ {
public: public:
explicit Device(); explicit Device(Style);
const Style styleCode; //!< \cite ARTNET The Style code defines the equipment style of the device.
void receive(ACN::PDU::Stream); void receive(ACN::PDU::Stream);
void receive(std::shared_ptr<Packet>); void receive(std::shared_ptr<Packet>);

View File

@ -27,6 +27,7 @@
namespace ARTNET { namespace ARTNET {
Node::Node() Node::Node()
: Device(StNode)
{ {
setShortName("OpenLCP Node"); setShortName("OpenLCP Node");
setLongName("Generic OpenLCP Art-Net Node"); setLongName("Generic OpenLCP Art-Net Node");