DataType

Enum DataType 

Source
pub enum DataType {
Show 13 variants UnsignedInteger, SignedInteger, Float, String, Timestamp, Boolean, Hexadecimal, PlotPointPL1, PlotPointPL2, PlotPointPL4, FloatArray, UnsignedIntegerArray, SignedIntegerArray,
}

Variants§

§

UnsignedInteger

Unsigned Integer (UI) The value is an unsigned integer. The number of digits is defined with the Length parameter.

§

SignedInteger

Signed Integer (I) The value is a signed integer. The number of digits is defined with the Length parameter.

§

Float

Float (F) The value is sent as a float in a flexible format such as “12.12”, “10025.1234”, or “-57.5”. The sender determines the number of decimals to send.

§

String

String (S) The value is sent as ASCII characters, and the length of the data fits the actual string length. Strings may contain spaces (ASCII 0x20).

§

Timestamp

Timestamp (T) The value represents a time stamp in the format YYYY-MM-DD:HH:MM:SS (19 ASCII characters).

§

Boolean

Boolean (B) A boolean value represented as one ASCII digit: 0 = FALSE, 1 = TRUE.

§

Hexadecimal

Hexadecimal (H) A hexadecimal value sent as ASCII characters, e.g., "A24CD3".

§

PlotPointPL1

Plotting Point (PL1) A plotting point consisting of a Float Array (FA) of one pair of float values (Y, X).

§

PlotPointPL2

Double Arrow Line (PL2) A plotting point consisting of an FA of two pairs of float values (Y, X).

§

PlotPointPL4

Window Plot (PL4) A plotting point consisting of an FA of four pairs of float values (Y, X).

§

FloatArray

Float Array (FA) An array of float values, each sent as 8 ASCII characters. Negative values start with a '-' sign. Precision varies, omitting the decimal point for large values. Examples: "-1234567", "001.1205", "-123.789".

§

UnsignedIntegerArray

Unsigned Integer Array (UA) An array of unsigned integers, each sent as 8 ASCII characters. Examples: "12345678", "00001234", "00200000".

§

SignedIntegerArray

Signed Integer Array (IA) An array of signed integers, each sent as 8 ASCII characters. Negative values start with a '-' sign. Examples: "12345678", "-1234567", "00200000", "10200000".

Trait Implementations§

Source§

impl Clone for DataType

Source§

fn clone(&self) -> DataType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DataType

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Decode for DataType

Source§

fn decode(_: &mut Decoder<'_>) -> Result<Self>

This will take the decoder and return the data itself, parsed from the decoder’s input bytes.
Source§

fn decode_sized(decoder: &mut Decoder<'_>, size: usize) -> Result<Self>

Source§

impl Default for DataType

Source§

fn default() -> DataType

Returns the “default value” for a type. Read more
Source§

impl Encode for DataType

Source§

fn encode(&self, _: &mut Encoder) -> Result<()>

Source§

fn encode_sized(&self, encoder: &mut Encoder, size: usize) -> Result<()>

Source§

impl PartialEq for DataType

Source§

fn eq(&self, other: &DataType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for DataType

Source§

impl StructuralPartialEq for DataType

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.