pub struct PollReply {
Show 26 fields pub address: Ipv4Addr, pub port: u16, pub version: [u8; 2], pub port_address: [u8; 2], pub oem: [u8; 2], pub ubea_version: u8, pub status_1: u8, pub esta_code: u16, pub short_name: [u8; 18], pub long_name: [u8; 64], pub node_report: [u8; 64], pub num_ports: [u8; 2], pub port_types: [u8; 4], pub good_input: [u8; 4], pub good_output: [u8; 4], pub swin: [u8; 4], pub swout: [u8; 4], pub sw_video: u8, pub sw_macro: u8, pub sw_remote: u8, pub style: u8, pub mac: [u8; 6], pub bind_ip: [u8; 4], pub bind_index: u8, pub status_2: u8, pub filler: [u8; 26], /* private fields */
}
Expand description

Gets send by the nodes in the network as a response to the Poll message

Fields§

§address: Ipv4Addr

The IP address of the node

§port: u16

The port of the node, should always be 0x1936 / 6454

§version: [u8; 2]

The version of the node

§port_address: [u8; 2]

Bits 14-8 of the 15 bit Port-Address are encoded into the bottom 7 bits of the first byte. This is used in combination with SubSwitch and SwIn[] or SwOut[] to produce the full universe address.

Bits 7-4 of the 15 bit Port-Address are encoded into the bottom 4 bits of the second byte. This is used in combination with NetSwitch and SwIn[] or SwOut[] to produce the full universe address

§oem: [u8; 2]

The Oem word describes the equipment vendor and the feature set available. Bit 15 high indicates extended features available

§ubea_version: u8

This field contains the firmware version of the User Bios Extension Area (UBEA). If the UBEA is not programmed, this field contains zero.

§status_1: u8

General Status register. Will be expanded on in the future.

§esta_code: u16

The ESTA manufacturer code. These codes are used to represent equipment manufacturer. They are assigned by ESTA. This field can be interpreted as two ASCII bytes representing the manufacturer initials.

§short_name: [u8; 18]

The array represents a null terminated short name for the Node. The Controller uses the ArtAddress packet to program this string. Max length is 17 characters plus the null. This is a fixed length field, although the string it contains can be shorter than the field.

§long_name: [u8; 64]

The array represents a null terminated long name for the Node. The Controller uses the ArtAddress packet to program this string. Max length is 63 characters plus the null. This is a fixed length field, although the string it contains can be shorter than the field.

§node_report: [u8; 64]

The array is a textual report of the Node’s operating status or operational errors. It is primarily intended for ‘engineering’ data rather than ‘end user’ data. The field is formatted as: “#xxxx [yyyy..] zzzzz…” xxxx is a hex status code as defined in Table 3. yyyy is a decimal counter that increments every time the Node sends an ArtPollResponse. This allows the controller to monitor event changes in the Node. zzzz is an English text string defining the status. This is a fixed length field, although the string it contains can be shorter than the field.

§num_ports: [u8; 2]

The number of input or output ports. If number of inputs is not equal to number of outputs, the largest value is taken. Zero is a legal value if no input or output ports are implemented. The maximum value is 4. Nodes can ignore this field as the information is implicit in PortTypes[]

§port_types: [u8; 4]

This array defines the operation and protocol of each channel. (A product with 4 inputs and 4 outputs would report 0xc0, 0xc0, 0xc0, 0xc0). The array length is fixed, independent of the number of inputs or outputs physically available on the Node.

§good_input: [u8; 4]

This array defines input status of the node. Will be converted to a bitflag enum in the future.

§good_output: [u8; 4]

This array defines output status of the node. Will be converted to a bitflag enum in the future.

§swin: [u8; 4]

Bits 3-0 of the 15 bit Port-Address for each of the 4 possible input ports are encoded into the low nibble

§swout: [u8; 4]

Bits 3-0 of the 15 bit Port-Address for each of the 4 possible output ports are encoded into the low nibble.

§sw_video: u8

Set to 00 when video display is showing local data. Set to 01 when video is showing ethernet data. The field is now deprecated

§sw_macro: u8

If the Node supports macro key inputs, this byte represents the trigger values. The Node is responsible for ‘debouncing’ inputs. When the ArtPollReply is set to transmit automatically, (TalkToMe Bit 1), the ArtPollReply will be sent on both key down and key up events. However, the Controller should not assume that only one bit position has changed. The Macro inputs are used for remote event triggering or cueing.

§sw_remote: u8

If the Node supports remote trigger inputs, this byte represents the trigger values. The Node is responsible for ‘debouncing’ inputs. When the ArtPollReply is set to transmit automatically, (TalkToMe Bit 1), the ArtPollReply will be sent on both key down and key up events. However, the Controller should not assume that only one bit position has changed. The Remote inputs are used for remote event triggering or cueing.

§style: u8

The Style code defines the equipment style of the device.

§mac: [u8; 6]

MAC Address. Set to zero if node cannot supply this information.

§bind_ip: [u8; 4]

If this unit is part of a larger or modular product, this is the IP of the root device

§bind_index: u8

This number represents the order of bound devices. A lower number means closer to root device. A value of 1 means root device

§status_2: u8

Status 2. Will be expanded in the future

§filler: [u8; 26]

Transmit as zero. For future expansion.

Implementations§

source§

impl PollReply

source

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

Convert this struct to a byte array.

source

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

Convert a byte array to an instance of this struct.

Trait Implementations§

source§

impl Debug for PollReply

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.