pub struct TimestampRecord {
pub val: String,
pub oval: String,
pub rval: i32,
pub tst: i16,
/* private fields */
}Expand description
Timestamp record — generates formatted timestamp strings.
Ported from EPICS std module timestampRecord.c.
Fields§
§val: StringCurrent formatted timestamp string (VAL).
oval: StringPrevious value for change detection (OVAL).
rval: i32Seconds past EPICS epoch (RVAL). DBF_ULONG in C; the Rust value
model has no unsigned-32 scalar, so this follows the project
convention of mapping DBF_ULONG to i32/EpicsValue::Long.
tst: i16Timestamp format selector (TST), a DBF_MENU. Values 0..=10
select an explicit format; any other value is rendered with
format 0 (C switch default: branch).
Trait Implementations§
Source§impl Default for TimestampRecord
impl Default for TimestampRecord
Source§impl Record for TimestampRecord
impl Record for TimestampRecord
Source§fn set_process_context(&mut self, ctx: &ProcessContext)
fn set_process_context(&mut self, ctx: &ProcessContext)
C timestampRecord.c:90 reads ptimestamp->tse. The framework
owns dbCommon.tse; this hook captures it so process() can
take the device-time branch.
Source§fn record_type(&self) -> &'static str
fn record_type(&self) -> &'static str
Return the record type name (e.g., “ai”, “ao”, “bi”).
Source§fn process(&mut self) -> CaResult<ProcessOutcome>
fn process(&mut self) -> CaResult<ProcessOutcome>
Process the record (scan/compute cycle). Read more
Source§fn put_field(&mut self, name: &str, value: EpicsValue) -> CaResult<()>
fn put_field(&mut self, name: &str, value: EpicsValue) -> CaResult<()>
Set a field value by name.
Source§fn field_list(&self) -> &'static [FieldDesc]
fn field_list(&self) -> &'static [FieldDesc]
Return the list of field descriptors.
Source§fn clears_udf(&self) -> bool
fn clears_udf(&self) -> bool
Whether processing this record should clear UDF.
Override to return false for record types that don’t produce a valid value every cycle.
Source§fn took_metadata_change(&mut self) -> bool
fn took_metadata_change(&mut self) -> bool
Optional: report whether this record’s last
process() call
mutated a metadata-class field (EGU/PREC/HOPR/LOPR/HLM/LLM/
alarm limits / DRVH/DRVL / state strings). Read moreSource§fn validate_put(&self, _field: &str, _value: &EpicsValue) -> Result<(), CaError>
fn validate_put(&self, _field: &str, _value: &EpicsValue) -> Result<(), CaError>
Validate a put before it is applied. Return Err to reject.
Source§fn primary_field(&self) -> &'static str
fn primary_field(&self) -> &'static str
Primary field name (default “VAL”). Override for waveform etc.
Source§fn val(&self) -> Option<EpicsValue>
fn val(&self) -> Option<EpicsValue>
Get the primary value.
Source§fn set_val(&mut self, value: EpicsValue) -> Result<(), CaError>
fn set_val(&mut self, value: EpicsValue) -> Result<(), CaError>
Set the primary value. Read more
Source§fn accepts_raw_soft_input(&self) -> bool
fn accepts_raw_soft_input(&self) -> bool
Whether this record implements the
DTYP="Raw Soft Channel"
read path via Record::apply_raw_input. Records that return
true opt into framework routing of the INP link value through
apply_raw_input (RVAL + MASK) instead of the default
soft-channel VAL direct write. Read moreSource§fn apply_raw_input(&mut self, value: EpicsValue) -> Result<(), CaError>
fn apply_raw_input(&mut self, value: EpicsValue) -> Result<(), CaError>
Apply a value read from a
DTYP="Raw Soft Channel" INP link. Read moreSource§fn apply_invalid_output_value(
&mut self,
ivov: EpicsValue,
) -> Result<(), CaError>
fn apply_invalid_output_value( &mut self, ivov: EpicsValue, ) -> Result<(), CaError>
Apply IVOA=2 (“set outputs to IVOV”) semantics: copy the
IVOV value into whatever output staging field the OUT
writeback consumes for this record type. Mirrors the
per-record C
recXxx.c behaviour: Read moreSource§fn can_device_write(&self) -> bool
fn can_device_write(&self) -> bool
Whether this record type supports device write (output records only).
aao is included here even though it’s served by the same
concrete struct as waveform/aai/subArray — the
WaveformRecord’s can_device_write override picks the right
answer per [ArrayKind], but this default matters for code that
only has the record-type string.Source§fn is_put_complete(&self) -> bool
fn is_put_complete(&self) -> bool
Whether async processing has completed and put_notify can respond.
Records that return AsyncPendingNotify should return false while
async work is in progress, and true when done.
Default: true (synchronous records are always complete).
Source§fn should_fire_forward_link(&self) -> bool
fn should_fire_forward_link(&self) -> bool
Whether this record should fire its forward link after processing.
Source§fn should_output(&self) -> bool
fn should_output(&self) -> bool
Whether this record’s OUT link should be written after processing.
Defaults to true. Override in calcout / longout to implement OOPT
conditional output (epics-base 7.0.8).
Source§fn on_output_complete(&mut self)
fn on_output_complete(&mut self)
Notify the record that the OUT-link / device write completed
successfully on this cycle. The framework calls this right after
the actual write so transition-detection state (e.g.
longout.pval) can update for the next cycle’s
Self::should_output check. Default: no-op.Source§fn uses_monitor_deadband(&self) -> bool
fn uses_monitor_deadband(&self) -> bool
Whether this record uses MDEL/ADEL deadband for monitor posting.
Binary records (bi, bo, busy, mbbi, mbbo) return false because
C EPICS always posts monitors for these record types regardless
of whether the value changed.
Source§fn monitor_deadband_value(&self) -> Option<EpicsValue>
fn monitor_deadband_value(&self) -> Option<EpicsValue>
The value the MDEL/ADEL deadband is evaluated against. Read more
Source§fn init_record(&mut self, _pass: u8) -> Result<(), CaError>
fn init_record(&mut self, _pass: u8) -> Result<(), CaError>
Initialize record (pass 0: field defaults; pass 1: dependent init).
Source§fn post_init_finalize_undef(&mut self, _udf: &mut bool) -> Result<(), CaError>
fn post_init_finalize_undef(&mut self, _udf: &mut bool) -> Result<(), CaError>
Post-init finalisation hook with mutable access to the
framework’s UDF flag. Called once after both
init_record
passes complete. Default implementation is a no-op. Read moreSource§fn set_resolved_input_links(&mut self, _resolved: &[&'static str])
fn set_resolved_input_links(&mut self, _resolved: &[&'static str])
Called by the framework immediately after applying this cycle’s
Record::multi_input_links fetches, before process(). Read moreSource§fn special(&mut self, _field: &str, _after: bool) -> Result<(), CaError>
fn special(&mut self, _field: &str, _after: bool) -> Result<(), CaError>
Called before/after a field put for side-effect processing.
Source§fn as_any_mut(&mut self) -> Option<&mut (dyn Any + 'static)>
fn as_any_mut(&mut self) -> Option<&mut (dyn Any + 'static)>
Downcast to concrete type for device support init injection.
Override in record types that need device support to inject state (e.g., MotorRecord).
Source§fn value_is_undefined(&self) -> bool
fn value_is_undefined(&self) -> bool
Whether the record’s current
VAL is undefined (UDF must
stay set). Read moreSource§fn check_alarms(&mut self, _common: &mut CommonFields)
fn check_alarms(&mut self, _common: &mut CommonFields)
Per-record alarm hook — evaluate record-type-specific alarms
(STATE / COS / analog limit / SOFT) and accumulate them into
nsta/nsev via recGblSetSevr. Read moreSource§fn multi_input_links(&self) -> &[(&'static str, &'static str)]
fn multi_input_links(&self) -> &[(&'static str, &'static str)]
Return multi-input link field pairs: (link_field, value_field).
Override in calc, calcout, sel, sub to return INPA..INPL → A..L mappings.
Source§fn multi_output_links(&self) -> &[(&'static str, &'static str)]
fn multi_output_links(&self) -> &[(&'static str, &'static str)]
Return multi-output link field pairs: (link_field, value_field).
Override in transform to return OUTA..OUTP → A..P mappings.
Source§fn put_field_internal(
&mut self,
name: &str,
value: EpicsValue,
) -> Result<(), CaError>
fn put_field_internal( &mut self, name: &str, value: EpicsValue, ) -> Result<(), CaError>
Internal field write that bypasses read-only checks.
Used by the framework to write values from ReadDbLink actions
into fields that are normally read-only (e.g., epid.CVAL).
Default implementation delegates to put_field().
Source§fn pre_process_actions(&mut self) -> Vec<ProcessAction>
fn pre_process_actions(&mut self) -> Vec<ProcessAction>
Return pre-process actions (ReadDbLink) that the framework should
execute BEFORE calling process(). This is called once per cycle.
Default returns empty. Override in records that need link reads
to be available during process().
Source§fn pre_input_link_actions(&mut self) -> Vec<ProcessAction>
fn pre_input_link_actions(&mut self) -> Vec<ProcessAction>
Return actions the framework must execute BEFORE the input-link
(
multi_input_links, INP -> value-field) fetch for this cycle. Read moreSource§fn set_device_did_compute(&mut self, _did_compute: bool)
fn set_device_did_compute(&mut self, _did_compute: bool)
Called by the framework before process() to indicate whether device
support’s read() already performed the record’s compute step.
Override in records that have a built-in compute (e.g., epid PID)
to skip it when device support already ran it.
Default: ignore.
Source§fn soft_channel_skips_convert(&self) -> bool
fn soft_channel_skips_convert(&self) -> bool
Whether this record has a raw-to-engineering (
RVAL → VAL)
convert() step that must be skipped on a Soft Channel input. Read moreAuto Trait Implementations§
impl Freeze for TimestampRecord
impl RefUnwindSafe for TimestampRecord
impl Send for TimestampRecord
impl Sync for TimestampRecord
impl Unpin for TimestampRecord
impl UnsafeUnpin for TimestampRecord
impl UnwindSafe for TimestampRecord
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