class DoorCtrl::Door

Overview

door control API

Defined in:

controllers/door.cr

Constant Summary

PARSER_LIST = ["application/json"]

door control API

RESPONDER_LIST = ["application/json"]

door control API

Class Method Summary

Instance Method Summary

Instance methods inherited from class DoorCtrl::Application

bad_media_type(error) : AC::Error::ContentResponse bad_media_type, ensure_authenticated ensure_authenticated, invalid_param(error) : AC::Error::ParameterResponse invalid_param, set_request_id set_request_id, unauthorized(_error) : Nil unauthorized

Class Method Detail

def self.base_route #

Helper for obtaining base route


def self.close_relay : GPIO::Line #

[View source]
def self.io_chip : GPIO::Chip #

[View source]
def self.open_relay : GPIO::Line #

[View source]
def self.set_state(door : DoorState) : State #

[View source]
def self.status : State #

[View source]
def self.status(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts) #

Helper methods for performing redirect_to calls


Instance Method Detail

def base_route(*args, **options) #

Helper for obtaining base route


def base_route(*args, **options, &) #

Helper for obtaining base route


def set_state(door : DoorState) : State #

change the state of the chicken door


[View source]
def status : State #

the current state of the chicken door


[View source]