enum PlaceOS::Edge::Protocol::Message::Body::Type

Defined in:

placeos-edge/protocol.cr

Enum Members

Debug = 0

-> Server

DriverLoaded = 1
DriverStatus = 2
Execute = 3
Ignore = 4
Kill = 5
Load = 6
LoadedModules = 7
ModuleLoaded = 8
RunCount = 9
Start = 10
Stop = 11
SystemStatus = 12
Unload = 13
Register = 14

-> Client

ProxyRedis = 15
FetchBinary = 16
SettingsAction = 17
Success = 18

Response

RegisterResponse = 19

-> Server

DebugMessage = 20

-> Client

DriverStatusResponse = 21
ExecuteResponse = 22
LoadedModulesResponse = 23
RunCountResponse = 24
SystemStatusResponse = 25

Instance Method Summary

Instance Method Detail

def debug? #

[View source]
def debug_message? #

[View source]
def driver_loaded? #

[View source]
def driver_status? #

[View source]
def driver_status_response? #

[View source]
def execute? #

[View source]
def execute_response? #

[View source]
def fetch_binary? #

[View source]
def ignore? #

[View source]
def kill? #

[View source]
def load? #

[View source]
def loaded_modules? #

[View source]
def loaded_modules_response? #

[View source]
def module_loaded? #

[View source]
def proxy_redis? #

[View source]
def register? #

[View source]
def register_response? #

[View source]
def run_count? #

[View source]
def run_count_response? #

[View source]
def settings_action? #

[View source]
def start? #

[View source]
def stop? #

[View source]
def success? #

[View source]
def system_status? #

[View source]
def system_status_response? #

[View source]
def to_json(json : JSON::Builder) #
Description copied from struct Enum

Serializes this enum member by name.

For non-flags enums, the serialization is a JSON string. The value is the member name (see #to_s) transformed with String#underscore.

enum Stages
  INITIAL
  SECOND_STAGE
end

Stages::INITIAL.to_json      # => %("initial")
Stages::SECOND_STAGE.to_json # => %("second_stage")

For flags enums, the serialization is a JSON array including every flagged member individually serialized in the same way as a member of a non-flags enum. None is serialized as an empty array, All as an array containing all members.

@[Flags]
enum Sides
  LEFT
  RIGHT
end

Sides::LEFT.to_json                  # => %(["left"])
(Sides::LEFT | Sides::RIGHT).to_json # => %(["left","right"])
Sides::All.to_json                   # => %(["left","right"])
Sides::None.to_json                  # => %([])

ValueConverter.to_json offers a different serialization strategy based on the member value.


[View source]
def unload? #

[View source]