Top Level Namespace

Included Modules

Extended Modules

Defined in:

Constant Summary

CAPTURE_STATUS = " <captures>\n <capture version=\"1.0\" id=\"0797b8dd-4c2d-415a-adf9-daf7f10e1759\">\n <title>Underwater Basket Weaving 101 (UWBW-101-100) Spring 2014</title>\n <start-time>2014-02-12T15:30:00.000Z</start-time>\n <duration>3000</duration>\n <section ref=\"ec7a622a-da43-4a31-897f-841ea192f63d\">Underwater Basket Weaving 101 (UWBW-101-100) Spring 2014</section>\n <capture-profile ref=\"74156b84-8edb-4016-a597-35abc0c1c486\" />\n <presenters>\n <presenter ref=\"9d56966e-3b39-4e26-b0f4-58bebc3ec4de\">John Doe</presenter>\n </presenters>\n <device ref=\"00-1c-08-00-14-04\" />\n </capture>\n <capture version=\"1.0\" id=\"0797b8dd-4c2d-415a-adf9-daf7f10e1769\">\n <title>Some other capture</title>\n <start-time>2014-02-13T15:30:00.000Z</start-time>\n <duration>1500</duration>\n <section ref=\"ec7a622a-da43-4a31-897f-841ea192f63e\">Some other capture</section>\n <capture-profile ref=\"74156b84-8edb-4016-a597-35abc0c1c486\" />\n <presenters>\n <presenter ref=\"9d56966e-3b39-4e26-b0f4-58bebc3ec4df\">Steve</presenter>\n </presenters>\n <device ref=\"00-1c-08-00-14-05\" />\n </capture>\n </captures>"
DEFAULT_PASSWORD_EXCLUDE = "0Oo1Il`'\\/"
DEFAULT_PASSWORD_LENGTH = 6

Password defaults

DEFAULT_PASSWORD_MINIMUM_LOWERCASE = 1
DEFAULT_PASSWORD_MINIMUM_NUMBERS = 1
DEFAULT_PASSWORD_MINIMUM_SYMBOLS = 0
DEFAULT_PASSWORD_MINIMUM_UPPERCASE = 0
DESK_LOC = {"location" => "desk", "at_location" => true, "map_id" => "desk-4-1006", "building" => "zone_1234", "level" => "zone_1234"}
EXAMPLE_COLOCATION = "[\n {\n \"trackingId\": \"00:fa:b6:03:c0:1b\",\n \"startTime\": \"2022-02-25T04:02:43Z\",\n \"endTime\": \"2022-03-02T04:02:43Z\",\n \"contacts\": [\n {\n \"trackingId\": \"00:fa:b6:02:4b:a3\",\n \"durationSec\": 7662\n }\n ]\n },\n {\n \"trackingId\": \"00:fa:b6:03:c0:1e\",\n \"startTime\": \"2022-02-25T04:02:43Z\",\n \"endTime\": \"2022-03-02T04:02:43Z\",\n \"contacts\": [\n {\n \"trackingId\": \"00:fa:b6:02:4b:a3\",\n \"durationSec\": 2386\n }\n ]\n }\n ]"
EXAMPLE_RESPONSE = "{\"content\": #{EXAMPLE_COLOCATION}}"
PASSWORD_LOWERCASE_CHARACTERS = ('a'..'z').to_a
PASSWORD_NUMBER_CHARACTERS = ('0'..'9').to_a
PASSWORD_SYMBOL_CHARACTERS = ['!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '-', '=', '{', '}', '[', ']', '|', '\\', ':', ';', '"', '\'', '<', '>', ',', '.', '?', '/', '`', '~']
PASSWORD_UPPERCASE_CHARACTERS = ('A'..'Z').to_a
RAW_GUEST_RESPONSE = "{\n \"userIdentifier\": \"Guest\",\n \"isLoggedIn\": false,\n \"isHost\": false,\n \"organizationId\": \"16917798-5582-49a7-92d0-4410f6964000\",\n \"orgName\": \"PlaceOS\",\n \"token\": \"NmFmZGQwODYtZmIzNi05OTlmLWE3N2QtMzUyNzk2MDk4NDU5MeZlNmM2YmQtNjY2_PF84_e2d06a2e-ac4e-464f-968d-a5f8a5ac6303\",\n \"spaceId\": \"Y2lzY29zcGFyazovL3VzL1JPT00vODhhZGM1ODAtOThmMi0xMWVjLThiYjQtZjM2MmNkNDBlZDQ1\",\n \"visitId\": \"1\",\n \"integrationType\": \"jose\"\n}"
RAW_HASH_RESPONSE = "{\n \"host\": [{\n \"cipher\": \"eyJwMnMiOiJCWXpoYmV4W\",\n \"short\": \"abc1234\"\n }],\n \"guest\": [{\n \"cipher\": \"eyJwMnMiOiJaVVJsejNsb1\",\n \"short\": \"def1234\"\n }],\n \"baseUrl\": \"https://somedomain.com/chat/\"\n}"
RAW_HOST_RESPONSE = "{\n \"userIdentifier\": \"Host\",\n \"isLoggedIn\": false,\n \"isHost\": true,\n \"organizationId\": \"16917798-5582-49a7-92d0-4410f6964000\",\n \"orgName\": \"PlaceOS\",\n \"token\": \"NmFmZGQwODYtZmIzNi00OTlmLWE3N2QtNzUyNzk2MDk4NDU5MjZlNmM2YmQtNjY2_PF84_e2d06a2e-ac4e-464f-968d-a5f8a5ac6303\",\n \"spaceId\": \"Y2lzY29zcGFyazovL3VzL1JPT00vODhhZGM1ODAtOThmMi0xMWVjLThiYjQtZjM2MmNkNDBlZDQ1\",\n \"visitId\": \"1\",\n \"integrationType\": \"jose\"\n}"
RETVAL = "{\n \"space_id\":\"Y2lzY29zcGFyazovL3VzL1JPT00vODhhZGM1ODAtOThmMi0xMWVjLThiYjQtZjM2MmNkNDBlZDQ1\",\n \"host_token\":\"NmFmZGQwODYtZmIzNi00OTlmLWE3N2QtNzUyNzk2MDk4NDU5MjZlNmM2YmQtNjY2_PF84_e2d06a2e-ac4e-464f-968d-a5f8a5ac6303\",\n \"guest_token\":\"NmFmZGQwODYtZmIzNi05OTlmLWE3N2QtMzUyNzk2MDk4NDU5MeZlNmM2YmQtNjY2_PF84_e2d06a2e-ac4e-464f-968d-a5f8a5ac6303\",\n \"host_url\": \"https://somedomain.com/chat/abc1234\",\n \"guest_url\": \"https://somedomain.com/chat/def1234\"\n}"
SPACES_RESPONSE = [{"id" => 96978, "location" => {"id" => 775, "scalingFactor" => nil, "raw" => true, "policy" => true}, "name" => "WS7-01", "srf" => {"x" => 91, "y" => 2169, "z" => 0}, "marker" => {"type" => "CIRCLE", "data" => "20"}, "category" => {"id" => 297, "name" => "Assigned Desks", "shortName" => nil, "showOnSignage" => false, "showInAnalytics" => true, "iconUrl" => nil, "colorScheme" => "#ffb3b3", "orderingIndex" => 113}, "sensingPolicyId" => 247, "department" => {"id" => 498, "name" => "Sales", "shortName" => nil, "showOnSignage" => false, "showInAnalytics" => false, "colorScheme" => nil, "orderingIndex" => nil}, "subCategory" => {"id" => 194, "name" => "None", "shortName" => nil, "showOnSignage" => false, "showInAnalytics" => false, "colorScheme" => nil, "orderingIndex" => 194}, "device" => {"id" => 2016090160, "displayName" => "1609010160", "updatedAt" => nil, "floorId" => nil, "shape" => nil, "coord" => nil, "blessId" => 1609010160, "blessQr" => nil, "accessedAt" => "2021-03-11T08:06:01.000+0000", "installedOn" => nil, "licenseeId" => nil, "hardware" => nil, "network" => nil, "itemId" => nil}, "markerUniqueId" => "K_2493713878097_18542", "live" => false, "capacity" => 1, "counter" => "NO_COUNTER", "serial" => 1, "locationId" => 775, "counted" => true}].to_json
SYSTEM_STATUS = " <status>\n <wall-clock-time>2014-02-12T15:02:19.037Z</wall-clock-time>\n <api-versions>\n <api-version>3.0</api-version>\n </api-versions>\n <capture-profiles>\n <capture-profile>Audio Only (Podcast). Balanced between file size &#038; quality</capture-profile>\n <capture-profile>Display Only (Podcast/Vodcast/EchoPlayer). Balanced between file size &#038; quality</capture-profile>\n <capture-profile>Display/Video (Podcast/Vodcast/EchoPlayer). Balanced between file size &#038; quality</capture-profile>\n <capture-profile>Display/Video (Podcast/Vodcast/EchoPlayer). Optimized for quality/full motion video</capture-profile>\n <capture-profile>DualDisplay (Podcast/Vodcast/EchoPlayer). Optimized for file size &#038; bandwidth</capture-profile>\n <capture-profile>Dual Video (Podcast/Vodcast/EchoPlayer) -Balance between file size &#038; quality</capture-profile>\n <capture-profile>Dual Video (Podcast/Vodcast/EchoPlayer) -High Quality</capture-profile>\n <capture-profile>Video Only (Podcast/Vodcast/EchoPlayer). Balanced between file size &#038; quality</capture-profile>\n </capture-profiles>\n <monitor-profiles>\n <monitor-profile>Display/Video (Podcast/Vodcast/EchoPlayer). Balanced between file size &#038; quality</monitor-profile>\n </monitor-profiles>\n <next>\n <type>media</type>\n <start-time>2014-02-12T23:00:00.000Z</start-time>\n <duration>3000</duration>\n <parameters>\n <title>Underwater Basket Weaving 101 (UWBW-101-100) Spring 2014</title>\n <section ref=\"ec7a622a-da43-4a31-897f-841ea192f63d\">Underwater Basket Weaving 101 (UWBW-101-100) Spring 2014</section>\n <presenters>\n <presenter ref=\"9d56966e-3b39-4e26-b0f4-58bebc3ec4de\">John Doe</presenter>\n </presenters>\n <capture-profile id=\"830d7947-0926-487c-8c64-72b06c1de1e4\">\n <name>Display/Video (Podcast/Vodcast/EchoPlayer). Optimized for quality/full motion video</name>\n <output-type>archive</output-type>\n <products>\n <product>\n <source name=\"audio\" type=\"audio\">\n <input>balanced</input>\n <mode>stereo</mode>\n <analog-gain>-6</analog-gain>\n <samplerate>44100</samplerate>\n <gain>0</gain>\n <agc>false</agc>\n </source>\n <source name=\"graphics1\" type=\"graphics\">\n <channel>1</channel>\n <input>dvi</input>\n <brightness>50</brightness>\n <contrast>50</contrast>\n <saturation>50</saturation>\n <framerate>10.0</framerate>\n <width>960</width>\n <height>720</height>\n <fix-aspect-ratio>true</fix-aspect-ratio>\n <is-display>true</is-display>\n </source>\n <source name=\"graphics2\" type=\"graphics\">\n <channel>2</channel>\n <input>composite</input>\n <brightness>50</brightness>\n <contrast>50</contrast>\n <saturation>50</saturation>\n <framerate>29.97</framerate>\n <width>704</width>\n <height>480</height>\n <fix-aspect-ratio>true</fix-aspect-ratio>\n <is-display>false</is-display>\n <standard>ntsc</standard>\n </source>\n <transform name=\"audio-archive\" type=\"encoder\">\n <input>audio</input>\n <codec>aac</codec>\n <encode-on-host>true</encode-on-host>\n <codec-parameters>\n <bitrate>128000</bitrate>\n <profile>lc</profile>\n </codec-parameters>\n </transform>\n <transform name=\"graphics1-archive\" type=\"encoder\">\n <input>graphics1</input>\n <codec>h264</codec>\n <codec-parameters>\n <bitrate-control>vbr</bitrate-control>\n <bitrate>736000</bitrate>\n <max-bitrate>1104000</max-bitrate>\n <profile>base</profile>\n <frames-per-keyframe>50</frames-per-keyframe>\n </codec-parameters>\n </transform>\n <transform name=\"graphics2-archive\" type=\"encoder\">\n <input>graphics2</input>\n <codec>h264</codec>\n <codec-parameters>\n <bitrate-control>vbr</bitrate-control>\n <bitrate>1056000</bitrate>\n <max-bitrate>1584000</max-bitrate>\n <profile>base</profile>\n <frames-per-keyframe>150</frames-per-keyframe>\n </codec-parameters>\n </transform>\n <sink name=\"audio-archive-file\">\n <input>audio-archive</input>\n <output>\n <type>file</type>\n <filename>audio.aac</filename>\n </output>\n </sink>\n <sink name=\"graphics1-archive-file\">\n <input>graphics1-archive</input>\n <output>\n <type>file</type>\n <filename>display.h264</filename>\n </output>\n </sink>\n <sink name=\"graphics2-archive-file\">\n <input>graphics2-archive</input>\n <output>\n <type>file</type>\n <filename>video.h264</filename>\n </output>\n </sink>\n </product>\n </products>\n </capture-profile>\n </parameters>\n </next><current>\n <schedule>\n </schedule>\n </current>\n </status>"
TIME_FORMAT = "%m/%d/%Y %H:%M"
WIRELESS_LOC = {"location" => "wireless", "coordinates_from" => "bottom-left", "x" => 16.764784482481577, "y" => 25.435735950388988, "lng" => 55.274935030154325, "lat" => 25.201036346211698, "variance" => 7.944837533996209, "last_seen" => 1601526474, "building" => "zone_1234", "level" => "zone_1234"}

Method Summary

Method Detail

def create_request(mode : String, device_name : String, modbus_device : String, md5 : String, file_time : String, file_descriptor : String, file_name : String, file : String | Nil) #

Some of these fields may not be present in every request but having them there doesn't hurt anything so why bother removing them


[View source]
def generate_password(length : Int32 | Nil = DEFAULT_PASSWORD_LENGTH, exclude : String | Nil = DEFAULT_PASSWORD_EXCLUDE, minimum_lowercase : Int32 | Nil = DEFAULT_PASSWORD_MINIMUM_LOWERCASE, minimum_uppercase : Int32 | Nil = DEFAULT_PASSWORD_MINIMUM_UPPERCASE, minimum_numbers : Int32 | Nil = DEFAULT_PASSWORD_MINIMUM_NUMBERS, minimum_symbols : Int32 | Nil = DEFAULT_PASSWORD_MINIMUM_SYMBOLS) : String #

[View source]