class

CoAP::Option

Inherits BinData < Reference < Object

Constants

ENDIAN = ["big"]
KLASS_NAME = [CoAP::Option]
PARTS = [{type: "bitfield", name: 0, cls: CoAP::Option, onlyif: nil, verify: nil}, {type: "basic", name: delta_8bit, cls: UInt8, onlyif: -> do op_delta == 13_u8 end, verify: nil, value: nil}, {type: "basic", name: delta_16bit, cls: UInt16, onlyif: -> do op_delta == 14_u8 end, verify: nil, value: nil}, {type: "basic", name: length_8bit, cls: UInt8, onlyif: -> do op_length == 13_u8 end, verify: nil, value: nil}, {type: "basic", name: length_16bit, cls: UInt16, onlyif: -> do op_length == 14_u8 end, verify: nil, value: nil}, {type: "bytes", name: data, cls: Bytes, onlyif: nil, verify: nil, length: -> do op_length == 15_u8 ? 0 : option_length end, value: nil}] of Nil
REMAINING = [] of Nil

Class methods

bit_fields
Source

Instance methods

<=>(option)

Make options sortable

Source
__format__
Source
content_type(string : String)

https://tools.ietf.org/html/rfc7252#section-12.3

Source
content_type
Source
data(value : Slice(UInt8))
Source
data
data=(data : Bytes)
delta_16bit
delta_16bit=(delta_16bit : UInt16)
delta_8bit
delta_8bit=(delta_8bit : UInt8)
end_of_options?
Source
length_16bit
length_16bit=(length_16bit : UInt16)
length_8bit
length_8bit=(length_8bit : UInt8)
max_age(number : Int)
Source
max_age

https://tools.ietf.org/html/rfc7252#section-5.10

Source
observation(number : Int)
Source
observation

https://tools.ietf.org/html/draft-ietf-core-observe-08

Source
op_delta

Options

op_delta=(op_delta : UInt8)

Options

op_length

Options

op_length=(op_length : UInt8)

Options

option_delta
Source
option_delta=(size : Int)
Source
option_length
Source
option_length=(size : Int)
Source
string(data : String)
Source
string
Source
type(type : Options)
Source
type

Set as the option is parsed

Source
type?

Set as the option is parsed

Source
uri_port(number : Int)
Source
uri_port

https://tools.ietf.org/html/rfc7252#section-5.10

Source

Macros

co_ap_option(name, onlyif = nil, verify = nil, value = nil)
Source