Documentation
¶
Index ¶
- Constants
- type Octet
- func (o *Octet) BinaryString() string
- func (o *Octet) Byte() byte
- func (o *Octet) HexString() string
- func (o *Octet) IsSet(index OctetIndex) bool
- func (o *Octet) Nullify() *Octet
- func (o *Octet) OctetMap() OctetMap
- func (o *Octet) Overwrite(val byte) *Octet
- func (o *Octet) OverwriteQuartet(val *Quartet, pos QuartetPosition) *Octet
- func (o *Octet) QuartetMaps() (hi, lo QuartetMap)
- func (o *Octet) Quartets() (hi, lo *Quartet)
- func (o *Octet) Set(index OctetIndex) *Octet
- func (o *Octet) Toggle(index OctetIndex) *Octet
- func (o *Octet) Unset(index OctetIndex) *Octet
- type OctetIndex
- type OctetMap
- type Quartet
- type QuartetIndex
- type QuartetMap
- type QuartetPosition
Constants ¶
View Source
const ( Lo QuartetPosition = 0 Hi QuartetPosition = 1 QBit0 QuartetIndex = 0 QBit1 QuartetIndex = 1 QBit2 QuartetIndex = 2 QBit3 QuartetIndex = 3 Bit0 OctetIndex = 0 Bit1 OctetIndex = 1 Bit2 OctetIndex = 2 Bit3 OctetIndex = 3 Bit4 OctetIndex = 4 Bit5 OctetIndex = 5 Bit6 OctetIndex = 6 Bit7 OctetIndex = 7 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Octet ¶
type Octet struct {
// contains filtered or unexported fields
}
func OctetFromByte ¶
func OctetFromQuartets ¶
func (*Octet) BinaryString ¶
BinaryString returns the binary representation of the octet
func (*Octet) IsSet ¶
func (o *Octet) IsSet(index OctetIndex) bool
IsSet checks if the bit at a given position is set
func (*Octet) OverwriteQuartet ¶
func (o *Octet) OverwriteQuartet(val *Quartet, pos QuartetPosition) *Octet
OverwriteQuartet all bits in the octet with the values from a byte
func (*Octet) QuartetMaps ¶
func (o *Octet) QuartetMaps() (hi, lo QuartetMap)
QuartetMaps gets the hi and lo nibbles in an Octet as boolean maps
func (*Octet) Set ¶
func (o *Octet) Set(index OctetIndex) *Octet
Set the bit to 1 at a given position in the byte
func (*Octet) Toggle ¶
func (o *Octet) Toggle(index OctetIndex) *Octet
Toggle the value of the bit at the given position in the byte
func (*Octet) Unset ¶
func (o *Octet) Unset(index OctetIndex) *Octet
Unset the bit at a given position in the byte
type OctetIndex ¶
type OctetIndex int
type Quartet ¶
type Quartet struct {
// contains filtered or unexported fields
}
func QuartetsFromByte ¶
func (*Quartet) IsSet ¶
func (q *Quartet) IsSet(index QuartetIndex) bool
IsSet checks if the bit at a given position is set
func (*Quartet) Set ¶
func (q *Quartet) Set(index QuartetIndex) *Quartet
Set the bit to 1 at a given position in the byte
func (*Quartet) Toggle ¶
func (q *Quartet) Toggle(index QuartetIndex) *Quartet
Toggle the value of the bit at the given position in the byte
func (*Quartet) Unset ¶
func (q *Quartet) Unset(index QuartetIndex) *Quartet
Unset the bit at a given position in the byte
type QuartetIndex ¶
type QuartetIndex int
type QuartetPosition ¶
type QuartetPosition int
Click to show internal directories.
Click to hide internal directories.