Class: BitStruct::HexOctetField
- Inherits:
-
OctetField
- Object
- Field
- CharField
- OctetField
- BitStruct::HexOctetField
- Defined in:
- lib/bit-struct/hex-octet-field.rb
Overview
Class for char fields that can be accessed with values like “xx:xx:xx:xx”, where each xx is up to 2 hex digits representing a single octet. The original string-based accessors are still available with the _chars
suffix.
Declared with BitStruct.hex_octets.
Constant Summary collapse
- SEPARATOR =
":"
- FORMAT =
"%02x"
- BASE =
16
Instance Attribute Summary
Attributes inherited from Field
#default, #display_name, #format, #length, #name, #offset, #options
Class Method Summary collapse
-
.class_name ⇒ Object
Used in describe.
Methods inherited from OctetField
Methods inherited from CharField
Methods inherited from Field
#class_name, default, #describe, #initialize, #inspect_in_object, #inspectable?
Constructor Details
This class inherits a constructor from BitStruct::Field
Class Method Details
.class_name ⇒ Object
Used in describe.
12 13 14 |
# File 'lib/bit-struct/hex-octet-field.rb', line 12 def self.class_name @class_name ||= "hex_octets" end |