21 #ifndef PLUGINS_ARTNET_ARTNETDEVICE_H_
22 #define PLUGINS_ARTNET_ARTNETDEVICE_H_
26 #include "olad/Device.h"
27 #include "plugins/artnet/messages/ArtnetConfigMessages.pb.h"
28 #include "plugins/artnet/ArtNetNode.h"
37 using google::protobuf::RpcController;
39 using ola::plugin::artnet::Request;
49 string DeviceId()
const {
return "1"; }
51 void EnterConfigurationMode() { m_node->EnterConfigurationMode(); }
52 void ExitConfigurationMode() { m_node->ExitConfigurationMode(); }
54 void Configure(RpcController *controller,
55 const string &request,
57 google::protobuf::Closure *done);
59 static const char K_ALWAYS_BROADCAST_KEY[];
60 static const char K_DEVICE_NAME[];
61 static const char K_IP_KEY[];
62 static const char K_LIMITED_BROADCAST_KEY[];
63 static const char K_LONG_NAME_KEY[];
64 static const char K_LOOPBACK_KEY[];
65 static const char K_NET_KEY[];
66 static const char K_OUTPUT_PORT_KEY[];
67 static const char K_SHORT_NAME_KEY[];
68 static const char K_SUBNET_KEY[];
70 static const unsigned int POLL_INTERVAL = 10000;
81 ola::thread::timeout_id m_timeout_id;
83 void HandleOptions(Request *request,
string *response);
84 void HandleNodeList(Request *request,
86 RpcController *controller);
91 #endif // PLUGINS_ARTNET_ARTNETDEVICE_H_