Open Lighting Architecture: ola::plugin::artnet Namespace Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions | Variables
ola::plugin::artnet Namespace Reference

## Detailed Description

The ArtNet plugin.

An Art-Net device is an instance of libartnet bound to a single IP address Art-Net is limited to four ports per direction per IP, so in this case our device has 8 ports :

IDs 0-3 : Input ports (recv DMX) IDs 4-7 : Output ports (send DMX)

## Classes
class | ArtNetDevice
class | ArtNetNodeOptions
class | ArtNetNodeImpl
class | ArtNetNodeImplRDMWrapper
class | ArtNetNode
| The actual ArtNet Node. More...
struct | artnet_packet
class | ArtNetPlugin
class | ArtNetInputPort
class | ArtNetOutputPort
class | RpcController
| A RpcController object is passed every time an RPC is invoked and is used to indicate the success or failure of the RPC. More...
class | IPV4Address
| Represents a IPv4 Address. More...
class | auto_ptr
| STL class. More...
class | ostringstream
| STL class. More...
class | string
| STL class. More...
class | vector
| STL class. More...
class | Callback0
| A 0 argument callback which can be called multiple times. More...
class | Callback1
| A 1 argument callback which can be called multiple times. More...
class | IPV4SocketAddress
| An IPv4 SocketAddress. More...
class | UDPSocket
class | RDMCommand
| The base class that all RDM requests & responses inherit from. More...
class | RDMCommandSerializer
| Serializes RDMCommands. More...
class | RDMFrame
| The raw data for a RDM message and its associated timing information. More...
struct | RDMReply
| Holds the final state of an RDM request. More...
class | RDMRequest
| RDM Commands that represent requests (GET, SET or DISCOVER). More...
class | UID
| Represents a RDM UID. More...
class | UIDSet
| Represents a set of RDM UIDs. More...
class | map
| STL class. More...
class | pair
| STL class. More...
class | set
| STL class. More...

## Typedefs
typedef map< UID, std::pair< IPV4Address, uint8_t > > | uid_map
typedef enum ola::plugin::artnet::artnet_packet_type_e | artnet_packet_type
typedef struct artnet_poll_s | artnet_poll_t
typedef struct artnet_reply_s | artnet_reply_t
typedef struct artnet_timecode_s | artnet_timecode_t
typedef struct artnet_dmx_s | artnet_dmx_t
typedef struct artnet_todrequest_s | artnet_todrequest_t
typedef struct artnet_toddata_s | artnet_toddata_t
typedef struct artnet_todcontrol_s | artnet_todcontrol_t
typedef struct artnet_rdm_s | artnet_rdm_t
typedef struct artnet_ip_prog_s | artnet_ip_prog_t
typedef struct artnet_ip_reply_s | artnet_ip_reply_t
typedef ola::BaseCallback1< void, RDMReply * > | RDMCallback
| The callback run when a RDM request completes.
typedef ola::BaseCallback1< void, const ola::rdm::UIDSet & > | RDMDiscoveryCallback
| The callback run when a discovery operation completes.

## Enumerations
enum | artnet_port_type { ARTNET_INPUT_PORT , ARTNET_OUTPUT_PORT }
enum | artnet_merge_mode { ARTNET_MERGE_HTP , ARTNET_MERGE_LTP }
enum | { ARTNET_LONG_NAME_LENGTH = 64 }
enum | { ARTNET_MAX_PORTS = ARTNET_PORT_COUNT }
enum | { ARTNET_MAX_RDM_ADDRESS_COUNT = 32 }
enum | { ARTNET_MAX_RDM_DATA = 512 }
enum | { ARTNET_MAX_UID_COUNT = 200 }
enum | { ARTNET_REPORT_LENGTH = 64 }
enum | { ARTNET_SHORT_NAME_LENGTH = 18 }
enum | artnet_packet_type_e { ARTNET_POLL = 0x2000 , ARTNET_REPLY = 0x2100 , ARTNET_DMX = 0x5000 , ARTNET_SYNC = 0x5200 , ARTNET_TODREQUEST = 0x8000 , ARTNET_TODDATA = 0x8100 , ARTNET_TODCONTROL = 0x8200 , ARTNET_RDM = 0x8300 , ARTNET_RDM_SUB = 0x8400 , ARTNET_TIME_CODE = 0x9700 , ARTNET_IP_PROGRAM = 0xf800 , ARTNET_IP_PROGRAM_REPLY = 0xf900 }

## Functions
| PACK (struct artnet_poll_s { uint16_t version;uint8_t talk_to_me;uint8_t priority;})
| PACK (struct artnet_reply_s { uint8_t ip[ola::network::IPV4Address::LENGTH];uint16_t port;uint16_t version;uint8_t net_address;uint8_t subnet_address;uint16_t oem;uint8_t ubea;uint8_t status1;uint16_t esta_id;char short_name[ARTNET_SHORT_NAME_LENGTH];char long_name[ARTNET_LONG_NAME_LENGTH];char node_report[ARTNET_REPORT_LENGTH];uint8_t number_ports[2];uint8_t port_types[ARTNET_MAX_PORTS];uint8_t good_input[ARTNET_MAX_PORTS];uint8_t good_output[ARTNET_MAX_PORTS];uint8_t sw_in[ARTNET_MAX_PORTS];uint8_t sw_out[ARTNET_MAX_PORTS];uint8_t sw_video;uint8_t sw_macro;uint8_t sw_remote;uint8_t spare1;uint8_t spare2;uint8_t spare3;uint8_t style;uint8_t mac[ola::network::MACAddress::LENGTH];uint8_t bind_ip[ola::network::IPV4Address::LENGTH];uint8_t bind_index;uint8_t status2;uint8_t filler[26];})
| PACK (struct artnet_timecode_s { uint16_t version;uint8_t filler;uint8_t filler2;uint8_t frames;uint8_t seconds;uint8_t minutes;uint8_t hours;uint8_t type;})
| PACK (struct artnet_dmx_s { uint16_t version;uint8_t sequence;uint8_t physical;uint8_t universe;uint8_t net;uint8_t length[2];uint8_t data[DMX_UNIVERSE_SIZE];})
| PACK (struct artnet_todrequest_s { uint16_t version;uint8_t filler1;uint8_t filler2;uint8_t spare1;uint8_t spare2;uint8_t spare3;uint8_t spare4;uint8_t spare5;uint8_t spare6;uint8_t spare7;uint8_t net;uint8_t command;uint8_t address_count;uint8_t addresses[ARTNET_MAX_RDM_ADDRESS_COUNT];})
| PACK (struct artnet_toddata_s { uint16_t version;uint8_t rdm_version;uint8_t port;uint8_t spare1;uint8_t spare2;uint8_t spare3;uint8_t spare4;uint8_t spare5;uint8_t spare6;uint8_t spare7;uint8_t net;uint8_t command_response;uint8_t address;uint16_t uid_total;uint8_t block_count;uint8_t uid_count;uint8_t tod[ARTNET_MAX_UID_COUNT][ola::rdm::UID::UID_SIZE];})
| PACK (struct artnet_todcontrol_s { uint16_t version;uint8_t filler1;uint8_t filler2;uint8_t spare1;uint8_t spare2;uint8_t spare3;uint8_t spare4;uint8_t spare5;uint8_t spare6;uint8_t spare7;uint8_t net;uint8_t command;uint8_t address;})
| PACK (struct artnet_rdm_s { uint16_t version;uint8_t rdm_version;uint8_t filler2;uint8_t spare1;uint8_t spare2;uint8_t spare3;uint8_t spare4;uint8_t spare5;uint8_t spare6;uint8_t spare7;uint8_t net;uint8_t command;uint8_t address;uint8_t data[ARTNET_MAX_RDM_DATA];})
| PACK (struct artnet_ip_prog_s { uint16_t version;uint16_t filler;uint8_t command;uint8_t filler1;uint8_t ip[ola::network::IPV4Address::LENGTH];uint8_t subnet[ola::network::IPV4Address::LENGTH];uint16_t port;uint8_t spare[8];})
| PACK (struct artnet_ip_reply_s { uint16_t version;uint16_t filler;uint8_t command;uint8_t filler1;uint8_t ip[ola::network::IPV4Address::LENGTH];uint8_t subnet[ola::network::IPV4Address::LENGTH];uint16_t port;uint8_t spare[8];})
bool | StringToInt (const std::string &value, unsigned int *output, bool strict=false)
| Convert a string to a unsigned int.
uint16_t | HostToLittleEndian (uint16_t value)
| 16-bit unsigned host to little endian conversion.
uint16_t | HostToNetwork (uint16_t value)
| 16-bit unsigned host to network conversion.
uint16_t | LittleEndianToHost (uint16_t value)
| 16-bit unsigned little endian to host conversion.
uint16_t | NetworkToHost (uint16_t value)
| 16-bit unsigned network to host conversion.
void | RunRDMCallback (RDMCallback *callback, RDMStatusCode status_code)
| A helper message to run a RDMCallback with the given status code.
void | CopyToFixedLengthBuffer (const std::string &input, char *buffer, unsigned int size)
| Copy a string to a fixed length buffer without NULL terminating.
template<typename T>
_ToHex< T > | ToHex (T v, bool prefix=true)
| Convert a value to a hex string.
template<typename ReturnType>
Callback0< ReturnType > * | NewCallback (ReturnType(*callback)())
| A helper function to create a new Callback with 0 create-time arguments and 0 execution time arguments.

## Variables
static const uint8_t | ARTNET_DISABLE_PORT = 0xf0

## Typedef Documentation

## ◆ RDMCallback

typedef ola::BaseCallback1<void, RDMReply*> ola::rdm::RDMCallback

The callback run when a RDM request completes.

Template Parameters

  reply | The RDMReply object. The reply object is valid for the duration of the call.

The RDMReply is not const, since some stages of the pipeline may need to rewrite the UID / Transaction Number.

For performance reasons this can be either a single use callback or a permanent callback.

## ◆ RDMDiscoveryCallback

typedef ola::BaseCallback1<void, const ola::rdm::UIDSet&> ola::rdm::RDMDiscoveryCallback

The callback run when a discovery operation completes.

Template Parameters

  UIDSet | The UIDs that were discovered.

## Function Documentation

## ◆ CopyToFixedLengthBuffer()

void ola::strings::CopyToFixedLengthBuffer | ( | const std::string & | input,
|  | char * | buffer,
|  | unsigned int | size )

Copy a string to a fixed length buffer without NULL terminating.

Parameters

  input | The string to copy to the buffer.
  buffer | The memory location to copy the contents of the string to.
  size | The size of the memory buffer.

Note
  The buffer may not be NULL terminated, it's not safe to use functions like strlen(), printf() etc. on the result. This is typically used in RDM code.

## ◆ NewCallback()

template<typename ReturnType>

Callback0< ReturnType > * ola::NewCallback | ( | ReturnType(* | callback )() | ) |
| inline

A helper function to create a new Callback with 0 create-time arguments and 0 execution time arguments.

Template Parameters

  ReturnType | the return type of the callback.

Parameters

  callback | the function pointer to use when executing the callback.

Returns
  The same return value as the function.

## ◆ RunRDMCallback()

void ola::rdm::RunRDMCallback | ( | RDMCallback * | callback,
|  | RDMStatusCode | status_code )
| inline

A helper message to run a RDMCallback with the given status code.

Parameters

  callback | The RDMCallback to run.
  status_code | The status code to use in the RDMReply.

## ◆ StringToInt()

bool ola::StringToInt | ( | const string & | value,
|  | unsigned int * | output,
|  | bool | strict = false )

Convert a string to a unsigned int.

Parameters

  [in] | value | the string to convert
  [out] | output | a pointer where the value will be stored.
  [in] | strict | this controls if trailing characters produce an error.

Returns
  true if the value was converted, false if the string was not an int or the value was too large / small for the type.

## ◆ ToHex()

template<typename T>

_ToHex< T > ola::strings::ToHex | ( | T | v,
|  | bool | prefix = true )

Convert a value to a hex string.

Automatic constructor for _ToHex that deals with widths

Template Parameters

  T | the type of value to convert

Parameters

  v | the value to convert
  prefix | show the 0x prefix

Returns
  A _ToHex struct representing the value, output it to an ostream to use it.

Note
  We only currently support unsigned ints due to a lack of requirement for anything else