21 #ifndef PLUGINS_USBPRO_ULTRADMXPRODEVICE_H_
22 #define PLUGINS_USBPRO_ULTRADMXPRODEVICE_H_
27 #include "olad/TokenBucket.h"
29 #include "olad/Port.h"
31 #include "plugins/usbpro/UltraDMXProWidget.h"
32 #include "plugins/usbpro/UsbSerialDevice.h"
33 #include "plugins/usbpro/messages/UsbProConfigMessages.pb.h"
46 const std::string &name,
51 uint16_t firmware_version,
52 unsigned int fps_limit);
54 std::string
DeviceId()
const {
return m_serial; }
56 bool AllowMultiPortPatching()
const {
return true; }
59 const std::string &request,
60 std::string *response,
61 ConfigureCallback *done);
67 void UpdateParams(
bool status,
const usb_pro_parameters ¶ms);
70 const ola::plugin::usbpro::Request *request,
71 std::string *response,
72 ConfigureCallback *done);
75 std::string *response,
76 ConfigureCallback *done,
78 const usb_pro_parameters ¶ms);
81 const ola::plugin::usbpro::Request *request,
82 std::string *response,
83 ConfigureCallback *done);
85 UltraDMXProWidget *m_ultra_widget;
88 bool m_got_parameters;
104 const std::string &description)
106 m_description(description),
116 const std::string m_description;
129 const std::string &description,
131 unsigned int max_burst,
135 m_description(description),
137 m_bucket(max_burst, rate, max_burst, *wake_time),
138 m_wake_time(wake_time),
139 m_primary(primary) {}
142 if (m_bucket.GetToken(*m_wake_time)) {
143 return m_primary ? m_widget->SendDMX(buffer)
144 : m_widget->SendSecondaryDMX(buffer);
146 OLA_INFO <<
"Port rated limited, dropping frame";
154 const std::string m_description;
163 #endif // PLUGINS_USBPRO_ULTRADMXPRODEVICE_H_
std::string Description() const
Fetch the string description for a Port.
Definition: UltraDMXProDevice.h:151
Provides a wrapper for the DeviceManager and SelectServer objects so that the plugins can register de...
Definition: UltraDMXProDevice.h:124
Used to hold a single universe of DMX data.
Definition: DmxBuffer.h:49
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
#define OLA_INFO
Definition: Logging.h:81
A class used to hold a single universe of DMX data.
Definition: TokenBucket.h:29
std::string DeviceId() const
The device ID.
Definition: UltraDMXProDevice.h:54
#define OLA_UNUSED
Mark unused arguments & types.
Definition: Macro.h:62
Definition: PluginAdaptor.h:41
Definition: UsbSerialDevice.h:36
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
A RpcController object is passed every time an RPC is invoked and is used to indicate the success or ...
Definition: RpcController.h:42
bool WriteDMX(const DmxBuffer &buffer, uint8_t priority)
Write DMX data to this port.
Definition: UltraDMXProDevice.h:141
Definition: UltraDMXProDevice.h:42