Struct sbp::messages::piksi::msg_thread_state::MsgThreadState
source · [−]pub struct MsgThreadState {
pub sender_id: Option<u16>,
pub name: SbpString<[u8; 20], NullTerminated>,
pub cpu: u16,
pub stack_free: u32,
}
Expand description
State of an RTOS thread
The thread usage message from the device reports real-time operating system (RTOS) thread usage statistics for the named thread. The reported percentage values must be normalized.
Fields
sender_id: Option<u16>
The message sender_id
name: SbpString<[u8; 20], NullTerminated>
Thread name (NULL terminated)
cpu: u16
Percentage cpu use for this thread. Values range from 0 - 1000 and needs to be renormalized to 100
stack_free: u32
Free stack space for this thread
Trait Implementations
sourceimpl Clone for MsgThreadState
impl Clone for MsgThreadState
sourcefn clone(&self) -> MsgThreadState
fn clone(&self) -> MsgThreadState
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 MsgThreadState
impl ConcreteMessage for MsgThreadState
sourceconst MESSAGE_TYPE: u16 = 23u16
const MESSAGE_TYPE: u16 = 23u16
The message type.
sourceconst MESSAGE_NAME: &'static str = "MSG_THREAD_STATE"
const MESSAGE_NAME: &'static str = "MSG_THREAD_STATE"
The message name.
sourceimpl Debug for MsgThreadState
impl Debug for MsgThreadState
sourceimpl From<MsgThreadState> for Sbp
impl From<MsgThreadState> for Sbp
sourcefn from(msg: MsgThreadState) -> Self
fn from(msg: MsgThreadState) -> Self
Converts to this type from the input type.
sourceimpl SbpMessage for MsgThreadState
impl SbpMessage for MsgThreadState
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 MsgThreadState
impl Send for MsgThreadState
impl Sync for MsgThreadState
impl Unpin for MsgThreadState
impl UnwindSafe for MsgThreadState
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