pub struct TrendLogMultipleObject { /* private fields */ }Expand description
BACnet TrendLogMultiple object (type 27).
Multi-channel trending. Unlike TrendLog, which monitors a single property, TrendLogMultiple monitors a list of device-object-property references and logs one value per reference in each record. The database’s trend poller samples every reference every Log_Interval while Logging_Type is POLLED, at clock-aligned times when Align_Intervals asks for them, and once for each Trigger while it is TRIGGERED. Records are kept only while Enable is TRUE and the local time lies between Start_Time and Stop_Time.
Implementations§
Source§impl TrendLogMultipleObject
impl TrendLogMultipleObject
Sourcepub fn new(
instance: u32,
name: impl Into<String>,
buffer_size: u32,
) -> Result<Self, Error>
pub fn new( instance: u32, name: impl Into<String>, buffer_size: u32, ) -> Result<Self, Error>
Build a log with logging enabled that holds at most buffer_size
records.
Sourcepub fn add_record(
&mut self,
record: BACnetLogMultipleRecord,
) -> Result<(), Error>
pub fn add_record( &mut self, record: BACnetLogMultipleRecord, ) -> Result<(), Error>
Add a record to the log buffer.
Success does not guarantee a resident ordinary record: disabled logging and a record outside the Start_Time / Stop_Time window are ignored, zero-capacity logging may only count, and a stop-before-full transition records status instead. Missing/invalid status clocks fail atomically with DEVICE / OPERATIONAL_PROBLEM. A successful call serves a pending Trigger, which reads FALSE again, even when the record is ignored (Enable FALSE, or outside the window): the acquisition was made.
Sourcepub fn add_property_reference(
&mut self,
reference: BACnetDeviceObjectPropertyReference,
) -> Result<(), Error>
pub fn add_property_reference( &mut self, reference: BACnetDeviceObjectPropertyReference, ) -> Result<(), Error>
Append a reference to Log_DeviceObjectProperty as local configuration: the log buffer is left as it is.
A reference may name another device; the poller then logs a failure
in its slot of each record instead of reading it. A Device member that
isn’t a Device identifier fails with PROPERTY / VALUE_OUT_OF_RANGE, and
a reference past MAX_LOG_DEVICE_OBJECT_PROPERTIES with RESOURCES /
NO_SPACE_TO_WRITE_PROPERTY; either leaves the array unchanged.
Sourcepub fn records(&self) -> &VecDeque<BACnetLogMultipleRecord>
pub fn records(&self) -> &VecDeque<BACnetLogMultipleRecord>
Get the current buffer contents.
Sourcepub fn total_record_count(&self) -> u32
pub fn total_record_count(&self) -> u32
Total_Record_Count, as
TrendLogObject::total_record_count
serves it.
Sourcepub fn restore_log_buffer(
&mut self,
total_record_count: u32,
records: impl IntoIterator<Item = BACnetLogMultipleRecord>,
) -> Result<(), Error>
pub fn restore_log_buffer( &mut self, total_record_count: u32, records: impl IntoIterator<Item = BACnetLogMultipleRecord>, ) -> Result<(), Error>
Restore the log buffer, or seed Total_Record_Count with no records,
before the log is added to an ObjectDatabase, under the rules of
TrendLogObject::restore_log_buffer
(#1537). Records aren’t checked against Log_DeviceObjectProperty,
which may have changed since they were taken. After a restart, follow
it with record_interruption, which
counts toward Total_Record_Count.
Sourcepub fn record_interruption(
&mut self,
date: Date,
time: Time,
) -> Result<(), Error>
pub fn record_interruption( &mut self, date: Date, time: Time, ) -> Result<(), Error>
Append a LOG_INTERRUPTED status record, as
TrendLogObject::record_interruption
does, after restoring the log on a restart (#1537).
Sourcepub fn set_description(&mut self, desc: impl Into<String>)
pub fn set_description(&mut self, desc: impl Into<String>)
Set the description string.
Sourcepub fn set_logging_type(
&mut self,
logging_type: LoggingType,
) -> Result<(), Error>
pub fn set_logging_type( &mut self, logging_type: LoggingType, ) -> Result<(), Error>
Set Logging_Type, as a client’s write does: POLLED or TRIGGERED. COV
logging isn’t allowed for this object type (Clause 12.30.12), so COV,
like any other value, is PROPERTY / VALUE_OUT_OF_RANGE and changes
nothing. POLLED with a zero Log_Interval sets
DEFAULT_LOG_INTERVAL; TRIGGERED sets
Log_Interval to zero.
Sourcepub fn set_log_interval(&mut self, hundredths: u32) -> Result<(), Error>
pub fn set_log_interval(&mut self, hundredths: u32) -> Result<(), Error>
Set Log_Interval in hundredths of a second. While Logging_Type is TRIGGERED it is read-only and this is PROPERTY / WRITE_ACCESS_DENIED.
Sourcepub fn set_start_time(&mut self, date: Date, time: Time) -> Result<(), Error>
pub fn set_start_time(&mut self, date: Date, time: Time) -> Result<(), Error>
Set Start_Time, the local date and time from which records are kept, as local configuration: nothing is recorded for the change itself, but the log notes at once where the window stands, so a client’s write that then opens or shuts it is recorded. Every field unspecified leaves the start open. Any other value has to name an actual date and time, or it is PROPERTY / VALUE_OUT_OF_RANGE: the weekday may stay unspecified, and unspecified seconds or hundredths count as zero.
Sourcepub fn set_stop_time(&mut self, date: Date, time: Time) -> Result<(), Error>
pub fn set_stop_time(&mut self, date: Date, time: Time) -> Result<(), Error>
Set Stop_Time, the local date and time from which records are no
longer kept, under the same rules as
set_start_time.
Sourcepub fn set_align_intervals(&mut self, align: bool)
pub fn set_align_intervals(&mut self, align: bool)
Set Align_Intervals: whether a POLLED log acquires at clock-aligned times.
Sourcepub fn set_interval_offset(&mut self, hundredths: u32)
pub fn set_interval_offset(&mut self, hundredths: u32)
Set Interval_Offset, the delay after each aligned boundary, in hundredths; it applies modulo Log_Interval.
Sourcepub fn trigger(&mut self) -> Result<(), Error>
pub fn trigger(&mut self) -> Result<(), Error>
Ask for one acquisition, as a local process writing Trigger TRUE does. Only a TRIGGERED log takes it; any other is PROPERTY / NOT_CONFIGURED_FOR_TRIGGERED_LOGGING.
Sourcepub fn set_notification_threshold(&mut self, threshold: u32)
pub fn set_notification_threshold(&mut self, threshold: u32)
Set Notification_Threshold, the number of records that makes a BUFFER_READY report; zero, the default, makes none.
Sourcepub fn set_notification_class(&mut self, class: u32)
pub fn set_notification_class(&mut self, class: u32)
Set Notification_Class: the number of the Notification Class whose recipients get the log’s reports (0 by default).
Sourcepub fn set_event_enable(&mut self, enable: EventTransitionBits)
pub fn set_event_enable(&mut self, enable: EventTransitionBits)
Set Event_Enable; a report goes out only while its TO_NORMAL flag is set, as it is by default.
Sourcepub fn set_notify_type(&mut self, notify_type: NotifyType)
pub fn set_notify_type(&mut self, notify_type: NotifyType)
Set Notify_Type, sent with each report (EVENT by default).
Trait Implementations§
Source§impl BACnetObject for TrendLogMultipleObject
impl BACnetObject for TrendLogMultipleObject
Source§fn object_identifier(&self) -> ObjectIdentifier
fn object_identifier(&self) -> ObjectIdentifier
Source§fn object_name(&self) -> &str
fn object_name(&self) -> &str
Source§fn read_property(
&self,
property: PropertyIdentifier,
array_index: Option<u32>,
) -> Result<PropertyValue, Error>
fn read_property( &self, property: PropertyIdentifier, array_index: Option<u32>, ) -> Result<PropertyValue, Error>
Source§fn write_property(
&mut self,
property: PropertyIdentifier,
array_index: Option<u32>,
value: PropertyValue,
_priority: Option<u8>,
) -> Result<(), Error>
fn write_property( &mut self, property: PropertyIdentifier, array_index: Option<u32>, value: PropertyValue, _priority: Option<u8>, ) -> Result<(), Error>
Source§fn property_metadata(&self) -> Cow<'_, [PropertyMetadata]>
fn property_metadata(&self) -> Cow<'_, [PropertyMetadata]>
Source§fn property_list(&self) -> Cow<'static, [PropertyIdentifier]>
fn property_list(&self) -> Cow<'static, [PropertyIdentifier]>
Source§fn log_record_identities_internal(&self) -> Option<Vec<LogRecordIdentity>>
fn log_record_identities_internal(&self) -> Option<Vec<LogRecordIdentity>>
Source§fn log_buffer_internal(&self) -> Option<&dyn LogBufferRecords>
fn log_buffer_internal(&self) -> Option<&dyn LogBufferRecords>
Source§fn add_trend_multiple_record(
&mut self,
record: BACnetLogMultipleRecord,
) -> Result<(), Error>
fn add_trend_multiple_record( &mut self, record: BACnetLogMultipleRecord, ) -> Result<(), Error>
Source§fn evaluate_intrinsic_reporting(&mut self) -> Option<TransitionOutcome>
fn evaluate_intrinsic_reporting(&mut self) -> Option<TransitionOutcome>
Source§fn tick_intrinsic_reporting(&mut self) -> Option<TransitionOutcome>
fn tick_intrinsic_reporting(&mut self) -> Option<TransitionOutcome>
Time_Delay countdown for a pending transition. Read moreSource§fn write_property_from(
&mut self,
property: PropertyIdentifier,
array_index: Option<u32>,
value: PropertyValue,
priority: Option<u8>,
_origin: &CommandOrigin,
) -> Result<(), Error>
fn write_property_from( &mut self, property: PropertyIdentifier, array_index: Option<u32>, value: PropertyValue, priority: Option<u8>, _origin: &CommandOrigin, ) -> Result<(), Error>
Source§fn is_writable_property(&self, property: PropertyIdentifier) -> bool
fn is_writable_property(&self, property: PropertyIdentifier) -> bool
property for this object. Read moreSource§fn is_array_property(&self, property: PropertyIdentifier) -> bool
fn is_array_property(&self, property: PropertyIdentifier) -> bool
property accepts an array index on this object. Read moreSource§fn is_list_property(&self, property: PropertyIdentifier) -> bool
fn is_list_property(&self, property: PropertyIdentifier) -> bool
property is a BACnetLIST on this object. Read moreSource§fn is_createable(&self) -> bool
fn is_createable(&self) -> bool
Source§fn creation_only_properties(&self) -> &'static [PropertyIdentifier]
fn creation_only_properties(&self) -> &'static [PropertyIdentifier]
Source§fn initialize_property(
&mut self,
_property: PropertyIdentifier,
_value: PropertyValue,
) -> Result<(), Error>
fn initialize_property( &mut self, _property: PropertyIdentifier, _value: PropertyValue, ) -> Result<(), Error>
Self::creation_only_properties, written whole. Read moreSource§fn is_deleteable(&self) -> bool
fn is_deleteable(&self) -> bool
Source§fn required_properties(&self) -> Cow<'static, [PropertyIdentifier]>
fn required_properties(&self) -> Cow<'static, [PropertyIdentifier]>
Source§fn supports_cov(&self) -> bool
fn supports_cov(&self) -> bool
Source§fn supports_subscribe_cov_property(&self) -> bool
fn supports_subscribe_cov_property(&self) -> bool
Source§fn supports_cov_property(&self, property: PropertyIdentifier) -> bool
fn supports_cov_property(&self, property: PropertyIdentifier) -> bool
Source§fn cov_increment(&self) -> Option<f64>
fn cov_increment(&self) -> Option<f64>
Source§fn cov_reported_properties(&self) -> &'static [CovReportedProperty]
fn cov_reported_properties(&self) -> &'static [CovReportedProperty]
Source§fn set_overridden(&mut self, _overridden: bool)
fn set_overridden(&mut self, _overridden: bool)
Source§fn tick_schedule(
&mut self,
_today: SpecificDate,
_time: Time,
_calendar_active: &dyn Fn(ObjectIdentifier) -> bool,
) -> Option<ScheduleWrite>
fn tick_schedule( &mut self, _today: SpecificDate, _time: Time, _calendar_active: &dyn Fn(ObjectIdentifier) -> bool, ) -> Option<ScheduleWrite>
Source§fn take_owed_schedule_writes(&mut self) -> Vec<ScheduleWrite>
fn take_owed_schedule_writes(&mut self) -> Vec<ScheduleWrite>
Source§fn complete_schedule_write(
&mut self,
_write: &ScheduleWrite,
_outcomes: &[ScheduleTargetOutcome],
) -> bool
fn complete_schedule_write( &mut self, _write: &ScheduleWrite, _outcomes: &[ScheduleTargetOutcome], ) -> bool
write, one of this schedule’s writes:
outcomes holds one entry per member of write.references, in order. Read moreSource§fn retry_refusals_naming(
&self,
_target: ObjectIdentifier,
) -> Option<ScheduleWrite>
fn retry_refusals_naming( &self, _target: ObjectIdentifier, ) -> Option<ScheduleWrite>
retry of the current value to the
references whose last write was refused and that name target, an
object just added to the database (#1440), so the refusal can clear
without waiting for the next pass. None when no such refusal
stands, or when the pass itself would retry nothing: out of service,
outside Effective_Period, or with a NULL Present_Value. Only
meaningful for Schedule objects; default returns None.Source§fn acknowledge_alarm(
&mut self,
_transition_bit: EventTransitionBits,
) -> Result<(), Error>
fn acknowledge_alarm( &mut self, _transition_bit: EventTransitionBits, ) -> Result<(), Error>
transition_bit flags in acked_transitions.
Returns Ok(()) if the object supports event detection, Err otherwise.Source§fn apply_life_safety_operation(
&mut self,
_operation: LifeSafetyOperation,
) -> Result<LifeSafetyOperationOutcome, Error>
fn apply_life_safety_operation( &mut self, _operation: LifeSafetyOperation, ) -> Result<LifeSafetyOperationOutcome, Error>
Source§fn set_life_safety_operation_expected_internal(
&mut self,
_operation: LifeSafetyOperation,
) -> Result<(), Error>
fn set_life_safety_operation_expected_internal( &mut self, _operation: LifeSafetyOperation, ) -> Result<(), Error>
Source§fn set_event_state_internal(&mut self, _state: EventState) -> Result<(), Error>
fn set_event_state_internal(&mut self, _state: EventState) -> Result<(), Error>
Event_State transition. Read moreSource§fn enrollment_eval_state_internal(&self) -> Option<EventEnrollmentEvalState>
fn enrollment_eval_state_internal(&self) -> Option<EventEnrollmentEvalState>
Source§fn set_enrollment_eval_state_internal(
&mut self,
_state: EventEnrollmentEvalState,
) -> Result<(), Error>
fn set_enrollment_eval_state_internal( &mut self, _state: EventEnrollmentEvalState, ) -> Result<(), Error>
Source§fn enrollment_eval_source_internal(
&self,
) -> Option<Option<EventEnrollmentMonitoredSource>>
fn enrollment_eval_source_internal( &self, ) -> Option<Option<EventEnrollmentMonitoredSource>>
Source§fn set_enrollment_eval_source_internal(
&mut self,
_source: Option<EventEnrollmentMonitoredSource>,
) -> Result<(), Error>
fn set_enrollment_eval_source_internal( &mut self, _source: Option<EventEnrollmentMonitoredSource>, ) -> Result<(), Error>
Source§fn set_acked_transitions_internal(
&mut self,
_transition_bit: EventTransitionBits,
_acknowledged: bool,
) -> Result<(), Error>
fn set_acked_transitions_internal( &mut self, _transition_bit: EventTransitionBits, _acknowledged: bool, ) -> Result<(), Error>
Acked_Transitions bit on a received event-state
transition. Read moreSource§fn evaluate_reliability_internal(
&mut self,
) -> Result<ReliabilityEvaluation, Error>
fn evaluate_reliability_internal( &mut self, ) -> Result<ReliabilityEvaluation, Error>
Reliability. Read moreSource§fn set_reliability_internal(
&mut self,
_reliability: Reliability,
) -> Result<(), Error>
fn set_reliability_internal( &mut self, _reliability: Reliability, ) -> Result<(), Error>
Reliability value. Read moreSource§fn set_present_value_internal(
&mut self,
_value: PropertyValue,
) -> Result<(), Error>
fn set_present_value_internal( &mut self, _value: PropertyValue, ) -> Result<(), Error>
Present_Value supplied by the local application. Read moreSource§fn set_present_value_from_internal(
&mut self,
value: PropertyValue,
_origin: &CommandOrigin,
) -> Result<(), Error>
fn set_present_value_from_internal( &mut self, value: PropertyValue, _origin: &CommandOrigin, ) -> Result<(), Error>
Source§fn set_tracking_value_internal(
&mut self,
_value: PropertyValue,
) -> Result<(), Error>
fn set_tracking_value_internal( &mut self, _value: PropertyValue, ) -> Result<(), Error>
Tracking_Value the local application derived. Read moreSource§fn report_access_input_internal(
&mut self,
_input: AccessControlInput,
) -> Result<(), Error>
fn report_access_input_internal( &mut self, _input: AccessControlInput, ) -> Result<(), Error>
AccessControlInput. Read more