[][src]Struct artnet_protocol::Output

pub struct Output {
    pub version: [u8; 2],
    pub sequence: u8,
    pub physical: u8,
    pub subnet: u16,
    pub length: u16,
    pub data: Vec<u8>,
}

ArtDmx is the data packet used to transfer DMX512 data. The format is identical for Node to Controller, Node to Node and Controller to Node.

The Data is output through the DMX O/P port corresponding to the Universe setting. In the absence of received ArtDmx packets, each DMX O/P port re-transmits the same frame continuously.

The first complete DMX frame received at each input port is placed in an ArtDmx packet as above and transmitted as an ArtDmx packet containing the relevant Universe parameter. Each subsequent DMX frame containing new data (different length or different contents) is also transmitted as an ArtDmx packet.

Nodes do not transmit ArtDmx for DMX512 inputs that have not received data since power on.

However, an input that is active but not changing, will re-transmit the last valid ArtDmx packet at approximately 4-second intervals. (Note. In order to converge the needs of ArtNet and sACN it is recommended that Art-Net devices actually use a re-transmit time of 800mS to 1000mS).

A DMX input that fails will not continue to transmit ArtDmx data.

Fields

version: [u8; 2]

Determines which version the server has. Will be ARTNET_PROTOCOL_VERSION by default

sequence: u8

The sequence number is used to ensure that ArtDmx packets are used in the correct order. When Art-Net is carried over a medium such as the Internet, it is possible that ArtDmx packets will reach the receiver out of order. This field is incremented in the range 0x01 to 0xff to allow the receiving node to resequence packets.

The Sequence field is set to 0x00 to disable this feature

physical: u8

The physical input port from which DMX512 data was input. This field is for information only. Use Universe for data routing

subnet: u16

The 15 bit Port-Address to which this packet is destined

length: u16

The length of the DMX512 data array. This value should be an even number in the range 2 – 512.

It represents the number of DMX512 channels encoded in packet. NB: Products which convert Art-Net to DMX512 may opt to always send 512 channels.

data: Vec<u8>

A variable length array of DMX512 lighting data

Methods

impl Output[src]

pub fn to_bytes(&self) -> Result<Vec<u8>>[src]

Convert this struct to a byte array.

pub fn from(data: &[u8]) -> Result<Output>[src]

Convert a byte array to an instance of this struct.

Trait Implementations

impl Default for Output[src]

impl Debug for Output[src]

Auto Trait Implementations

impl Sync for Output

impl Send for Output

impl Unpin for Output

impl RefUnwindSafe for Output

impl UnwindSafe for Output

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]