pub enum EventPayload {
EmbassyTaskReady {
task_id: u16,
executor_id: u3,
},
EmbassyTaskExecBegin {
task_id: u16,
executor_id: u3,
},
EmbassyTaskExecEnd {
executor_id: u3,
},
EmbassyExecutorPollStart {
executor_id: u3,
},
EmbassyExecutorIdle {
executor_id: u3,
},
MonitorStart {
monitor_id: u8,
},
MonitorEnd,
MonitorValue {
value_id: u8,
value: MonitorValuePayload,
},
TypeDefinition(TypeDefinitionPayload),
DataLossEvent {
dropped_events: u32,
},
DefmtData {
len: u8,
data: *const u8,
},
}Variants§
EmbassyTaskReady
Embassy Task is ready to be polled (Waker called). ExecutorID will also be included
EmbassyTaskExecBegin
Embassy Task execution began (poll called). ExecutorID will also be included
EmbassyTaskExecEnd
Embassy Task execution ended (returned Poll::Ready or yielded Poll::Pending). ExecutorID is included because it is shorter to transmit than TaskID and we know the executor from the TaskExecBegin event.
EmbassyExecutorPollStart
Embassy Executor started polling tasks. ExecutorID is included because it is the only identifier for the executor.
EmbassyExecutorIdle
Embassy Executor is idle (no tasks to poll). ExecutorID is included because it is the only identifier for the executor.
MonitorStart
Function or Scope Monitor started MonitorID identifies the monitor instance (was assigned via previous TypeDefinition event).
MonitorEnd
Function or Scope Monitor ended MonitorID are not included here because they can be inferred from the corresponding MonitorStart event
MonitorValue
Value Monitor reported a value ValueID identifies the monitor instance (was assigned via previous TypeDefinition event). Value is the reported value payload.
TypeDefinition(TypeDefinitionPayload)
Type Definition Event
DataLossEvent
Data Loss Event because of buffer full situation
DefmtData
Implementations§
Source§impl EventPayload
impl EventPayload
pub const fn event_id(&self) -> u5
Sourcepub const fn get_executor_id(&self) -> Option<u3>
pub const fn get_executor_id(&self) -> Option<u3>
Returns the executor ID if the event is related to an embassy executor
Sourcepub const fn get_monitor_value_type_id(&self) -> Option<u3>
pub const fn get_monitor_value_type_id(&self) -> Option<u3>
Returns the MonitorValuePayload type ID if the event is a MonitorValue event
Sourcepub const fn get_sub_id(&self) -> Option<u3>
pub const fn get_sub_id(&self) -> Option<u3>
Returns the sub ID (executor ID or MonitorValue type ID) if applicable
pub fn write_bytes(&self, writer: &mut BufferWriter)
Sourcepub fn from_bytes(
event_type: u8,
buffer: &mut BufferReader<'_>,
) -> Result<EventPayload, ReadTracingError>
pub fn from_bytes( event_type: u8, buffer: &mut BufferReader<'_>, ) -> Result<EventPayload, ReadTracingError>
Reads an EventPayload from the provided buffer based on the given type ID. Params:
- event_type: The combined event type byte containing event ID and executor short ID.
- buffer: The buffer reader to read additional event data from.
Trait Implementations§
Source§impl Clone for EventPayload
impl Clone for EventPayload
Source§fn clone(&self) -> EventPayload
fn clone(&self) -> EventPayload
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more