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; }
59 const std::string &request,
60 std::string *response,
70 const ola::plugin::usbpro::Request *request,
71 std::string *response,
75 std::string *response,
81 const ola::plugin::usbpro::Request *request,
82 std::string *response,
88 bool m_got_parameters;
104 const std::string &description)
106 m_description(description),
110 return m_widget->FetchDMX();
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_ Definition: GenericUsbProWidget.h:36
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
std::string Description() const
Fetch the string description for a Port.
Definition: UltraDMXProDevice.h:151
#define OLA_INFO
Definition: Logging.h:83
A class used to hold a single universe of DMX data.
Definition: TokenBucket.h:29
#define OLA_UNUSED
Mark unused arguments & types.
Definition: Macro.h:62
Definition: PluginAdaptor.h:41
Definition: UsbSerialDevice.h:36
void Configure(ola::rpc::RpcController *controller, const std::string &request, std::string *response, ConfigureCallback *done)
Configure this Device.
Definition: UltraDMXProDevice.cpp:136
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
std::string DeviceId() const
The device ID.
Definition: UltraDMXProDevice.h:54
Represents a point in time with microsecond accuracy.
Definition: Clock.h:191
bool WriteDMX(const DmxBuffer &buffer, uint8_t priority)
Write DMX data to this port.
Definition: UltraDMXProDevice.h:141
bool AllowMultiPortPatching() const
Allow multiple ports of the same type to be patched to the same universe.
Definition: UltraDMXProDevice.h:56
Definition: UltraDMXProDevice.h:42