struct
PlaceOS::Driver::Presence::Smoother::Snapshot
Defined in:
placeos-driver/interface/presence_smoother.crConstructors
Instance Method Summary
-
#changed : Bool
Whether the smoothed state changed during this poll.
- #clone
-
#confidence : Float64
Confidence in the smoothed output state, from 0.0 to 1.0.
-
#confidence_percent : Float64
Percentage equivalent of confidence, from 0.0 to 100.0.
- #copy_with(state _state = @state, changed _changed = @changed, raw_state _raw_state = @raw_state, confidence _confidence = @confidence, confidence_percent _confidence_percent = @confidence_percent, on_fraction _on_fraction = @on_fraction, off_fraction _off_fraction = @off_fraction, observed_for _observed_for = @observed_for, window_ready _window_ready = @window_ready)
-
#observed_for : Time::Span
Amount of history currently available.
- #off_fraction : Float64
-
#on_fraction : Float64
Proportion of the evaluated period attributed to each raw state.
-
#raw_state : Bool
Most recently observed raw sensor state.
-
#state : Bool
Smoothed/latched output state.
-
#window_ready : Bool
True once at least one complete smoothing window exists.
Constructor Detail
def self.new(state : Bool, changed : Bool, raw_state : Bool, confidence : Float64, confidence_percent : Float64, on_fraction : Float64, off_fraction : Float64, observed_for : Time::Span, window_ready : Bool)
#
Instance Method Detail
def copy_with(state _state = @state, changed _changed = @changed, raw_state _raw_state = @raw_state, confidence _confidence = @confidence, confidence_percent _confidence_percent = @confidence_percent, on_fraction _on_fraction = @on_fraction, off_fraction _off_fraction = @off_fraction, observed_for _observed_for = @observed_for, window_ready _window_ready = @window_ready)
#