pub struct MsgId(/* private fields */);Expand description
A type-safe, zero-cost wrapper for a cFE Software Bus Message ID.
Implementations§
Source§impl MsgId
impl MsgId
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Checks if the message ID is numerically within the valid mission-defined range.
§C-API Mapping
This is a safe Rust implementation of the C function CFE_SB_IsValidMsgId.
Sourcepub fn cmd(topic_id: u16, instance_num: u16) -> Self
pub fn cmd(topic_id: u16, instance_num: u16) -> Self
Creates a command MsgId from a mission-defined topic ID and a CPU instance number.
Sourcepub fn tlm(topic_id: u16, instance_num: u16) -> Self
pub fn tlm(topic_id: u16, instance_num: u16) -> Self
Creates a telemetry MsgId from a mission-defined topic ID and a CPU instance number.
Sourcepub fn global_cmd(topic_id: u16) -> Self
pub fn global_cmd(topic_id: u16) -> Self
Creates a global command MsgId from a mission-defined topic ID.
Sourcepub fn global_tlm(topic_id: u16) -> Self
pub fn global_tlm(topic_id: u16) -> Self
Creates a global telemetry MsgId from a mission-defined topic ID.
Sourcepub fn local_cmd(topic_id: u16) -> Self
pub fn local_cmd(topic_id: u16) -> Self
Creates a local command MsgId from a mission-defined topic ID for the current CPU.
Trait Implementations§
impl Copy for MsgId
impl Eq for MsgId
Auto Trait Implementations§
impl Freeze for MsgId
impl RefUnwindSafe for MsgId
impl Send for MsgId
impl Sync for MsgId
impl Unpin for MsgId
impl UnsafeUnpin for MsgId
impl UnwindSafe for MsgId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more