class PlaceOS::Driver::Proxy::System

Defined in:

placeos-driver/proxy/system.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(model : DriverModel::ControlSystem, reply_id : String, logger : ::Log = ::Log.for(PlaceOS::Driver::Proxy::System), subscriptions : Proxy::Subscriptions = Proxy::Subscriptions.new) #

Local system available to logic driver


[View source]
def self.new(system_id : String, reply_id : String, logger : ::Log = ::Log.for(PlaceOS::Driver::Proxy::System), subscriptions : Proxy::Subscriptions = Proxy::Subscriptions.new) #

Remote system (lazily loaded config)


[View source]

Class Method Detail

def self.driver_metadata?(system_id, module_name, index) : PlaceOS::Driver::DriverModel::Metadata | Nil #

Retrieve module metadata from redis


[View source]
def self.driver_metadata?(module_id) : PlaceOS::Driver::DriverModel::Metadata | Nil #

Retrieve module metadata from redis, bypassing module_id lookup


[View source]
def self.module_id?(system_id, module_name, index) : String | Nil #

Retrieve module metadata from redis


[View source]

Instance Method Detail

def [](module_name) #

[View source]
def all(module_name) : PlaceOS::Driver::Proxy::Drivers #

[View source]
def all(module_name, *, implementing) : PlaceOS::Driver::Proxy::Drivers #

[View source]
def bookable(*args, **options) #

[View source]
def bookable(*args, **options, &) #

[View source]
def capacity(*args, **options) #

[View source]
def capacity(*args, **options, &) #

[View source]
def code(*args, **options) #

[View source]
def code(*args, **options, &) #

[View source]

[View source]
def count(module_name) #

Grabs the number of a particular device type


[View source]
def description(*args, **options) #

[View source]
def description(*args, **options, &) #

[View source]
def display_name(*args, **options) #

[View source]
def display_name(*args, **options, &) #

[View source]
def email(*args, **options) #

[View source]
def email(*args, **options, &) #

[View source]
def exists?(module_name, index = nil) : Bool #

Checks for the existence of a particular module


[View source]
def features(*args, **options) #

[View source]
def features(*args, **options, &) #

[View source]
def get(module_name, index) #

[View source]
def get(module_name) #

[View source]
def id : String #

[View source]
def implementing(interface) : PlaceOS::Driver::Proxy::Drivers #

grabs all modules implementing(Powerable) for example


[View source]
def load_complete(&callback : PlaceOS::Driver::Subscriptions::ChannelSubscription, String -> Nil) #

coordination to occur on placeos core


[View source]
def logger : ::Log #

[View source]
def map_id(*args, **options) #

[View source]
def map_id(*args, **options, &) #

[View source]
def modules #

Returns a list of all the module names in the system


[View source]
def name(*args, **options) #

[View source]
def name(*args, **options, &) #

[View source]
def subscribe(module_name, index, status, &callback : PlaceOS::Driver::Subscriptions::IndirectSubscription, String -> Nil) : PlaceOS::Driver::Subscriptions::IndirectSubscription #

Manages subscribing to all the non-local subscriptions


[View source]
def subscribe(module_name, status, &callback : PlaceOS::Driver::Subscriptions::IndirectSubscription, String -> Nil) : PlaceOS::Driver::Subscriptions::IndirectSubscription #

[View source]
def support_url(*args, **options) #

[View source]
def support_url(*args, **options, &) #

[View source]
def timezone(*args, **options) #

[View source]
def timezone(*args, **options, &) #

[View source]
def type(*args, **options) #

[View source]
def type(*args, **options, &) #

[View source]
def zones(*args, **options) #

[View source]
def zones(*args, **options, &) #

[View source]