pub struct MsgHeartbeat {
    pub sender_id: Option<u16>,
    pub flags: u32,
}
Expand description

System heartbeat message

The heartbeat message is sent periodically to inform the host or other attached devices that the system is running. It is used to monitor system malfunctions. It also contains status flags that indicate to the host the status of the system and whether it is operating correctly. Currently, the expected heartbeat interval is 1 sec.

The system error flag is used to indicate that an error has occurred in the system. To determine the source of the error, the remaining error flags should be inspected.

Fields

sender_id: Option<u16>

The message sender_id

flags: u32

Status flags

Implementations

Gets the ExternalAntennaPresent stored in the flags bitfield.

Returns Ok if the bitrange contains a known ExternalAntennaPresent variant. Otherwise the value of the bitrange is returned as an Err(u8). This may be because of a malformed message, or because new variants of ExternalAntennaPresent were added.

Set the bitrange corresponding to the ExternalAntennaPresent of the flags bitfield.

Gets the ExternalAntennaShort stored in the flags bitfield.

Returns Ok if the bitrange contains a known ExternalAntennaShort variant. Otherwise the value of the bitrange is returned as an Err(u8). This may be because of a malformed message, or because new variants of ExternalAntennaShort were added.

Set the bitrange corresponding to the ExternalAntennaShort of the flags bitfield.

Gets the sbp_major_protocol_version_number stored in flags.

Sets the sbp_major_protocol_version_number bitrange of flags.

Gets the sbp_minor_protocol_version_number stored in flags.

Sets the sbp_minor_protocol_version_number bitrange of flags.

Gets the SwiftNapError stored in the flags bitfield.

Returns Ok if the bitrange contains a known SwiftNapError variant. Otherwise the value of the bitrange is returned as an Err(u8). This may be because of a malformed message, or because new variants of SwiftNapError were added.

Set the bitrange corresponding to the SwiftNapError of the flags bitfield.

Gets the IoError stored in the flags bitfield.

Returns Ok if the bitrange contains a known IoError variant. Otherwise the value of the bitrange is returned as an Err(u8). This may be because of a malformed message, or because new variants of IoError were added.

Set the bitrange corresponding to the IoError of the flags bitfield.

Gets the SystemErrorFlag stored in the flags bitfield.

Returns Ok if the bitrange contains a known SystemErrorFlag variant. Otherwise the value of the bitrange is returned as an Err(u8). This may be because of a malformed message, or because new variants of SystemErrorFlag were added.

Set the bitrange corresponding to the SystemErrorFlag of the flags bitfield.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

The message type.

The message name.

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Get the message name.

Get the message type.

Get the sender_id if it is set.

Set the sender id.

Number of bytes this message will take on the wire.

The type returned in the event of a conversion error.

Performs the conversion.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

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

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

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.