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
sourceimpl 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
sourceimpl Clone for MsgSettingsWriteResp
impl Clone for MsgSettingsWriteResp
sourcefn clone(&self) -> MsgSettingsWriteResp
fn clone(&self) -> MsgSettingsWriteResp
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 MsgSettingsWriteResp
impl ConcreteMessage for MsgSettingsWriteResp
sourceconst MESSAGE_TYPE: u16 = 175u16
const MESSAGE_TYPE: u16 = 175u16
The message type.
sourceconst MESSAGE_NAME: &'static str = "MSG_SETTINGS_WRITE_RESP"
const MESSAGE_NAME: &'static str = "MSG_SETTINGS_WRITE_RESP"
The message name.
sourceimpl Debug for MsgSettingsWriteResp
impl Debug for MsgSettingsWriteResp
sourceimpl From<MsgSettingsWriteResp> for Sbp
impl From<MsgSettingsWriteResp> for Sbp
sourcefn from(msg: MsgSettingsWriteResp) -> Self
fn from(msg: MsgSettingsWriteResp) -> Self
Converts to this type from the input type.
sourceimpl SbpMessage for MsgSettingsWriteResp
impl SbpMessage for MsgSettingsWriteResp
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 MsgSettingsWriteResp
impl Send for MsgSettingsWriteResp
impl Sync for MsgSettingsWriteResp
impl Unpin for MsgSettingsWriteResp
impl UnwindSafe for MsgSettingsWriteResp
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