pub struct LightingOutputObject { /* private fields */ }Expand description
BACnet Lighting Output object.
Commandable output with a 16-level priority array controlling a
floating-point present-value (0.0 to 100.0 percent). A commanded level
above 0.0 and below 1.0 is stored as 1.0, and so is such a
Relinquish_Default (see set_relinquish_default).
Lighting_Command takes a BACnetLightingCommand checked against its
operation (see set_lighting_command),
serves the last one taken and carries it out (#1384): fades and ramps move
Tracking_Value to a new level over time with In_Progress showing which,
steps change the level at once, and the warn operations blink and hold
the level for Egress_Time before relinquishing or turning it off.
Present_Value takes the blink-warn values -1.0, -2.0 and -3.0 as the
three warn commands. Tracking_Value equals Present_Value whenever no fade
or ramp is moving it and no trim holds it.
Color_Reference, Color_Override and Override_Color_Reference are absent
until set_color_link links the output to its
colour objects (#1527).
High_End_Trim, Low_End_Trim and Trim_Fade_Time are absent until set
(#1528; see set_high_end_trim). Once set,
Tracking_Value is held between the trims, In_Progress reads TRIM_ACTIVE
while that keeps it from Present_Value, and a trim change takes
Trim_Fade_Time to show.
Fades, ramps and egress timers run on the monotonic clock the database
binds; the server’s monotonic task advances them and fans their COV out.
With no clock bound they wait on advance_time_internal.
Cloning copies served state into an in-memory object. Tags persistence and pending saves remain solely with the original; cloning or dropping the copy never saves, corrects, settles, or waits on the original writer.
Implementations§
Source§impl LightingOutputObject
impl LightingOutputObject
Sourcepub fn set_high_end_trim(&mut self, trim: Option<f32>) -> Result<(), Error>
pub fn set_high_end_trim(&mut self, trim: Option<f32>) -> Result<(), Error>
Set High_End_Trim, the top of the range Tracking_Value is held in, as
a WriteProperty of it would; None takes the property away.
A trim is 1.0 to 100.0 percent; anything else is refused with VALUE_OUT_OF_RANGE and changes nothing. Setting either trim makes Trim_Fade_Time present too. Tracking_Value follows the change over Trim_Fade_Time, and a high trim below the low one sets Reliability to CONFIGURATION_ERROR and holds nothing until it’s put right.
Sourcepub fn set_low_end_trim(&mut self, trim: Option<f32>) -> Result<(), Error>
pub fn set_low_end_trim(&mut self, trim: Option<f32>) -> Result<(), Error>
Set Low_End_Trim, the bottom of the range Tracking_Value is held in
while the light is on; None takes the property away. Checked and
applied as set_high_end_trim is.
Sourcepub fn set_trim_fade_time(&mut self, milliseconds: u32) -> Result<(), Error>
pub fn set_trim_fade_time(&mut self, milliseconds: u32) -> Result<(), Error>
Set Trim_Fade_Time, the milliseconds Tracking_Value takes to follow a trim change: 0 (at once, the initial value) to 86,400,000 (a day). Anything else is refused with VALUE_OUT_OF_RANGE (Clause 12.54.Y3). The property is present only with a trim, but the setting is kept either way. A change already under way keeps its own time.
Source§impl LightingOutputObject
impl LightingOutputObject
Sourcepub fn new(instance: u32, name: impl Into<String>) -> Result<Self, Error>
pub fn new(instance: u32, name: impl Into<String>) -> Result<Self, Error>
Create a new Lighting Output object.
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_relinquish_default(&mut self, value: f32) -> Result<(), Error>
pub fn set_relinquish_default(&mut self, value: f32) -> Result<(), Error>
Set the Relinquish_Default (#270).
Checked the same way a commanded Present_Value is: a value outside 0.0 to 100.0, or NaN, is refused with VALUE_OUT_OF_RANGE, and one above 0.0 and below 1.0 is stored as 1.0, so Present_Value never falls back to a level between off and the dimmest on level. After the store, Present_Value is resolved anew from the priority array so an empty array falls back to the new default immediately.
Sourcepub fn lighting_command(&self) -> BACnetLightingCommand
pub fn lighting_command(&self) -> BACnetLightingCommand
The last command written to Lighting_Command, or operation NONE with no other field before any write.
Sourcepub fn set_lighting_command(
&mut self,
command: BACnetLightingCommand,
) -> Result<(), Error>
pub fn set_lighting_command( &mut self, command: BACnetLightingCommand, ) -> Result<(), Error>
Set Lighting_Command and carry the command out, as a WriteProperty of the encoded command would.
The command is checked against its operation (Clause 12.54, Table 12-67). NONE, a reserved operation (11 to 255) and anything past 65,535 are refused; FADE_TO and RAMP_TO need a target level. A field the operation uses must be in range: target level 0.0 to 100.0, fade time 100 to 86,400,000 ms, ramp rate and step increment 0.1 to 100.0, priority 1 to 16. Fields it doesn’t use are kept unchecked, and a proprietary operation (256 to 65,535) has only its priority checked. A refusal is VALUE_OUT_OF_RANGE and leaves the object unchanged.
A command taken is stored as written and carried out at its priority, or at Lighting_Command_Default_Priority when it has none. A level it puts in a priority slot is normalized as a commanded Present_Value is (Clause 12.54.4), so a FADE_TO 0.5 fades to 1.0 while Lighting_Command still reads 0.5. A proprietary operation is stored and does nothing else.
Sourcepub fn set_color_link(&mut self, link: Option<ColorLink>) -> Result<(), Error>
pub fn set_color_link(&mut self, link: Option<ColorLink>) -> Result<(), Error>
Link the output to the colour objects that set its colour, or take
the link away with None (#1527, Addendum 135-2020ca part 4).
A link serves Color_Reference, and with a ColorOverride also
Color_Override and Override_Color_Reference; all of them take
writes. Each reference must name a colour object, Color or Color
Temperature (instance 4194303 names none); anything else is refused
with VALUE_OUT_OF_RANGE and changes nothing. The object only stores
the references:
ObjectDatabase::lighting_color
follows them.
Sourcepub fn color_link(&self) -> Option<&ColorLink>
pub fn color_link(&self) -> Option<&ColorLink>
The colour link, if one is set.
Build with application-owned Tags storage. Saved Tags override configured
Tags only while set_profile provisions the row. Loaded data must satisfy
the normal Tags rules and the opt-in 1 MiB snapshot limit.
Sourcepub fn wait_for_tag_saves(&self)
pub fn wait_for_tag_saves(&self)
Wait for queued save attempts to finish. This is not a success receipt; writes report their own save outcomes. Unstaged local writes block.
Sourcepub fn set_profile(&mut self, profile: ObjectProfile) -> Result<(), Error>
pub fn set_profile(&mut self, profile: ObjectProfile) -> Result<(), Error>
Provision the optional Tags, Profile_Location and Profile_Name rows
before registration (#1553), as a Color object’s
set_profile does.
Sourcepub fn set_default_fade_time(&mut self, milliseconds: u32) -> Result<(), Error>
pub fn set_default_fade_time(&mut self, milliseconds: u32) -> Result<(), Error>
Set Default_Fade_Time, the milliseconds a fade request without its own fade time takes. A new object uses 100, the shortest fade the clause allows, as Default_Ramp_Rate starts at its fastest rate.
Clause 12.54.16 bounds it to 100..=86_400_000 (one day); a value outside that range is refused with VALUE_OUT_OF_RANGE and the property is left unchanged. WriteProperty applies the same check.
Sourcepub fn set_default_ramp_rate(&mut self, value: f32) -> Result<(), Error>
pub fn set_default_ramp_rate(&mut self, value: f32) -> Result<(), Error>
Set Default_Ramp_Rate, the percent-per-second rate a ramp request without its own rate uses. A new object uses 100.0.
Clause 12.54.17 bounds it to 0.1..=100.0; a value outside that range, or a non-finite one, is refused with VALUE_OUT_OF_RANGE and the property is left unchanged. WriteProperty applies the same check.
Sourcepub fn set_default_step_increment(&mut self, value: f32) -> Result<(), Error>
pub fn set_default_step_increment(&mut self, value: f32) -> Result<(), Error>
Set Default_Step_Increment, the percent a step request without its own increment adds. A new object uses 1.0.
Clause 12.54.18 bounds it to 0.1..=100.0; a value outside that range, or a non-finite one, is refused with VALUE_OUT_OF_RANGE and the property is left unchanged. WriteProperty applies the same check.
Trait Implementations§
Source§impl BACnetObject for LightingOutputObject
impl BACnetObject for LightingOutputObject
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_list(&self) -> Cow<'static, [PropertyIdentifier]>
fn property_list(&self) -> Cow<'static, [PropertyIdentifier]>
Source§fn property_metadata(&self) -> Cow<'_, [PropertyMetadata]>
fn property_metadata(&self) -> Cow<'_, [PropertyMetadata]>
Source§fn cov_increment(&self) -> Option<f64>
fn cov_increment(&self) -> Option<f64>
Source§fn supports_cov(&self) -> bool
fn supports_cov(&self) -> bool
Source§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_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_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 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 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