class App::Trigger
- App::Trigger
- App::Base
- ActionController::Base
- Reference
- Object
Overview
a controller for manually activating the trigger
Defined in:
controllers/trigger.crConstant Summary
-
IO_CHIP_PATH =
Path[ENV["IO_CHIP_PATH"]? || "/dev/gpiochip0"]
-
OPENAPI =
YAML.parse(File.exists?("openapi.yml") ? File.read("openapi.yml") : "{}")
-
this file is built as part of the docker build
-
PARSER_LIST =
["application/json"]
-
a controller for manually activating the trigger
-
RELAY_TRIGGER_LINE =
(ENV["RELAY_TRIGGER_LINE"]? || "26").to_i
-
RESPONDER_LIST =
["application/json", "application/yaml", "text/html"]
-
a controller for manually activating the trigger
Class Method Summary
-
.activate(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
Helper methods for performing redirect_to calls
- .activate_for(time : Time::Span)
-
.base_route
Helper for obtaining base route
- .io_chip : GPIO::Chip
- .mutex : Mutex
- .trigger_relay : GPIO::Line
Instance Method Summary
-
#activate(relay_time : Int32 = 500) : Nil
change the state of the chicken door
-
#base_route(*args, **options)
Helper for obtaining base route
-
#base_route(*args, **options, &)
Helper for obtaining base route
-
#manual_state(state : State) : Nil
change the state of the chicken door
-
#openapi : YAML::Any
returns the OpenAPI representation of this service
Instance methods inherited from class App::Base
bad_media_type(error) : AC::Error::ContentResponse
bad_media_type,
invalid_param(error) : AC::Error::ParameterResponse
invalid_param,
set_request_id
set_request_id
Class Method Detail
def self.activate(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
#
Helper methods for performing redirect_to calls