Struct sbp::messages::settings::msg_settings_read_by_index_resp::MsgSettingsReadByIndexResp
source · [−]pub struct MsgSettingsReadByIndexResp {
pub sender_id: Option<u16>,
pub index: u16,
pub setting: SbpString<Vec<u8>, Multipart>,
}
Expand description
Read setting by direct index (host <= device)
The settings message that reports the value of a setting at an index.
In the string field, it reports NULL-terminated and delimited string with contents “SECTION_SETTING\0SETTING\0VALUE\0FORMAT_TYPE\0”. where the ‘\0’ escape sequence denotes the NULL character and where quotation marks are omitted. The FORMAT_TYPE field is optional and denotes possible string values of the setting as a hint to the user. If included, the format type portion of the string has the format “enum:value1,value2,value3”. An example string that could be sent from the device is “simulator\0enabled\0True\0enum:True,False\0”.
Fields
sender_id: Option<u16>
The message sender_id
index: u16
An index into the device settings, with values ranging from 0 to length(settings)
setting: SbpString<Vec<u8>, Multipart>
A NULL-terminated and delimited string with contents “SECTION_SETTING\0SETTING\0VALUE\0FORMAT_TYPE\0”
Trait Implementations
sourceimpl Clone for MsgSettingsReadByIndexResp
impl Clone for MsgSettingsReadByIndexResp
sourcefn clone(&self) -> MsgSettingsReadByIndexResp
fn clone(&self) -> MsgSettingsReadByIndexResp
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 MsgSettingsReadByIndexResp
impl ConcreteMessage for MsgSettingsReadByIndexResp
sourceconst MESSAGE_TYPE: u16 = 167u16
const MESSAGE_TYPE: u16 = 167u16
The message type.
sourceconst MESSAGE_NAME: &'static str = "MSG_SETTINGS_READ_BY_INDEX_RESP"
const MESSAGE_NAME: &'static str = "MSG_SETTINGS_READ_BY_INDEX_RESP"
The message name.
sourceimpl Debug for MsgSettingsReadByIndexResp
impl Debug for MsgSettingsReadByIndexResp
sourceimpl From<MsgSettingsReadByIndexResp> for Sbp
impl From<MsgSettingsReadByIndexResp> for Sbp
sourcefn from(msg: MsgSettingsReadByIndexResp) -> Self
fn from(msg: MsgSettingsReadByIndexResp) -> Self
Converts to this type from the input type.
sourceimpl SbpMessage for MsgSettingsReadByIndexResp
impl SbpMessage for MsgSettingsReadByIndexResp
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 MsgSettingsReadByIndexResp
impl Send for MsgSettingsReadByIndexResp
impl Sync for MsgSettingsReadByIndexResp
impl Unpin for MsgSettingsReadByIndexResp
impl UnwindSafe for MsgSettingsReadByIndexResp
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