Enum can_aerospace_lite::types::ServiceCodeEnum[][src]

pub enum ServiceCodeEnum {
Show 18 variants IDS, NSS, DDS, DUS, SCS, TIS, FPS, STS, FSS, TCS, BSS, NIS, MIS, MCS, CSS, DSS, CUSTOM(u8), UNKNOWN,
}

Variants

IDS

Identification Service (0x0)

NSS

Node Synchronisation Service (0x1)

DDS

Data Download Service (0x2)

DUS

Data Upload Service (0x3)

SCS

Simulation Control Service (0x4)

TIS

Transmission Interval Service (0x5)

FPS

FLASH Programming Service (0x6)

STS

State Transmission Service (0x7)

FSS

Filter Setting Service (0x8)

TCS

Test Control Service (0x9)

BSS

CAN Baudrate Setting Service (0xA)

NIS

NodeId Setting Service (0xB)

MIS

Module Information Service (0xC)

MCS

Module Configuration Service (0xD)

CSS

CAN ID Setting Service (0xE)

DSS

CAN ID Distribution Setting Service (0xF)

CUSTOM

User-Defined Service Code [100, 254]

Tuple Fields of CUSTOM

0: u8
UNKNOWN

Implementations

Converts ServiceCodeEnum to u8

 let mut custom_service = ServiceCodeEnum::CUSTOM(100);
 assert_eq!(custom_service.as_u8(), 100);
 custom_service = ServiceCodeEnum::UNKNOWN;
 assert_eq!(custom_service.as_u8(), 0xFF);
 custom_service = ServiceCodeEnum::IDS;
 assert_eq!(custom_service.as_u8(), 0x0);

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Converts ServiceCodeEnum to u8

 let mut custom_service = ServiceCodeEnum::CUSTOM(100);
 assert_eq!(u8::from(custom_service), 100);
 custom_service = ServiceCodeEnum::UNKNOWN;
 assert_eq!(u8::from(custom_service), 0xFF);

Performs the conversion.

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.