#include <artnetevent.h>
Public Member Functions | |
ArtNetEvent ()=delete | |
ArtNetEvent (uint8 sequence, uint8 physical, uint16 portAddress) | |
void | setData (const uint8 *data, size_t size) |
uint8 | getSequence () const |
uint8 | getPhysical () const |
uint8 | getNet () const |
uint8 | getSubNet () const |
uint8 | getUniverse () const |
uint16 | getPortAddress () const |
size_t | getChannelCount () const |
const uint8 * | getChannelData () const |
uint8 | getChannelByNumber (uint16 number) const |
uint8 | getChannelByIndex (uint16 index) const |
uint8 | operator[] (uint16 index) |
const uint8 | operator[] (uint16 index) const |
![]() | |
virtual | ~Event ()=default |
Event ()=default | |
Event (const Event &)=delete | |
Event & | operator= (const Event &)=delete |
Represents a single received ArtDmx packet event, carrying a payload of zero-start code DMX512 data.
|
delete |
ArtNetEvent | ( | uint8 | sequence, |
uint8 | physical, | ||
uint16 | portAddress | ||
) |
ArtNetEvent constructor. Creates an ArtDmx packet event identified by a Sequence field, Physical field and Port-Address (which will be parsed to the Net, Sub-Net and Universe).
sequence | the Sequence field of the ArtDmx packet |
physical | the Physical field of the ArtDmx packet |
portAddress | the Port-Address of the ArtDmx packet |
Retrieve the 8-bit value of a single DMX512 channel by its 0-based channel index.
index | the 0-based index of the DMX512 channel, ranging from 0 to the return value of getChannelCount - 1 |
Retrieve the 8-bit value of a single DMX512 channel by its 1-based channel number.
number | the 1-based number of the DMX512 channel, ranging from 1 to the return value of getChannelCount |
size_t getChannelCount | ( | ) | const |
The amount of channels present in the DMX512 frame.
const uint8* getChannelData | ( | ) | const |
Get a pointer to the raw ArtDmx channel data
uint8 getNet | ( | ) | const |
A group of 16 consecutive Sub-Nets or 256 consecutive Universes is referred to as a Net. There are 128 Nets in total.
uint8 getPhysical | ( | ) | const |
The Physical field is an 8-bit number that defines the physical port that generated the packet. This number is limited to the range 0 to 3. It is intended to be purely informative and is not used to define the destination of the packet.
uint16 getPortAddress | ( | ) | const |
One of the 32,768 possible addresses to which a DMX frame can be directed. The Port-Address is a 15-bit number composed of Net + Sub-Net + Universe.
uint8 getSequence | ( | ) | const |
The Sequence field is an 8-bit number that is designed to show the order in which packets were originated. When Art-Net is transferred over media such as the Internet, it is possible for packets to arrive at their destination out of sequence. This field allows the receiver to trap such errors. The generating device increments this number for every packet sent to a specific Port-Address. The number increments from 1 to 255 and then rolls over to 1 and repeats. This is because the value 0 is reserved to show that Sequence is not implemented.
uint8 getSubNet | ( | ) | const |
A group of 16 consecutive Universes is referred to as a Sub-Net.
uint8 getUniverse | ( | ) | const |
A single DMX512 frame of 512 channels.
Retrieve the 8-bit value of a single DMX512 channel by its 0-based channel index.
index | the 0-based index of the DMX512 channel, ranging from 0 to the return value of getChannelCount - 1 |
Retrieve the 8-bit value of a single DMX512 channel by its 0-based channel index.
index | the 0-based index of the DMX512 channel, ranging from 0 to the return value of getChannelCount - 1 |
void setData | ( | const uint8 * | data, |
size_t | size | ||
) |
Sets the DMX512 channels for this ArtDmx packet.
data | pointer to the raw data buffer |
size | the length of the data buffer in bytes |