2022-06-09 16:41:55 -04:00
|
|
|
/*
|
|
|
|
device.cpp
|
|
|
|
|
|
|
|
Copyright (c) 2022 Kevin Matz (kevin.matz@gmail.com)
|
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
|
|
in the Software without restriction, including without limitation the rights
|
|
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in all
|
|
|
|
copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "device.h"
|
|
|
|
|
|
|
|
namespace ARTNET {
|
|
|
|
|
2023-05-20 13:35:37 -04:00
|
|
|
/**
|
|
|
|
* @brief Device::Device
|
|
|
|
*
|
|
|
|
* \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
|
|
|
|
* device, it must be specifically sent later.
|
|
|
|
*/
|
2022-06-09 16:41:55 -04:00
|
|
|
Device::Device()
|
2023-05-20 13:37:40 -04:00
|
|
|
: diagnostic_reporting_threshold(DpCritial)
|
2023-05-21 11:12:41 -04:00
|
|
|
, _shortName("OpenLCP Device")
|
|
|
|
, _longName("Generic OpenLCP Art-Net Device")
|
2022-06-09 16:41:55 -04:00
|
|
|
{
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-05-20 13:40:10 -04:00
|
|
|
* @brief Device::receive
|
|
|
|
* @param buffer
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:40:10 -04:00
|
|
|
void Device::receive(ACN::PDU::Stream buffer)
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:40:10 -04:00
|
|
|
auto packet = std::make_shared<Packet>();
|
|
|
|
packet->iStream(buffer);
|
2023-05-20 14:15:12 -04:00
|
|
|
receive(packet);
|
2023-05-20 13:40:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Device::receive
|
|
|
|
* @param packet
|
|
|
|
*/
|
|
|
|
void Device::receive(std::shared_ptr<Packet> packet)
|
|
|
|
{
|
|
|
|
switch (packet->opcode()) {
|
|
|
|
case OpPoll:
|
|
|
|
rxArtPoll(std::static_pointer_cast<ArtPoll>(packet));
|
|
|
|
break;
|
2023-05-20 14:15:12 -04:00
|
|
|
case OpPollReply:
|
|
|
|
rxArtPollReply(std::static_pointer_cast<ArtPollReply>(packet));
|
|
|
|
break;
|
|
|
|
case OpDiagData:
|
|
|
|
rxArtDiagData(std::static_pointer_cast<ArtDiagData>(packet));
|
|
|
|
break;
|
|
|
|
case OpCommand:
|
|
|
|
rxArtCommand(std::static_pointer_cast<ArtCommand>(packet));
|
|
|
|
break;
|
|
|
|
case OpDmx:
|
|
|
|
rxArtDmx(std::static_pointer_cast<ArtDmx>(packet));
|
|
|
|
break;
|
|
|
|
case OpNzs:
|
|
|
|
rxArtNzs(std::static_pointer_cast<ArtNzs>(packet));
|
|
|
|
break;
|
|
|
|
case OpSync:
|
|
|
|
rxArtSync(std::static_pointer_cast<ArtSync>(packet));
|
|
|
|
break;
|
|
|
|
case OpAddress:
|
|
|
|
rxArtAddress(std::static_pointer_cast<ArtAddress>(packet));
|
|
|
|
break;
|
|
|
|
case OpInput:
|
|
|
|
rxArtInput(std::static_pointer_cast<ArtInput>(packet));
|
|
|
|
break;
|
|
|
|
case OpTodRequest:
|
|
|
|
rxArtTodRequest(std::static_pointer_cast<ArtTodRequest>(packet));
|
|
|
|
break;
|
|
|
|
case OpTodData:
|
|
|
|
rxArtTodData(std::static_pointer_cast<ArtTodData>(packet));
|
|
|
|
break;
|
|
|
|
case OpTodControl:
|
|
|
|
rxArtTodControl(std::static_pointer_cast<ArtTodControl>(packet));
|
|
|
|
break;
|
|
|
|
case OpRdm:
|
|
|
|
rxArtRdm(std::static_pointer_cast<ArtRdm>(packet));
|
|
|
|
break;
|
|
|
|
case OpRdmSub:
|
|
|
|
rxArtRdmSub(std::static_pointer_cast<ArtRdmSub>(packet));
|
|
|
|
break;
|
|
|
|
case OpFirmwareMaster:
|
|
|
|
rxArtFirmwareMaster(std::static_pointer_cast<ArtFirmwareMaster>(packet));
|
|
|
|
break;
|
|
|
|
case OpFirmwareReply:
|
|
|
|
rxArtFirmwareReply(std::static_pointer_cast<ArtFirmwareReply>(packet));
|
|
|
|
break;
|
|
|
|
case OpIpProg:
|
|
|
|
rxArtIpProg(std::static_pointer_cast<ArtIpProg>(packet));
|
|
|
|
break;
|
|
|
|
case OpIpProgReply:
|
|
|
|
rxArtIpProgReply(std::static_pointer_cast<ArtIpProgReply>(packet));
|
|
|
|
break;
|
|
|
|
case OpTimeCode:
|
|
|
|
rxArtTimeCode(std::static_pointer_cast<ArtTimeCode>(packet));
|
|
|
|
break;
|
|
|
|
case OpTrigger:
|
|
|
|
rxArtTrigger(std::static_pointer_cast<ArtTrigger>(packet));
|
|
|
|
break;
|
2023-05-20 13:40:10 -04:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-05-20 13:39:03 -04:00
|
|
|
* @brief Device::setSender
|
|
|
|
* @param sender
|
|
|
|
* @return
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:39:03 -04:00
|
|
|
std::shared_ptr<void> Device::setSender(const std::function<void(std::shared_ptr<bufferstream>,
|
|
|
|
ipAddress)> sender)
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:39:03 -04:00
|
|
|
// wrap the callback with a shared pointer
|
|
|
|
auto sp = std::make_shared<std::function<void(std::shared_ptr<bufferstream>,
|
|
|
|
ipAddress)>>(std::move(sender));
|
|
|
|
// store sender function (as a weak pointer)
|
|
|
|
_sender = sp;
|
|
|
|
// return token that caller must keep throughout it's scope
|
|
|
|
return sp;
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-05-20 13:39:03 -04:00
|
|
|
* @brief Device::send
|
|
|
|
* @param packet
|
|
|
|
* @param address
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:39:03 -04:00
|
|
|
void Device::send(const std::shared_ptr<Packet> packet, const ipAddress &address) const
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:39:03 -04:00
|
|
|
auto buffer = std::vector<uint8_t>(packet->streamSize());
|
|
|
|
auto stream = std::make_shared<bufferstream>(buffer.data(), buffer.size());
|
|
|
|
packet->oStream(stream);
|
|
|
|
if (auto sp = _sender.lock()) // the owner is still holding the token
|
|
|
|
(*sp)(stream, address);
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-05-20 13:34:46 -04:00
|
|
|
* @brief Device::rxArtPoll
|
|
|
|
* @param packet
|
|
|
|
*/
|
|
|
|
void Device::rxArtPoll(std::shared_ptr<ArtPoll> packet)
|
|
|
|
{
|
|
|
|
auto data_opt = packet->data<poll_data>();
|
|
|
|
if (!data_opt.has_value())
|
|
|
|
return;
|
|
|
|
auto data = data_opt.value();
|
2023-05-20 14:55:31 -04:00
|
|
|
|
|
|
|
/// \bug The specification details resolution of diagostice behavior from multiple simultanious
|
|
|
|
/// controllers. However, the spec does not provide a mechanism for differentiating between
|
|
|
|
/// controllers. Until OSI layer 3 data is available, LTP the reporting settings.
|
2023-05-20 13:34:46 -04:00
|
|
|
diagnostic_reporting_behavior = data->talk_to_me;
|
|
|
|
diagnostic_reporting_threshold = data->diagnostic_level;
|
|
|
|
|
|
|
|
/// All device types send an ArtPollReply in response to receiving an ArtPoll.
|
|
|
|
txArtPollReply();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Device::rxArtPollReply
|
|
|
|
* @param packet
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:34:46 -04:00
|
|
|
void Device::rxArtPollReply(std::shared_ptr<ArtPollReply> packet)
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:34:46 -04:00
|
|
|
(void)packet;
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-05-20 13:34:46 -04:00
|
|
|
* @brief Device::rxArtDiagData
|
|
|
|
* @param packet
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:34:46 -04:00
|
|
|
void Device::rxArtDiagData(std::shared_ptr<ArtDiagData> packet)
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:34:46 -04:00
|
|
|
(void)packet;
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Device::rxArtCommand
|
2023-05-20 13:34:46 -04:00
|
|
|
* @param packet
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:34:46 -04:00
|
|
|
void Device::rxArtCommand(std::shared_ptr<ArtCommand> packet)
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:34:46 -04:00
|
|
|
(void)packet;
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-05-20 13:34:46 -04:00
|
|
|
* @brief Device::rxArtDmx
|
|
|
|
* @param packet
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:34:46 -04:00
|
|
|
void Device::rxArtDmx(std::shared_ptr<ArtDmx> packet)
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:34:46 -04:00
|
|
|
(void)packet;
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-05-20 13:34:46 -04:00
|
|
|
* @brief Device::rxArtNzs
|
|
|
|
* @param packet
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:34:46 -04:00
|
|
|
void Device::rxArtNzs(std::shared_ptr<ArtNzs> packet)
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:34:46 -04:00
|
|
|
if (packet->isVLC())
|
|
|
|
rxArtVlc(packet);
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-05-20 13:34:46 -04:00
|
|
|
* @brief Device::rxArtVlc
|
|
|
|
* @param packet
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:34:46 -04:00
|
|
|
void Device::rxArtVlc(std::shared_ptr<ArtNzs> packet)
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:34:46 -04:00
|
|
|
auto data_opt = packet->data<nzs_data>();
|
|
|
|
if (!data_opt.has_value())
|
|
|
|
return;
|
|
|
|
auto data = std::make_shared<vlc_data>(data_opt.value().get());
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-05-20 13:34:46 -04:00
|
|
|
* @brief Device::rxArtSync
|
|
|
|
* @param packet
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:34:46 -04:00
|
|
|
void Device::rxArtSync(std::shared_ptr<ArtSync> packet)
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:34:46 -04:00
|
|
|
(void)packet;
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-05-20 13:34:46 -04:00
|
|
|
* @brief Device::rxArtAddress
|
|
|
|
* @param packet
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:34:46 -04:00
|
|
|
void Device::rxArtAddress(std::shared_ptr<ArtAddress> packet)
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:34:46 -04:00
|
|
|
(void)packet;
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-05-20 13:34:46 -04:00
|
|
|
* @brief Device::rxArtInput
|
|
|
|
* @param packet
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:34:46 -04:00
|
|
|
void Device::rxArtInput(std::shared_ptr<ArtInput> packet)
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:34:46 -04:00
|
|
|
(void)packet;
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-05-20 13:34:46 -04:00
|
|
|
* @brief Device::rxArtTodRequest
|
|
|
|
* @param packet
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:34:46 -04:00
|
|
|
void Device::rxArtTodRequest(std::shared_ptr<ArtTodRequest> packet)
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:34:46 -04:00
|
|
|
(void)packet;
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-05-20 13:34:46 -04:00
|
|
|
* @brief Device::rxArtTodData
|
|
|
|
* @param packet
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:34:46 -04:00
|
|
|
void Device::rxArtTodData(std::shared_ptr<ArtTodData> packet)
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:34:46 -04:00
|
|
|
(void)packet;
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-05-20 13:34:46 -04:00
|
|
|
* @brief Device::rxArtTodControl
|
|
|
|
* @param packet
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:34:46 -04:00
|
|
|
void Device::rxArtTodControl(std::shared_ptr<ArtTodControl> packet)
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:34:46 -04:00
|
|
|
(void)packet;
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Device::rxArtRdm
|
2023-05-20 13:34:46 -04:00
|
|
|
* @param packet
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:34:46 -04:00
|
|
|
void Device::rxArtRdm(std::shared_ptr<ArtRdm> packet)
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:34:46 -04:00
|
|
|
(void)packet;
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-05-20 13:34:46 -04:00
|
|
|
* @brief Device::rxArtRdmSub
|
|
|
|
* @param packet
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:34:46 -04:00
|
|
|
void Device::rxArtRdmSub(std::shared_ptr<ArtRdmSub> packet)
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:34:46 -04:00
|
|
|
(void)packet;
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-05-20 13:34:46 -04:00
|
|
|
* @brief Device::rxArtFirmwareMaster
|
|
|
|
* @param packet
|
|
|
|
*/
|
|
|
|
void Device::rxArtFirmwareMaster(std::shared_ptr<ArtFirmwareMaster> packet)
|
|
|
|
{
|
|
|
|
(void)packet;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Device::rxArtFirmwareReply
|
|
|
|
* @param packet
|
|
|
|
*/
|
|
|
|
void Device::rxArtFirmwareReply(std::shared_ptr<ArtFirmwareReply> packet)
|
|
|
|
{
|
|
|
|
(void)packet;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Device::rxArtIpProg
|
|
|
|
* @param packet
|
|
|
|
*/
|
|
|
|
void Device::rxArtIpProg(std::shared_ptr<ArtIpProg> packet)
|
|
|
|
{
|
|
|
|
(void)packet;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Device::rxArtIpProgReply
|
|
|
|
* @param packet
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:34:46 -04:00
|
|
|
void Device::rxArtIpProgReply(std::shared_ptr<ArtIpProgReply> packet)
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:34:46 -04:00
|
|
|
(void)packet;
|
2022-11-15 11:42:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-05-20 13:34:46 -04:00
|
|
|
* @brief Device::rxArtTimeCode
|
|
|
|
* @param packet
|
|
|
|
*/
|
|
|
|
void Device::rxArtTimeCode(std::shared_ptr<ArtTimeCode> packet)
|
|
|
|
{
|
|
|
|
(void)packet;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Device::rxArtTrigger
|
|
|
|
* @param packet
|
2022-11-15 11:42:27 -05:00
|
|
|
*/
|
2023-05-20 13:34:46 -04:00
|
|
|
void Device::rxArtTrigger(std::shared_ptr<ArtTrigger> packet)
|
|
|
|
{
|
|
|
|
(void)packet;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Device::txArtPollReply
|
|
|
|
*/
|
|
|
|
void Device::txArtPollReply()
|
|
|
|
{
|
2023-05-20 14:39:50 -04:00
|
|
|
auto data = std::make_shared<pollreply_data>();
|
2023-05-20 13:34:46 -04:00
|
|
|
/// \todo impliment txArtPollReply
|
2023-05-20 14:39:50 -04:00
|
|
|
auto packet = std::make_shared<ArtPollReply>(data);
|
|
|
|
send(packet, broadcastIp());
|
2023-05-20 13:34:46 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Device::txArtDiagData
|
|
|
|
*/
|
|
|
|
void Device::txArtDiagData()
|
2022-11-15 11:42:27 -05:00
|
|
|
{
|
2023-05-20 13:34:46 -04:00
|
|
|
/// \todo impliment txArtDiagData
|
2022-06-09 16:41:55 -04:00
|
|
|
}
|
|
|
|
|
2023-05-21 11:12:41 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Device::shortName
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
std::string Device::shortName() const
|
|
|
|
{
|
|
|
|
return _shortName;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Device::setShortName
|
|
|
|
* @param newShortName
|
|
|
|
*/
|
|
|
|
void Device::setShortName(const std::string &newShortName)
|
|
|
|
{
|
|
|
|
_shortName = newShortName.substr(0, Short_Name_Length-1); // leave room for null terminator
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Device::longName
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
std::string Device::longName() const
|
|
|
|
{
|
|
|
|
return _longName;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Device::setLongName
|
|
|
|
* @param newLongName
|
|
|
|
*/
|
|
|
|
void Device::setLongName(const std::string &newLongName)
|
|
|
|
{
|
|
|
|
_longName = newLongName.substr(0, Long_Name_Length-1); // leave room for null terminator
|
|
|
|
}
|
|
|
|
|
2022-06-09 16:41:55 -04:00
|
|
|
} // namespace ARTNET
|