Open Lighting Architecture  Latest Git
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
ola::plugin::artnet::ArtNetDevice Class Reference
Inheritance diagram for ola::plugin::artnet::ArtNetDevice:
Inheritance graph
[legend]
Collaboration diagram for ola::plugin::artnet::ArtNetDevice:
Collaboration graph
[legend]

Public Member Functions

 ArtNetDevice (AbstractPlugin *owner, class Preferences *preferences, class PluginAdaptor *plugin_adaptor)
 
std::string DeviceId () const
 The device ID. More...
 
void EnterConfigurationMode ()
 
void ExitConfigurationMode ()
 
void Configure (ola::rpc::RpcController *controller, const std::string &request, std::string *response, ConfigureCallback *done)
 
- Public Member Functions inherited from ola::Device
 Device (AbstractPlugin *owner, const std::string &name)
 
const std::string Name () const
 The name of this Device.
 
void SetName (const std::string &name)
 Sets the name of this Device.
 
AbstractPluginOwner () const
 The Plugin that owns this Device.
 
std::string UniqueId () const
 The unique id of this Device. More...
 
bool IsEnabled () const
 
bool Start ()
 Start the Device.
 
bool Stop ()
 Stop the Device.
 
bool AllowLooping () const
 Allow input and output ports to be patched to the same universe.
 
bool AllowMultiPortPatching () const
 Allow multiple ports of the same type to be patched to the same universe.
 
bool AddPort (InputPort *port)
 
bool AddPort (OutputPort *port)
 
void InputPorts (std::vector< InputPort *> *ports) const
 Fetch a list of all ports in this Device.
 
void OutputPorts (std::vector< OutputPort *> *ports) const
 
InputPortGetInputPort (unsigned int port_id) const
 Lookup a particular InputPort in this Device.
 
OutputPortGetOutputPort (unsigned int port_id) const
 Lookup a particular OutputPort in this Device.
 
void DeleteAllPorts ()
 Free all ports.
 

Static Public Attributes

static const char K_ALWAYS_BROADCAST_KEY [] = "always_broadcast"
 
static const char K_DEVICE_NAME [] = "Art-Net"
 
static const char K_IP_KEY [] = "ip"
 
static const char K_LIMITED_BROADCAST_KEY [] = "use_limited_broadcast"
 
static const char K_LONG_NAME_KEY [] = "long_name"
 
static const char K_LOOPBACK_KEY [] = "use_loopback"
 
static const char K_NET_KEY [] = "net"
 
static const char K_OUTPUT_PORT_KEY [] = "output_ports"
 
static const char K_SHORT_NAME_KEY [] = "short_name"
 
static const char K_SUBNET_KEY [] = "subnet"
 
static const unsigned int K_ARTNET_NET = 0
 
static const unsigned int K_ARTNET_SUBNET = 0
 
static const unsigned int K_DEFAULT_OUTPUT_PORT_COUNT = 4
 
static const unsigned int POLL_INTERVAL = 10000
 

Protected Member Functions

bool StartHook ()
 
void PrePortStop ()
 
void PostPortStop ()
 

Additional Inherited Members

- Public Types inherited from ola::AbstractDevice
typedef BaseCallback0< void > ConfigureCallback
 

Constructor & Destructor Documentation

◆ ArtNetDevice()

ola::plugin::artnet::ArtNetDevice::ArtNetDevice ( AbstractPlugin owner,
class Preferences preferences,
class PluginAdaptor plugin_adaptor 
)

Create a new Art-Net Device

Member Function Documentation

◆ Configure()

void ola::plugin::artnet::ArtNetDevice::Configure ( ola::rpc::RpcController controller,
const std::string &  request,
std::string *  response,
ConfigureCallback done 
)
virtual

Handle device config messages

Parameters
controllerAn RpcController
requestthe request data
responsethe response to return
donethe closure to call once the request is complete

Reimplemented from ola::Device.

◆ DeviceId()

std::string ola::plugin::artnet::ArtNetDevice::DeviceId ( ) const
inlinevirtual

The device ID.

Returns
an id which is unique within the plugin,

Implements ola::Device.

◆ PostPortStop()

void ola::plugin::artnet::ArtNetDevice::PostPortStop ( )
protectedvirtual

Stop this device

Reimplemented from ola::Device.

◆ PrePortStop()

void ola::plugin::artnet::ArtNetDevice::PrePortStop ( )
protectedvirtual

Stop this device. This is called before the ports are deleted

Reimplemented from ola::Device.

◆ StartHook()

bool ola::plugin::artnet::ArtNetDevice::StartHook ( )
protectedvirtual

Start this device

Returns
true on success, false on failure

Reimplemented from ola::Device.


The documentation for this class was generated from the following files: