21#ifndef PLUGINS_USBPRO_ARDUINORGBDEVICE_H_
22#define PLUGINS_USBPRO_ARDUINORGBDEVICE_H_
26#include "olad/TokenBucket.h"
27#include "plugins/usbpro/ArduinoWidget.h"
28#include "plugins/usbpro/UsbSerialDevice.h"
38class ArduinoRGBDevice:
public UsbSerialDevice {
42 const std::string &name,
48 std::string
DeviceId()
const {
return m_device_id; }
51 std::string m_device_id;
64 unsigned int initial_count,
70 if (m_bucket.GetToken(*m_wake_time))
71 return m_widget->SendDMX(buffer);
73 OLA_INFO <<
"Port rated limited, dropping frame";
79 return m_widget->SendRDMRequest(request, callback);
83 m_widget->RunFullDiscovery(callback);
87 m_widget->RunIncrementalDiscovery(callback);
94 std::string m_description;
A class used to hold a single universe of DMX data.
BasicOutputPort(AbstractDevice *parent, unsigned int port_id, bool start_rdm_discovery_on_patch=false, bool supports_rdm=false)
Create a new BasicOutputPort.
Definition Port.cpp:120
Used to hold a single universe of DMX data.
Definition DmxBuffer.h:49
Definition TokenBucket.h:29
The interface for the SelectServer.
Definition SelectServerInterface.h:42
Definition ArduinoRGBDevice.h:38
std::string DeviceId() const
The device ID.
Definition ArduinoRGBDevice.h:48
bool WriteDMX(const DmxBuffer &buffer, uint8_t)
Write DMX data to this port.
Definition ArduinoRGBDevice.h:69
void RunFullDiscovery(ola::rdm::RDMDiscoveryCallback *callback)
This is a noop for ports that don't support RDM.
Definition ArduinoRGBDevice.h:82
void RunIncrementalDiscovery(ola::rdm::RDMDiscoveryCallback *callback)
This is a noop for ports that don't support RDM.
Definition ArduinoRGBDevice.h:86
std::string Description() const
Fetch the string description for a Port.
Definition ArduinoRGBDevice.h:67
void SendRDMRequest(ola::rdm::RDMRequest *request, ola::rdm::RDMCallback *callback)
Handle an RDMRequest, subclasses can implement this to support RDM.
Definition ArduinoRGBDevice.h:77
RDM Commands that represent requests (GET, SET or DISCOVER).
Definition RDMCommand.h:234
#define OLA_INFO
Definition Logging.h:81
Code for Enttec USB Pro devices and others using the same protocol.
Code for supported devices and protocols.
ola::BaseCallback1< void, RDMReply * > RDMCallback
The callback run when a RDM request completes.
Definition RDMControllerInterface.h:52
ola::BaseCallback1< void, const ola::rdm::UIDSet & > RDMDiscoveryCallback
The callback run when a discovery operation completes.
Definition RDMControllerInterface.h:68
The namespace containing all OLA symbols.
Definition Credentials.cpp:44