class PlaceOS::Edge::Protocol::Binary

Overview

Binary messages

Defined in:

placeos-edge/protocol.cr

Constant Summary

AFTER_DESERIALIZE = [] of Nil

Binary messages

BEFORE_SERIALIZE = [] of Nil

Binary messages

ENDIAN = ["big"]

Binary messages

KLASS_NAME = [PlaceOS::Edge::Protocol::Binary]

Binary messages

PARTS = [{type: "basic", name: sequence_id, cls: UInt64, onlyif: nil, verify: nil, value: nil, endian: nil}, {type: "enum", name: status, cls: typeof(Status::Success.value), onlyif: nil, verify: nil, value: nil, encoding: nil, enum_type: PlaceOS::Edge::Protocol::Binary::Status}, {type: "basic", name: length, cls: Int32, onlyif: nil, verify: nil, value: -> do key.bytesize end, endian: nil}, {type: "string", name: key, cls: String, onlyif: nil, verify: nil, length: -> do length end, value: nil, encoding: nil}] of Nil

Binary messages

REMAINING = [] of Nil

Binary messages

Class Method Summary

Macro Summary

Instance Method Summary

Class Method Detail

def self.bit_fields #

Binary messages


[View source]
def self.from_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::SystemEndian) #

[View source]
def self.from_slice(bytes : Slice, format : IO::ByteFormat = IO::ByteFormat::SystemEndian) #

[View source]

Macro Detail

macro asn1_ber(name, onlyif = nil, verify = nil, value = nil) #

Binary messages


[View source]
macro asn1_ber_extended_identifier(name, onlyif = nil, verify = nil, value = nil) #

Binary messages


[View source]
macro asn1_ber_identifier(name, onlyif = nil, verify = nil, value = nil) #

Binary messages


[View source]
macro asn1_ber_length(name, onlyif = nil, verify = nil, value = nil) #

Binary messages


[View source]
macro ber(name, onlyif = nil, verify = nil, value = nil) #

Binary messages


[View source]
macro place_os_edge_protocol_binary(name, onlyif = nil, verify = nil, value = nil) #

Binary messages


[View source]

Instance Method Detail

def __format__ : IO::ByteFormat #

[View source]
def binary : IO #

[View source]
def binary? : IO | Nil #

[View source]
def key : String #

def key=(key : String) #

def length : Int32 #

def length=(length : Int32) #

def path : String #

def path=(path : String) #

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

def sequence_id : UInt64 #

def sequence_id=(sequence_id : UInt64) #

def status : Status #

def status=(status : Status) #

def success #

[View source]
def to_slice #

[View source]
def write(io : IO) #

[View source]