Open Lighting Architecture  Latest Git
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
ola::plugin::osc::OSCDevice Class Reference
Inheritance diagram for ola::plugin::osc::OSCDevice:
Inheritance graph
[legend]
Collaboration diagram for ola::plugin::osc::OSCDevice:
Collaboration graph
[legend]

Classes

struct  PortConfig
 

Public Types

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

Public Member Functions

 OSCDevice (AbstractPlugin *owner, PluginAdaptor *plugin_adaptor, uint16_t udp_port, const std::vector< std::string > &addresses, const PortConfigs &port_configs)
 
std::string DeviceId () const
 The device ID. More...
 
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.
 
- 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 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.
 
virtual void Configure (ola::rpc::RpcController *controller, const std::string &request, std::string *response, ConfigureCallback *done)
 Configure this Device.
 

Protected Member Functions

bool StartHook ()
 Called during Start(). More...
 
- Protected Member Functions inherited from ola::Device
virtual void PrePortStop ()
 
virtual void PostPortStop ()
 

Protected Attributes

PluginAdaptorm_plugin_adaptor
 
const std::vector< std::string > m_port_addresses
 
const PortConfigs m_port_configs
 
std::auto_ptr< class OSCNodem_osc_node
 

Static Protected Attributes

static const char DEVICE_NAME [] = "OSC Device"
 

Constructor & Destructor Documentation

ola::plugin::osc::OSCDevice::OSCDevice ( AbstractPlugin owner,
PluginAdaptor plugin_adaptor,
uint16_t  udp_port,
const std::vector< std::string > &  addresses,
const PortConfigs &  port_configs 
)

Constructor for the OSCDevice

Parameters
ownerthe plugin which created this device
plugin_adaptora pointer to a PluginAdaptor object
udp_portthe UDP port to listen on
addressesa list of strings to use as OSC addresses for the input ports.
port_configsconfig to use for the ports

Member Function Documentation

std::string ola::plugin::osc::OSCDevice::DeviceId ( ) const
inlinevirtual

The device ID.

Returns
an id which is unique within the plugin,

Implements ola::Device.

bool ola::plugin::osc::OSCDevice::StartHook ( )
protectedvirtual

Called during Start().

This allows the subclass to perform device initialization.

Reimplemented from ola::Device.


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