#[repr(u8)]pub enum MessageCode {
Show 13 variants
LDataReq = 17,
LDataCon = 46,
LDataInd = 41,
LBusmonInd = 43,
LRawReq = 16,
LRawInd = 45,
LRawCon = 47,
MPropReadReq = 252,
MPropReadCon = 251,
MPropWriteReq = 246,
MPropWriteCon = 245,
MResetReq = 241,
MResetInd = 240,
}Expand description
cEMI message code.
Variants§
LDataReq = 17
L_Data.req - Request to send data.
LDataCon = 46
L_Data.con - Confirmation of data sent.
LDataInd = 41
L_Data.ind - Indication of received data.
LBusmonInd = 43
L_Busmon.ind - Bus monitor indication.
LRawReq = 16
L_Raw.req - Raw request.
LRawInd = 45
L_Raw.ind - Raw indication.
LRawCon = 47
L_Raw.con - Raw confirmation.
MPropReadReq = 252
M_PropRead.req - Property read request.
MPropReadCon = 251
M_PropRead.con - Property read confirmation.
MPropWriteReq = 246
M_PropWrite.req - Property write request.
MPropWriteCon = 245
M_PropWrite.con - Property write confirmation.
MResetReq = 241
M_Reset.req - Reset request.
MResetInd = 240
M_Reset.ind - Reset indication.
Implementations§
Source§impl MessageCode
impl MessageCode
Sourcepub fn try_from_u8(value: u8) -> Option<Self>
pub fn try_from_u8(value: u8) -> Option<Self>
Try to create from raw byte.
Sourcepub fn is_request(&self) -> bool
pub fn is_request(&self) -> bool
Check if this is a request.
Sourcepub fn is_indication(&self) -> bool
pub fn is_indication(&self) -> bool
Check if this is an indication.
Sourcepub fn is_confirmation(&self) -> bool
pub fn is_confirmation(&self) -> bool
Check if this is a confirmation.
Sourcepub fn is_property_service(&self) -> bool
pub fn is_property_service(&self) -> bool
Check if this is a property service message.
Sourcepub fn is_reset_service(&self) -> bool
pub fn is_reset_service(&self) -> bool
Check if this is a reset service message.
Sourcepub fn to_confirmation(&self) -> Option<Self>
pub fn to_confirmation(&self) -> Option<Self>
Get the corresponding confirmation message code for a request.
Trait Implementations§
Source§impl Clone for MessageCode
impl Clone for MessageCode
Source§fn clone(&self) -> MessageCode
fn clone(&self) -> MessageCode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MessageCode
impl Debug for MessageCode
Source§impl From<MessageCode> for u8
impl From<MessageCode> for u8
Source§fn from(code: MessageCode) -> Self
fn from(code: MessageCode) -> Self
Converts to this type from the input type.
Source§impl Hash for MessageCode
impl Hash for MessageCode
Source§impl PartialEq for MessageCode
impl PartialEq for MessageCode
impl Copy for MessageCode
impl Eq for MessageCode
impl StructuralPartialEq for MessageCode
Auto Trait Implementations§
impl Freeze for MessageCode
impl RefUnwindSafe for MessageCode
impl Send for MessageCode
impl Sync for MessageCode
impl Unpin for MessageCode
impl UnsafeUnpin for MessageCode
impl UnwindSafe for MessageCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.