class EdgeAI::Monitor

Defined in:

controllers/monitor.cr

Constant Summary

DETECT_MUTEX = Mutex.new
DETECT_SOCKETS = Hash(String, Array(HTTP::WebSocket)).new do |hash, key| hash[key] = [] of HTTP::WebSocket end
PARSER_LIST = ["application/json"]
RESPONDER_LIST = ["application/json", "application/yaml"]
STREAM_MUTEX = Mutex.new
STREAM_PLAYBACK = Hash(String, ConfidenceMonitor).new
STREAM_SOCKETS = Hash(String, Array(HTTP::WebSocket)).new do |hash, key| hash[key] = [] of HTTP::WebSocket end

Class Method Summary

Instance Method Summary

Instance methods inherited from class EdgeAI::Base

bad_media_type(error) : AC::Error::ContentResponse bad_media_type, invalid_param(error) : AC::Error::ParameterResponse invalid_param, not_found(error) : NamedTuple(error: String | Nil) not_found, set_request_id set_request_id

Class Method Detail

def self.base_route #

Helper for obtaining base route


def self.stream(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts) #

Helper methods for performing redirect_to calls


def self.stream_to_sockets(monitor : ConfidenceMonitor) #

[View source]

Instance Method Detail

def base_route(*args, **options) #

Helper for obtaining base route


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

Helper for obtaining base route


def config : Configuration::Pipeline #

[View source]
def config? : Configuration::Pipeline | Nil #

[View source]
def detect(socket) #

pushes detections found in the video stream in realtime to connected sockets


[View source]
def detect_default(socket) #

pushes detections found in the first video stream in realtime to connected sockets


[View source]
def find_configuration_config(id : String) #

[View source]
def id : String #

[View source]
def id? : String | Nil #

[View source]
def stream(socket) #

pushes the video stream down the websocket


[View source]