Struct sbp::messages::settings::msg_settings_write_resp::MsgSettingsWriteResp
source · pub struct MsgSettingsWriteResp {
pub sender_id: Option<u16>,
pub status: u8,
pub setting: SbpString<Vec<u8>, Multipart>,
}
Expand description
Acknowledgement with status of MSG_SETTINGS_WRITE
Return the status of a write request with the new value of the setting. If the requested value is rejected, the current value will be returned. The string field is a NULL-terminated and NULL-delimited string with contents “SECTION_SETTING\0SETTING\0VALUE\0” where the ‘\0’ escape sequence denotes the NULL character and where quotation marks are omitted. An example string that could be sent from device is “solution\0soln_freq\010\0”.
Fields§
§sender_id: Option<u16>
The message sender_id
status: u8
Write status
setting: SbpString<Vec<u8>, Multipart>
A NULL-terminated and delimited string with contents “SECTION_SETTING\0SETTING\0VALUE\0”
Implementations§
source§impl MsgSettingsWriteResp
impl MsgSettingsWriteResp
sourcepub fn write_status(&self) -> Result<WriteStatus, u8>
pub fn write_status(&self) -> Result<WriteStatus, u8>
Gets the WriteStatus stored in the status
bitfield.
Returns Ok
if the bitrange contains a known WriteStatus
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 WriteStatus
were added.
sourcepub fn set_write_status(&mut self, write_status: WriteStatus)
pub fn set_write_status(&mut self, write_status: WriteStatus)
Set the bitrange corresponding to the WriteStatus of the status
bitfield.
Trait Implementations§
source§impl Clone for MsgSettingsWriteResp
impl Clone for MsgSettingsWriteResp
source§fn clone(&self) -> MsgSettingsWriteResp
fn clone(&self) -> MsgSettingsWriteResp
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl ConcreteMessage for MsgSettingsWriteResp
impl ConcreteMessage for MsgSettingsWriteResp
source§const MESSAGE_TYPE: u16 = 175u16
const MESSAGE_TYPE: u16 = 175u16
source§const MESSAGE_NAME: &'static str = "MSG_SETTINGS_WRITE_RESP"
const MESSAGE_NAME: &'static str = "MSG_SETTINGS_WRITE_RESP"
source§impl Debug for MsgSettingsWriteResp
impl Debug for MsgSettingsWriteResp
source§impl<'de> Deserialize<'de> for MsgSettingsWriteResp
impl<'de> Deserialize<'de> for MsgSettingsWriteResp
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 MsgSettingsWriteResp
impl FriendlyName for MsgSettingsWriteResp
fn friendly_name() -> &'static str
source§impl From<MsgSettingsWriteResp> for Sbp
impl From<MsgSettingsWriteResp> for Sbp
source§fn from(msg: MsgSettingsWriteResp) -> Self
fn from(msg: MsgSettingsWriteResp) -> Self
source§impl PartialEq for MsgSettingsWriteResp
impl PartialEq for MsgSettingsWriteResp
source§fn eq(&self, other: &MsgSettingsWriteResp) -> bool
fn eq(&self, other: &MsgSettingsWriteResp) -> bool
self
and other
values to be equal, and is used
by ==
.