class Floorsense::LockerLocationService

Included Modules

Defined in:

floorsense/locker_location_service.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 controllers : Hash(Int32, ControllerInfo) #

Controller id => Controller info


[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 get_floorsense_user(place_user_id : String) : String #

[View source]
def get_locker_bank(locker_key : String) #

[View source]
def get_place_user_id(floorsense_id : String | Int64) : String #

[View source]
def get_user_email(floorsense_id : String | Int64) : String #

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

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


[View source]
def locker_allocate(user_id : String, bank_id : String | Int64, locker_id : String | Int64 | Nil = nil, expires_at : Int64 | Nil = nil) : PlaceLocker #

allocates a locker now, the allocation may expire


[View source]
def locker_banks #

[View source]
def locker_release(bank_id : String | Int64, locker_id : String | Int64, owner_id : String | Nil = nil) : Nil #

return the locker to the pool


[View source]
def locker_share(bank_id : String | Int64, locker_id : String | Int64, owner_id : String, share_with : String) : Nil #

[View source]
def locker_shared_with(bank_id : String | Int64, locker_id : String | Int64, owner_id : String) : Array(String) #

a list of user-ids that the locker is shared with. this can be placeos user ids or emails


[View source]
def locker_unlock(bank_id : String | Int64, locker_id : String | Int64, owner_id : String | Nil = nil, open_time : Int32 = 60, pin_code : String | Nil = nil) : Nil #

[View source]
def locker_unshare(bank_id : String | Int64, locker_id : String | Int64, owner_id : String, shared_with_id : String | Nil = nil) : Nil #

[View source]
def lockers_allocated_to(user_id : String) : Array(PlaceLocker) #

a list of lockers that are allocated to the user


[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 zone_building : String | Nil #

[View source]
def zone_mappings : Hash(String, Array(Int32)) #

level zone_id => controller ids


[View source]