class CoAP::Option
- CoAP::Option
- BinData
- Reference
- Object
Defined in:
coap/option.crConstant Summary
-
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 Method Summary
Instance Method Summary
-
#<=>(option)
Make options sortable
- #__format__ : IO::ByteFormat
-
#content_type(string : String)
https://tools.ietf.org/html/rfc7252#section-12.3
- #content_type
- #data(value : Slice(UInt8))
- #data : Bytes
- #data=(data : Bytes)
- #delta_16bit : UInt16
- #delta_16bit=(delta_16bit : UInt16)
- #delta_8bit : UInt8
- #delta_8bit=(delta_8bit : UInt8)
- #end_of_options?
- #length_16bit : UInt16
- #length_16bit=(length_16bit : UInt16)
- #length_8bit : UInt8
- #length_8bit=(length_8bit : UInt8)
- #max_age(number : Int)
-
#max_age
https://tools.ietf.org/html/rfc7252#section-5.10
- #observation(number : Int)
-
#observation
https://tools.ietf.org/html/draft-ietf-core-observe-08
-
#op_delta : UInt8
Options
-
#op_delta=(op_delta : UInt8)
Options
-
#op_length : UInt8
Options
-
#op_length=(op_length : UInt8)
Options
- #option_delta : Int32
- #option_delta=(size : Int)
- #option_length : Int32
- #option_length=(size : Int)
- #string(data : String)
- #string
- #type(type : Options)
-
#type : Options
Set as the option is parsed
-
#type? : Options | Nil
Set as the option is parsed
- #uri_port(number : Int)
-
#uri_port
https://tools.ietf.org/html/rfc7252#section-5.10