Provides a common interface to various DMX devices.
More...
#include <DMXInterface.h>
|
string | m_ifaceName |
| Name of the DMX interface.
|
|
string | m_ifaceId |
| Unique string identifying this particular interface.
|
|
Provides a common interface to various DMX devices.
Adding a new type of DMX device should be simple. Just derive from this class and implement the required functions. Interfaces for a DMX system are expected to take a 512 byte buffer and send it across the network. Interfaces should be able to be initialized, closed and reset. Any additional functions must be handled specifically by subclasses.
string Lumiverse::DMXInterface::getInterfaceId |
( |
| ) |
|
|
inline |
Returns the ID of this DMX interface.
- Returns
- Unique identifier for this interface
string Lumiverse::DMXInterface::getInterfaceName |
( |
| ) |
|
|
inline |
Returns the name of this DMX interface.
Note that name is not the same as Interface Type. The intent behind name is to allow users to choose a common name to display for their interfaces and still be able to use unique IDs to differentiate them.
- Returns
- Human-readable name for this particular interface.
virtual string Lumiverse::DMXInterface::getInterfaceType |
( |
| ) |
|
|
pure virtual |
Returns the name of the interface's type.
The type of the interface referrs to what kind of device it is. So for a DMX Pro 2 Interface, this would return "DMXPro2Interface"
- Returns
- String containing the type of the interface.
virtual void Lumiverse::DMXInterface::init |
( |
| ) |
|
|
pure virtual |
Initalizes the interface.
This function can throw exceptions if something comes up during the initialization stage.
virtual void Lumiverse::DMXInterface::reset |
( |
| ) |
|
|
pure virtual |
Resets the interface.
Is essentially a disconnect then reconnect and any other refresher code needed.
virtual void Lumiverse::DMXInterface::sendDMX |
( |
unsigned char * |
data, |
|
|
unsigned int |
universe |
|
) |
| |
|
pure virtual |
Sends DMX through the interface.
Also includes the universe number, for devices that may manage more than one universe or need to know the universe number. NOTE: The universe passed in here is ZERO-INDEXED as it is in the DMXPatch class.
- Parameters
-
data | Data to send across the Universe |
universe | Universe number to send the DMX to |
void Lumiverse::DMXInterface::setInterfaceId |
( |
string |
id | ) |
|
|
inline |
Sets the interface ID.
- Parameters
-
virtual JSONNode Lumiverse::DMXInterface::toJSON |
( |
| ) |
|
|
pure virtual |
Returns the JSON representation of the interface.
- Returns
- JSON node containing the data for this DMXInterface
The documentation for this class was generated from the following file: