pub struct MsgSettingsRegisterResp {
pub sender_id: Option<u16>,
pub status: u8,
pub setting: SbpString<Vec<u8>, Multipart>,
}
Expand description
Register setting and default value (device <= host)
This message responds to setting registration with the effective value. The effective value shall differ from the given default value if setting was already registered or is available in the permanent setting storage and had a different value.
Fields
sender_id: Option<u16>
The message sender_id
status: u8
Register status
setting: SbpString<Vec<u8>, Multipart>
A NULL-terminated and delimited string with contents “SECTION_SETTING\0SETTING\0VALUE”. The meaning of value is defined according to the status field.
Implementations
sourceimpl MsgSettingsRegisterResp
impl MsgSettingsRegisterResp
sourcepub fn register_status(&self) -> Result<RegisterStatus, u8>
pub fn register_status(&self) -> Result<RegisterStatus, u8>
Gets the RegisterStatus stored in the status
bitfield.
Returns Ok
if the bitrange contains a known RegisterStatus
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 RegisterStatus
were added.
sourcepub fn set_register_status(&mut self, register_status: RegisterStatus)
pub fn set_register_status(&mut self, register_status: RegisterStatus)
Set the bitrange corresponding to the RegisterStatus of the status
bitfield.
Trait Implementations
sourceimpl Clone for MsgSettingsRegisterResp
impl Clone for MsgSettingsRegisterResp
sourcefn clone(&self) -> MsgSettingsRegisterResp
fn clone(&self) -> MsgSettingsRegisterResp
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl ConcreteMessage for MsgSettingsRegisterResp
impl ConcreteMessage for MsgSettingsRegisterResp
sourceconst MESSAGE_TYPE: u16 = 431u16
const MESSAGE_TYPE: u16 = 431u16
The message type.
sourceconst MESSAGE_NAME: &'static str = "MSG_SETTINGS_REGISTER_RESP"
const MESSAGE_NAME: &'static str = "MSG_SETTINGS_REGISTER_RESP"
The message name.
sourceimpl Debug for MsgSettingsRegisterResp
impl Debug for MsgSettingsRegisterResp
sourceimpl From<MsgSettingsRegisterResp> for Sbp
impl From<MsgSettingsRegisterResp> for Sbp
sourcefn from(msg: MsgSettingsRegisterResp) -> Self
fn from(msg: MsgSettingsRegisterResp) -> Self
Converts to this type from the input type.
sourceimpl SbpMessage for MsgSettingsRegisterResp
impl SbpMessage for MsgSettingsRegisterResp
sourcefn message_name(&self) -> &'static str
fn message_name(&self) -> &'static str
Get the message name.
sourcefn message_type(&self) -> u16
fn message_type(&self) -> u16
Get the message type.
sourcefn set_sender_id(&mut self, new_id: u16)
fn set_sender_id(&mut self, new_id: u16)
Set the sender id.
sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Number of bytes this message will take on the wire.
Auto Trait Implementations
impl RefUnwindSafe for MsgSettingsRegisterResp
impl Send for MsgSettingsRegisterResp
impl Sync for MsgSettingsRegisterResp
impl Unpin for MsgSettingsRegisterResp
impl UnwindSafe for MsgSettingsRegisterResp
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more