Open Lighting Architecture
Latest Git
|
Classes | |
class | InputPort |
Public Member Functions | |
ArtNetNodeImpl (const ola::network::Interface &iface, ola::io::SelectServerInterface *ss, const ArtNetNodeOptions &options, ola::network::UDPSocketInterface *socket=NULL) | |
Create a new node. More... | |
virtual | ~ArtNetNodeImpl () |
Cleanup. | |
bool | Start () |
Start this node. The port modifying functions can be called before this. | |
bool | Stop () |
Stop this node. | |
bool | EnterConfigurationMode () |
Start the configuration transaction. More... | |
bool | ExitConfigurationMode () |
End the configuration transaction. More... | |
bool | SetShortName (const std::string &name) |
Set the short name. More... | |
std::string | ShortName () const |
bool | SetLongName (const std::string &name) |
Set the long name. More... | |
std::string | LongName () const |
bool | SetNetAddress (uint8_t net_address) |
Set the net address for this node. More... | |
uint8_t | NetAddress () const |
bool | SetSubnetAddress (uint8_t subnet_address) |
Set the subnet address for this node. More... | |
uint8_t | SubnetAddress () const |
uint8_t | InputPortCount () const |
bool | SetInputPortUniverse (uint8_t port_id, uint8_t universe_id) |
uint8_t | GetInputPortUniverse (uint8_t port_id) const |
Get an input port universe address. More... | |
void | DisableInputPort (uint8_t port_id) |
Disable an input port. More... | |
bool | InputPortState (uint8_t port_id) const |
Check the state of an input port. More... | |
bool | SetOutputPortUniverse (uint8_t port_id, uint8_t universe_id) |
Set the universe for an output port. More... | |
uint8_t | GetOutputPortUniverse (uint8_t port_id) |
void | DisableOutputPort (uint8_t port_id) |
Disable an output port. More... | |
bool | OutputPortState (uint8_t port_id) const |
Check the state of an output port. More... | |
void | SetBroadcastThreshold (unsigned int threshold) |
bool | SetMergeMode (uint8_t port_id, artnet_merge_mode merge_mode) |
Set the merge mode for an output port. More... | |
bool | SendPoll () |
Send an ArtPoll if any of the ports are sending data. More... | |
bool | SendDMX (uint8_t port_id, const ola::DmxBuffer &buffer) |
Send some DMX data. More... | |
void | RunFullDiscovery (uint8_t port_id, ola::rdm::RDMDiscoveryCallback *callback) |
Flush the TOD and force a full discovery. More... | |
void | RunIncrementalDiscovery (uint8_t port_id, ola::rdm::RDMDiscoveryCallback *callback) |
Run an 'incremental' discovery. This just involves fetching the TOD from all nodes. More... | |
void | SendRDMRequest (uint8_t port_id, ola::rdm::RDMRequest *request, ola::rdm::RDMCallback *on_complete) |
Send an RDMRequest on this port. More... | |
bool | SetUnsolicitedUIDSetHandler (uint8_t port_id, ola::Callback1< void, const ola::rdm::UIDSet &> *on_tod) |
Set the RDM handlers for an Input port. More... | |
void | GetSubscribedNodes (uint8_t port_id, std::vector< ola::network::IPV4Address > *node_addresses) |
Get the nodes listening to the universe a port is sending. More... | |
bool | SetDMXHandler (uint8_t port_id, DmxBuffer *buffer, ola::Callback0< void > *handler) |
Set the closure to be called when we receive data for this universe. More... | |
bool | SendTod (uint8_t port_id, const ola::rdm::UIDSet &uid_set) |
Send an set of UIDs in one of more ArtTod packets. More... | |
bool | SetOutputPortRDMHandlers (uint8_t port_id, ola::Callback0< void > *on_discover, ola::Callback0< void > *on_flush, ola::Callback2< void, ola::rdm::RDMRequest *, ola::rdm::RDMCallback *> *on_rdm_request) |
Set the RDM handlers for an Output port. | |
bool | SendTimeCode (const ola::timecode::TimeCode &timecode) |
Send a timecode packet. | |
ola::plugin::artnet::ArtNetNodeImpl::ArtNetNodeImpl | ( | const ola::network::Interface & | iface, |
ola::io::SelectServerInterface * | ss, | ||
const ArtNetNodeOptions & | options, | ||
ola::network::UDPSocketInterface * | socket = NULL |
||
) |
Create a new node.
iface | the interface to use. |
ss | a pointer to a SelectServerInterface to use |
options | the ArtNetNodeOptions for the node. |
socket | a pointer to a UDPSocketInterface to use |
void ola::plugin::artnet::ArtNetNodeImpl::DisableInputPort | ( | uint8_t | port_id | ) |
Disable an input port.
port_id | a port id between 0 and ARTNET_MAX_PORTS - 1 |
void ola::plugin::artnet::ArtNetNodeImpl::DisableOutputPort | ( | uint8_t | port_id | ) |
Disable an output port.
port_id | a port id between 0 and ARTNET_MAX_PORTS - 1 |
bool ola::plugin::artnet::ArtNetNodeImpl::EnterConfigurationMode | ( | ) |
Start the configuration transaction.
Configuration mode allows the caller to make changes without triggering an ArtPoll or ArtPollReply per change. e.g.
bool ola::plugin::artnet::ArtNetNodeImpl::ExitConfigurationMode | ( | ) |
End the configuration transaction.
uint8_t ola::plugin::artnet::ArtNetNodeImpl::GetInputPortUniverse | ( | uint8_t | port_id | ) | const |
Get an input port universe address.
Return the 8bit universe address for a port. This does not include the Art-Net III net-address.
port_id | a port id between 0 and ARTNET_MAX_PORTS - 1 |
uint8_t ola::plugin::artnet::ArtNetNodeImpl::GetOutputPortUniverse | ( | uint8_t | port_id | ) |
Return the current universe address for an output port
port_id | a port id between 0 and ARTNET_MAX_PORTS - 1 |
void ola::plugin::artnet::ArtNetNodeImpl::GetSubscribedNodes | ( | uint8_t | port_id, |
std::vector< ola::network::IPV4Address > * | node_addresses | ||
) |
Get the nodes listening to the universe a port is sending.
Populate the vector with a list of IP addresses that are known to be listening for the universe that this port is sending
port_id | the id of the port to fetch nodes for | |
[out] | node_addresses | a vector of nodes listening to the port |
uint8_t ola::plugin::artnet::ArtNetNodeImpl::InputPortCount | ( | ) | const |
Get the number of input ports
bool ola::plugin::artnet::ArtNetNodeImpl::InputPortState | ( | uint8_t | port_id | ) | const |
Check the state of an input port.
port_id | a port id between 0 and ARTNET_MAX_PORTS - 1 |
bool ola::plugin::artnet::ArtNetNodeImpl::OutputPortState | ( | uint8_t | port_id | ) | const |
Check the state of an output port.
port_id | a port id between 0 and ARTNET_MAX_PORTS - 1 |
void ola::plugin::artnet::ArtNetNodeImpl::RunFullDiscovery | ( | uint8_t | port_id, |
ola::rdm::RDMDiscoveryCallback * | callback | ||
) |
Flush the TOD and force a full discovery.
The DiscoverableQueueingRDMController ensures this is only called one at a time.
port_id | port to discover on |
callback | the RDMDiscoveryCallback to run when discovery completes |
void ola::plugin::artnet::ArtNetNodeImpl::RunIncrementalDiscovery | ( | uint8_t | port_id, |
ola::rdm::RDMDiscoveryCallback * | callback | ||
) |
Run an 'incremental' discovery. This just involves fetching the TOD from all nodes.
The DiscoverableQueueingRDMController ensures only one discovery process is running per port at any time.
port_id | port to send on |
callback | the RDMDiscoveryCallback to run when discovery completes |
bool ola::plugin::artnet::ArtNetNodeImpl::SendDMX | ( | uint8_t | port_id, |
const ola::DmxBuffer & | buffer | ||
) |
Send some DMX data.
port_id | port to send on |
buffer | the DMX data |
bool ola::plugin::artnet::ArtNetNodeImpl::SendPoll | ( | ) |
Send an ArtPoll if any of the ports are sending data.
This should be called periodically if we're sending data.
void ola::plugin::artnet::ArtNetNodeImpl::SendRDMRequest | ( | uint8_t | port_id, |
ola::rdm::RDMRequest * | request, | ||
ola::rdm::RDMCallback * | on_complete | ||
) |
Send an RDMRequest on this port.
This may defer the sending if there are other outstanding messages in the queue.
port_id | the id of the port to send the request on |
request | the RDMRequest object |
on_complete | the RDMCallback to run |
Because this is wrapped in the QueueingRDMController this will only be called one-at-a-time (per port)
bool ola::plugin::artnet::ArtNetNodeImpl::SendTod | ( | uint8_t | port_id, |
const ola::rdm::UIDSet & | uid_set | ||
) |
Send an set of UIDs in one of more ArtTod packets.
port_id | the id of the port to send on |
uid_set | the UIDSet to send |
bool ola::plugin::artnet::ArtNetNodeImpl::SetDMXHandler | ( | uint8_t | port_id, |
DmxBuffer * | buffer, | ||
ola::Callback0< void > * | handler | ||
) |
bool ola::plugin::artnet::ArtNetNodeImpl::SetInputPortUniverse | ( | uint8_t | port_id, |
uint8_t | universe_id | ||
) |
Set the universe address of an input port
bool ola::plugin::artnet::ArtNetNodeImpl::SetLongName | ( | const std::string & | name | ) |
Set the long name.
name | the long node name |
bool ola::plugin::artnet::ArtNetNodeImpl::SetMergeMode | ( | uint8_t | port_id, |
artnet_merge_mode | merge_mode | ||
) |
Set the merge mode for an output port.
port_id | a port id between 0 and ARTNET_MAX_PORTS - 1 |
merge_mode | the artnet_merge_mode |
bool ola::plugin::artnet::ArtNetNodeImpl::SetNetAddress | ( | uint8_t | net_address | ) |
Set the net address for this node.
net_address | the Art-Net 'net' address |
bool ola::plugin::artnet::ArtNetNodeImpl::SetOutputPortUniverse | ( | uint8_t | port_id, |
uint8_t | universe_id | ||
) |
Set the universe for an output port.
port_id | a port id between 0 and ARTNET_MAX_PORTS - 1 |
universe_id | the new universe id. |
bool ola::plugin::artnet::ArtNetNodeImpl::SetShortName | ( | const std::string & | name | ) |
Set the short name.
name | the short node name |
bool ola::plugin::artnet::ArtNetNodeImpl::SetSubnetAddress | ( | uint8_t | subnet_address | ) |
Set the subnet address for this node.
subnet_address | the Art-Net 'subnet' address, 4 bits. |
bool ola::plugin::artnet::ArtNetNodeImpl::SetUnsolicitedUIDSetHandler | ( | uint8_t | port_id, |
ola::Callback1< void, const ola::rdm::UIDSet &> * | on_tod | ||
) |
Set the RDM handlers for an Input port.
port_id | the id of the port to set the handlers for |
on_tod | the callback to be invoked when a ArtTod message is received, and the RDM process isn't running. |