// STL includes #include #include #include // Linux includes #include #include // hyperion local includes #include "LedDeviceUdpRaw.h" LedDeviceUdpRaw::LedDeviceUdpRaw(const Json::Value &deviceConfig) : ProviderUdp() { ProviderUdp::setConfig(deviceConfig, 500000, 5568); } LedDevice* LedDeviceUdpRaw::construct(const Json::Value &deviceConfig) { return new LedDeviceUdpRaw(deviceConfig); } int LedDeviceUdpRaw::write(const std::vector &ledValues) { _ledCount = ledValues.size(); const unsigned dataLen = _ledCount * sizeof(ColorRgb); const uint8_t * dataPtr = reinterpret_cast(ledValues.data()); return writeBytes(dataLen, dataPtr); }