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§
source§impl 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§
source§impl Clone for MsgSettingsRegisterResp
impl Clone for MsgSettingsRegisterResp
source§fn clone(&self) -> MsgSettingsRegisterResp
fn clone(&self) -> MsgSettingsRegisterResp
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl ConcreteMessage for MsgSettingsRegisterResp
impl ConcreteMessage for MsgSettingsRegisterResp
source§const MESSAGE_TYPE: u16 = 431u16
const MESSAGE_TYPE: u16 = 431u16
source§const MESSAGE_NAME: &'static str = "MSG_SETTINGS_REGISTER_RESP"
const MESSAGE_NAME: &'static str = "MSG_SETTINGS_REGISTER_RESP"
source§impl Debug for MsgSettingsRegisterResp
impl Debug for MsgSettingsRegisterResp
source§impl<'de> Deserialize<'de> for MsgSettingsRegisterResp
impl<'de> Deserialize<'de> for MsgSettingsRegisterResp
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl FriendlyName for MsgSettingsRegisterResp
impl FriendlyName for MsgSettingsRegisterResp
fn friendly_name() -> &'static str
source§impl From<MsgSettingsRegisterResp> for Sbp
impl From<MsgSettingsRegisterResp> for Sbp
source§fn from(msg: MsgSettingsRegisterResp) -> Self
fn from(msg: MsgSettingsRegisterResp) -> Self
source§impl PartialEq for MsgSettingsRegisterResp
impl PartialEq for MsgSettingsRegisterResp
source§fn eq(&self, other: &MsgSettingsRegisterResp) -> bool
fn eq(&self, other: &MsgSettingsRegisterResp) -> bool
self
and other
values to be equal, and is used
by ==
.