[][src]Struct ichen_openprotocol::Controller

pub struct Controller<'a> {
    pub controller_id: NonZeroU32,
    pub display_name: &'a str,
    pub controller_type: &'a str,
    pub version: &'a str,
    pub model: &'a str,
    pub address: &'a str,
    pub geo_location: Option<GeoLocation>,
    pub op_mode: OpMode,
    pub job_mode: JobMode,
    pub last_cycle_data: Option<HashMap<&'a str, f64>>,
    pub variables: Option<HashMap<&'a str, f64>>,
    pub last_connection_time: Option<DateTime<FixedOffset>>,
    pub operator: Option<Operator<'a>>,
    pub job_card_id: Option<Cow<'a, str>>,
    pub mold_id: Option<Cow<'a, str>>,
}

A data structure containing the current known status of a controller.

Fields

controller_id: NonZeroU32

Unique ID of the controller, which cannot be zero.

display_name: &'a str

User-specified human-friendly name for the machine.

controller_type: &'a str

Controller type.

Examples

  • Ai01
  • Ai12
  • CDC2000WIN
  • MPC7
version: &'a str

Version of the controller's firmware.

model: &'a str

Machine model.

address: &'a str

Address of the controller.

For a network-connected controller, this is usually the IP address and port, in the format x.x.x.x:port.

For a serial-connected controller, this is usually the serial port device name, such as COM1, ttyS0.

geo_location: Option<GeoLocation>

Physical geo-location of the controller (if any).

op_mode: OpMode

Current operating mode of the controller.

job_mode: JobMode

Current job mode of the controller.

last_cycle_data: Option<HashMap<&'a str, f64>>

Last set of cycle data (if any) received from the controller.

variables: Option<HashMap<&'a str, f64>>

Last-known states (if any) of controller variables.

last_connection_time: Option<DateTime<FixedOffset>>

Time of last connection.

operator: Option<Operator<'a>>

Current logged-in user (if any) on the controller

job_card_id: Option<Cow<'a, str>>

Active job ID (if any) on the controller.

mold_id: Option<Cow<'a, str>>

ID of the set of mold data currently loaded (if any) on the controller.

Methods

impl<'a> Controller<'a>[src]

pub fn validate(&self) -> Result<'a, ()>[src]

Validate the data structure.

Trait Implementations

impl<'_> Default for Controller<'_>[src]

impl<'a> PartialEq<Controller<'a>> for Controller<'a>[src]

impl<'a> Debug for Controller<'a>[src]

impl<'a> Serialize for Controller<'a>[src]

impl<'de: 'a, 'a> Deserialize<'de> for Controller<'a>[src]

Auto Trait Implementations

impl<'a> Sync for Controller<'a>

impl<'a> Send for Controller<'a>

impl<'a> Unpin for Controller<'a>

impl<'a> RefUnwindSafe for Controller<'a>

impl<'a> UnwindSafe for Controller<'a>

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<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]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]