class PlaceOS::Driver::Interface::Sensor::Detail

Included Modules

Extended Modules

Defined in:

placeos-driver/interface/sensor.cr

Constructors

Instance Method Summary

Constructor Detail

def self.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) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def binding : String | Nil #

[View source]
def binding=(binding : String | Nil) #

[View source]
def building : String | Nil #

[View source]
def building=(building : String | Nil) #

[View source]
def convert_measurement_to(other_unit : String) #

[View source]
def id : String | Nil #

[View source]
def id=(id : String | Nil) #

[View source]
def last_seen : Int64 #

[View source]
def last_seen=(last_seen : Int64) #

[View source]
def lat : Float64 | Nil #

[View source]
def lat=(lat : Float64 | Nil) #

[View source]
def level : String | Nil #

[View source]
def level=(level : String | Nil) #

[View source]
def limit_high : Float64 | Nil #

[View source]
def limit_high=(limit_high : Float64 | Nil) #

[View source]
def limit_low : Float64 | Nil #

[View source]
def limit_low=(limit_low : Float64 | Nil) #

[View source]
def loc : Location | Nil #

unadjusted location if the sensor platform has this information


[View source]
def loc=(loc : Location | Nil) #

unadjusted location if the sensor platform has this information


[View source]
def location : String #

Resolved location data, generated by Area Management:


[View source]
def lon : Float64 | Nil #

[View source]
def lon=(lon : Float64 | Nil) #

[View source]
def mac : String #

the id can be optional if the mac address represents a single value


[View source]
def mac=(mac : String) #

the id can be optional if the mac address represents a single value


[View source]
def modified_type : String #

[View source]
def modifier : String | Nil #

[View source]
def modifier=(modifier : String | Nil) #

[View source]
def module_id : String | Nil #

binding details if interested in live updates


[View source]
def module_id=(module_id : String | Nil) #

binding details if interested in live updates


[View source]
def name : String | Nil #

#name is some useful human itentifying information about the sensor i.e. "lobby motion detector" or "Globalsat LS-113P"


[View source]
def name=(name : String | Nil) #

#name is some useful human itentifying information about the sensor i.e. "lobby motion detector" or "Globalsat LS-113P"


[View source]
def raw : String | Nil #

#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"


[View source]
def raw=(raw : String | Nil) #

#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"


[View source]
def resolution : Float64 | Nil #

[View source]
def resolution=(resolution : Float64 | Nil) #

[View source]
def s2_cell_id : String | Nil #

[View source]
def s2_cell_id=(s2_cell_id : String | Nil) #

[View source]
def seen_at : Time #

[View source]
def status : Status #

[View source]
def status=(status : Status) #

[View source]
def type : SensorType #

[View source]
def type=(type : SensorType) #

[View source]
def unit : String | Nil #

The unit type string as supported by crunits


[View source]
def unit=(unit : String | Nil) #

The unit type string as supported by crunits


[View source]
def value : Float64 #

[View source]
def value=(value : Float64) #

[View source]
def x : Float64 | Nil #

percentage coordinates from top-left when coordinates_from == nil


[View source]
def x=(x : Float64 | Nil) #

percentage coordinates from top-left when coordinates_from == nil


[View source]
def y : Float64 | Nil #

[View source]
def y=(y : Float64 | Nil) #

[View source]