module Cisco::CollaborationEndpoint::XAPI
Direct including types
- Cisco::CollaborationEndpoint::Cameras
- Cisco::CollaborationEndpoint::Powerable
- Cisco::CollaborationEndpoint::Presentation
- Cisco::CollaborationEndpoint::UIExtensions
Defined in:
cisco/collaboration_endpoint/response.crcisco/collaboration_endpoint/xapi.cr
Constant Summary
-
BOOL_OR =
->(term : String) do ->(val : String) do val == term ? term : BOOLEAN.call(val) end end
-
BOOLEAN =
->(val : String) do TRUTHY.includes?(val.downcase) end
-
COMMAND_RESPONSE =
Regex.union(INVALID_COMMAND, SUCCESS)
-
FALSEY =
{"false", "unavailable", "off", "inactive"}
-
INVALID_COMMAND =
/(?<=Command not recognized\.)[\r\n]+/
-
Regexp's for tokenizing the xAPI command and response structure.
-
LOGIN_COMPLETE =
/Login successful/
-
PARSERS =
{"TTPAR_OnOff" => BOOLEAN, "TTPAR_OnOffAuto" => BOOL_OR.call("Auto"), "TTPAR_OnOffCurrent" => BOOL_OR.call("Current"), "TTPAR_MuteEnabled" => BOOLEAN}
-
SUCCESS =
/(?<=OK)[\r\n]+/
-
TRUTHY =
{"true", "available", "standby", "on", "active"}
Class Method Summary
-
.create_action(__action__ : ActionType, *args, hash_args : Hash(String, JSON::Any::Type) = {} of String => JSON::Any::Type, priority : Int32 | Nil = nil, **kwargs)
Serialize an xAPI action into transmittable command.
- .parse(data : String)
- .tokenize(path : String)
- .value_convert(value : String, valuespace : String | Nil = nil)
-
.xcommand(path : String, hash_args : Hash(String, JSON::Any::Type) = {} of String => JSON::Any::Type, **kwargs)
Serialize an xCommand into transmittable command.
-
.xconfiguration(path : String, setting : String, value : JSON::Any::Type)
Serialize an xConfiguration action into a transmittable command.
-
.xfeedback(action : FeedbackAction, path : String | Nil = nil)
Serialize a xFeedback subscription request.
-
.xstatus(path : String)
Serialize an xStatus request into transmittable command.
Macro Summary
Class Method Detail
def self.create_action(__action__ : ActionType, *args, hash_args : Hash(String, JSON::Any::Type) = {} of String => JSON::Any::Type, priority : Int32 | Nil = nil, **kwargs)
#
Serialize an xAPI action into transmittable command.
def self.xcommand(path : String, hash_args : Hash(String, JSON::Any::Type) = {} of String => JSON::Any::Type, **kwargs)
#
Serialize an xCommand into transmittable command.
def self.xconfiguration(path : String, setting : String, value : JSON::Any::Type)
#
Serialize an xConfiguration action into a transmittable command.
Serialize a xFeedback subscription request.