pub struct TimestampRecord {
pub val: PvString,
pub oval: PvString,
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: PvStringCurrent formatted timestamp string (VAL).
oval: PvStringPrevious 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
TST is DBF_MENU menu(timestampTST) (std timestampRecord.dbd);
served as DBR_ENUM with the format-string choice labels.
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
Source§fn process(&mut self) -> CaResult<ProcessOutcome>
fn process(&mut self) -> CaResult<ProcessOutcome>
Source§fn put_field(&mut self, name: &str, value: EpicsValue) -> CaResult<()>
fn put_field(&mut self, name: &str, value: EpicsValue) -> CaResult<()>
Source§fn field_list(&self) -> &'static [FieldDesc]
fn field_list(&self) -> &'static [FieldDesc]
Source§fn clears_udf(&self) -> bool
fn clears_udf(&self) -> bool
Source§fn took_metadata_change(&mut self) -> bool
fn took_metadata_change(&mut self) -> bool
process() call
mutated a metadata-class field (EGU/PREC/HOPR/LOPR/HLM/LLM/
alarm limits / DRVH/DRVL / state strings). Read moreSource§fn field_metadata_override(&self, _field: &str) -> Option<FieldMetadataOverride>
fn field_metadata_override(&self, _field: &str) -> Option<FieldMetadataOverride>
field. Read moreSource§fn long_string_fields(&self) -> &'static [&'static str]
fn long_string_fields(&self) -> &'static [&'static str]
DBF_CHAR
array field that semantically holds a NUL-terminated string. Read moreSource§fn process_passive_fields(&self) -> Option<&'static [&'static str]>
fn process_passive_fields(&self) -> Option<&'static [&'static str]>
pp(TRUE) in this record type’s DBD, or
None if the type’s pp-flags have not been modeled. Read moreSource§fn validate_put(&self, _field: &str, _value: &EpicsValue) -> Result<(), CaError>
fn validate_put(&self, _field: &str, _value: &EpicsValue) -> Result<(), CaError>
Source§fn primary_field(&self) -> &'static str
fn primary_field(&self) -> &'static str
Source§fn val(&self) -> Option<EpicsValue>
fn val(&self) -> Option<EpicsValue>
Source§fn set_val(&mut self, value: EpicsValue) -> Result<(), CaError>
fn set_val(&mut self, value: EpicsValue) -> Result<(), CaError>
Source§fn accepts_raw_soft_input(&self) -> bool
fn accepts_raw_soft_input(&self) -> bool
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>
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>
recXxx.c behaviour: Read moreSource§fn can_device_write(&self) -> bool
fn can_device_write(&self) -> bool
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
Source§fn should_fire_forward_link(&self) -> bool
fn should_fire_forward_link(&self) -> bool
Source§fn should_output(&self) -> bool
fn should_output(&self) -> bool
Source§fn on_output_complete(&mut self)
fn on_output_complete(&mut self)
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
Source§fn monitor_value_changed(&self) -> Option<bool>
fn monitor_value_changed(&self) -> Option<bool>
Source§fn monitor_always_post(&self) -> (bool, bool)
fn monitor_always_post(&self) -> (bool, bool)
menuPost “Always” override for the VALUE / LOG monitor masks. Read moreSource§fn monitor_deadband_value(&self) -> Option<EpicsValue>
fn monitor_deadband_value(&self) -> Option<EpicsValue>
Source§fn monitor_deadband_field(&self) -> &'static str
fn monitor_deadband_field(&self) -> &'static str
Self::monitor_deadband_value
reads. A record overriding one must override both consistently. Read moreSource§fn alarm_cycle_monitored_fields(&self) -> &'static [&'static str]
fn alarm_cycle_monitored_fields(&self) -> &'static [&'static str]
monitor() posts on every cycle whose
alarm transition fired, even when their value did not change. Read moreSource§fn init_record(&mut self, _pass: u8) -> Result<(), CaError>
fn init_record(&mut self, _pass: u8) -> Result<(), CaError>
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>
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])
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>
Source§fn monitor_side_effect_fields(
&self,
_put_field: &str,
) -> &'static [&'static str]
fn monitor_side_effect_fields( &self, _put_field: &str, ) -> &'static [&'static str]
put_field changed them as a side effect, without driving a full
process cycle. Read moreSource§fn as_any_mut(&mut self) -> Option<&mut (dyn Any + 'static)>
fn as_any_mut(&mut self) -> Option<&mut (dyn Any + 'static)>
Source§fn value_is_undefined(&self) -> bool
fn value_is_undefined(&self) -> bool
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)
nsta/nsev via recGblSetSevr. Read moreSource§fn multi_input_links(&self) -> &[(&'static str, &'static str)]
fn multi_input_links(&self) -> &[(&'static str, &'static str)]
Source§fn multi_output_links(&self) -> &[(&'static str, &'static str)]
fn multi_output_links(&self) -> &[(&'static str, &'static str)]
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>
Source§fn pre_process_actions(&mut self) -> Vec<ProcessAction>
fn pre_process_actions(&mut self) -> Vec<ProcessAction>
Source§fn pre_input_link_actions(&mut self) -> Vec<ProcessAction>
fn pre_input_link_actions(&mut self) -> Vec<ProcessAction>
multi_input_links, INP -> value-field) fetch for this cycle. Read moreSource§fn set_async_context(&mut self, _name: String, _db: AsyncDbHandle)
fn set_async_context(&mut self, _name: String, _db: AsyncDbHandle)
add_record), delivering the record its own canonical name plus a
cycle-free crate::server::database::AsyncDbHandle for driving
async-side updates from OUTSIDE a process() cycle. Read moreSource§fn init_links(&mut self, _common: &CommonFields)
fn init_links(&mut self, _common: &CommonFields)
INP/OUT/FLNK/…) have been resolved and the
init_record passes have run, with the record’s resolved
CommonFields. Read moreSource§fn set_device_did_compute(&mut self, _did_compute: bool)
fn set_device_did_compute(&mut self, _did_compute: bool)
Source§fn soft_channel_skips_convert(&self) -> bool
fn soft_channel_skips_convert(&self) -> bool
RVAL → VAL)
convert() step that must be skipped on a Soft Channel input. Read more