Struct tmcl::Command [] [src]

pub struct Command<T: Instruction> { /* fields omitted */ }

A Comamnd is an Instruction with a module address.

It contains everything required to serialize itself into Binary command format.

Methods

impl<T: Instruction> Command<T>
[src]

[src]

[src]

Returns the module address

[src]

Serialize into binary command format suited for RS232, RS485 etc

The array will look like the following: [MODULE_ADR, CMD_N, TYPE_N, MOTOR_N, VALUE3, VALUE2, VALUE1, VALUE0, CHECKSUM]

[src]

Serialize into binary command format suited for I2C

The array will look like the following: [CMD_N, TYPE_N, MOTOR_N, VALUE3, VALUE2, VALUE1, VALUE0, CHECKSUM]

[src]

Serialize into binary command format suited for CAN (controller area network)

When using CAN the module address and checksum will be excluded. The array will look like the following: [CMD_N, TYPE_N, MOTOR_N, VALUE3, VALUE2, VALUE1, VALUE0]

Trait Implementations

impl<T: Debug + Instruction> Debug for Command<T>
[src]

[src]

Formats the value using the given formatter. Read more

impl<T: PartialEq + Instruction> PartialEq for Command<T>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

Auto Trait Implementations

impl<T> Send for Command<T> where
    T: Send

impl<T> Sync for Command<T> where
    T: Sync