class PlaceOS::Driver::Interface::Sensor::Detail
Included Modules
- JSON::Serializable
- JSON::Serializable::Unmapped
Extended Modules
- JSON::Schema
Defined in:
placeos-driver/interface/sensor.crConstructors
- .new(type : PlaceOS::Driver::Interface::Sensor::SensorType, value : Float64, last_seen : Int64, mac : String, id : Nil | String, name : Nil | String, raw : Nil | String = nil, loc : PlaceOS::Driver::Interface::Sensor::Location | Nil = nil, status : PlaceOS::Driver::Interface::Sensor::Status = Status::Normal, limit_high : Float64 | Nil = nil, limit_low : Float64 | Nil = nil, resolution : Float64 | Nil = nil, module_id : Nil | String = nil, binding : Nil | String = nil, unit : Nil | String = nil, modifier : Nil | String = nil, building : Nil | String = nil, level : Nil | String = nil)
- .new(pull : JSON::PullParser)
Instance Method Summary
- #binding : String | Nil
- #binding=(binding : String | Nil)
- #building : String | Nil
- #building=(building : String | Nil)
- #convert_measurement_to(other_unit : String)
- #id : String | Nil
- #id=(id : String | Nil)
- #last_seen : Int64
- #last_seen=(last_seen : Int64)
- #lat : Float64 | Nil
- #lat=(lat : Float64 | Nil)
- #level : String | Nil
- #level=(level : String | Nil)
- #limit_high : Float64 | Nil
- #limit_high=(limit_high : Float64 | Nil)
- #limit_low : Float64 | Nil
- #limit_low=(limit_low : Float64 | Nil)
-
#loc : Location | Nil
unadjusted location if the sensor platform has this information
-
#loc=(loc : Location | Nil)
unadjusted location if the sensor platform has this information
-
#location : String
Resolved location data, generated by Area Management:
- #lon : Float64 | Nil
- #lon=(lon : Float64 | Nil)
-
#mac : String
the id can be optional if the mac address represents a single value
-
#mac=(mac : String)
the id can be optional if the mac address represents a single value
- #modified_type : String
- #modifier : String | Nil
- #modifier=(modifier : String | Nil)
-
#module_id : String | Nil
binding details if interested in live updates
-
#module_id=(module_id : String | Nil)
binding details if interested in live updates
-
#name : String | Nil
#name
is some useful human itentifying information about the sensor i.e. -
#name=(name : String | Nil)
#name
is some useful human itentifying information about the sensor i.e. -
#raw : String | Nil
#raw
is a human readable original value i.e. -
#raw=(raw : String | Nil)
#raw
is a human readable original value i.e. - #resolution : Float64 | Nil
- #resolution=(resolution : Float64 | Nil)
- #s2_cell_id : String | Nil
- #s2_cell_id=(s2_cell_id : String | Nil)
- #seen_at : Time
- #status : Status
- #status=(status : Status)
- #type : SensorType
- #type=(type : SensorType)
-
#unit : String | Nil
The unit type string as supported by crunits
-
#unit=(unit : String | Nil)
The unit type string as supported by crunits
- #value : Float64
- #value=(value : Float64)
-
#x : Float64 | Nil
percentage coordinates from top-left when coordinates_from == nil
-
#x=(x : Float64 | Nil)
percentage coordinates from top-left when coordinates_from == nil
- #y : Float64 | Nil
- #y=(y : Float64 | Nil)
Constructor Detail
Instance Method Detail
unadjusted location if the sensor platform has this information
unadjusted location if the sensor platform has this information
#name
is some useful human itentifying information about the sensor
i.e. "lobby motion detector" or "Globalsat LS-113P"
#name
is some useful human itentifying information about the sensor
i.e. "lobby motion detector" or "Globalsat LS-113P"
#raw
is a human readable original value
i.e. Temperature is always celsius but the sensor may be reporting Fahrenheit
so an example raw string would be "88.2°F"
#raw
is a human readable original value
i.e. Temperature is always celsius but the sensor may be reporting Fahrenheit
so an example raw string would be "88.2°F"