class Freespace::SensorAPI

Included Modules

Defined in:

freespace/sensor_api.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.driver_interface : String #

Instance Method Detail

def check_ownership_of(mac_address : String) : OwnershipMAC | Nil #
Description copied from module PlaceOS::Driver::Interface::Locatable

return nil or {"location": "wireless", "assigned_to": "bob123", "mac_address": "abcd"}


[View source]
def client : STOMP::Client #

[View source]
def client? : STOMP::Client | Nil #

[View source]
def connected #

[View source]
def device_locations(zone_id : String, location : String | Nil = nil) #
Description copied from module PlaceOS::Driver::Interface::Locatable

array of devices and their x, y coordinates


[View source]
def disconnected #

[View source]
def get_location(location_id : String | Int64) : Array(Space) #

[View source]
def get_token : String #

Alternative to using basic auth, but here really only for testing with postman


[View source]
def heart_beat #

[View source]
def locate_user(email : String | Nil = nil, username : String | Nil = nil) #

=================================== Locatable Interface functions


[View source]
def macs_assigned_to(email : String | Nil = nil, username : String | Nil = nil) : Array(String) #
Description copied from module PlaceOS::Driver::Interface::Locatable

return an array of MAC address strings lowercase with no seperation characters abcdeffd1234 etc


[View source]
def on_update #

[View source]
def received(bytes, task) #

[View source]
def spaces_details : Hash(Int64, Freespace::Space) #

[View source]
def spaces_state : Hash(Int64, Freespace::SpaceActivity) #

[View source]
def websocket_headers #

We need an API key to connect to the websocket


[View source]