pub enum CallbackPriority {
Low,
Medium,
High,
}Expand description
Callback priority band — C priorityLow/priorityMedium/priorityHigh
(callback.h:41-43).
Variants§
Implementations§
Source§impl CallbackPriority
impl CallbackPriority
Sourcepub const ALL: [CallbackPriority; 3]
pub const ALL: [CallbackPriority; 3]
All bands in index order — mirrors the for (i = 0; i < NUM_CALLBACK_PRIORITIES; i++) loops in callback.c.
Sourcepub fn from_record_prio(prio: i16) -> CallbackPriority
pub fn from_record_prio(prio: i16) -> CallbackPriority
The band a record’s PRIO field selects — C callbackSetPriority
(callback.h:91-92), which copies the record’s menuPriority index
(menuPriority.dbd.pod:24-28 — LOW/MEDIUM/HIGH = 0/1/2, the same
three values as priorityLow/priorityMedium/priorityHigh,
callback.h:41-43) straight into CALLBACK.priority.
C validates the copied value only when the callback is queued:
callbackRequest drops it with “Bad priority” (callback.c:355-357)
when it is outside 0..NUM_CALLBACK_PRIORITIES. Dropping a record’s
deferred work loses that cycle outright, so an out-of-range PRIO
lands on Low here instead — the band a record whose PRIO was never
written already has.
Sourcepub fn name_prefix(self) -> &'static str
pub fn name_prefix(self) -> &'static str
Worker-thread name prefix — C threadNamePrefix (callback.c:86-88).
Sourcepub fn os_priority(self) -> ThreadPriority
pub fn os_priority(self) -> ThreadPriority
OS thread priority for this band — C threadPriority
(callback.c:93-97): epicsThreadPriorityScanLow - 1,
epicsThreadPriorityScanLow + 4, epicsThreadPriorityScanHigh + 1.
Values are derived from ThreadPriority so the parity link to
epicsThread.h stays in one place.
Trait Implementations§
Source§impl Clone for CallbackPriority
impl Clone for CallbackPriority
Source§fn clone(&self) -> CallbackPriority
fn clone(&self) -> CallbackPriority
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more