Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BitSlice ¶
type BitSlice struct {
// contains filtered or unexported fields
}
BitSlice is an array of bits. This allows us to slice and re-interpret the bits, regardless of how they got to us.
For AIS, we get data in 6-bit bytes, but we need to slice them up without regard to any particular alignment.
This is a memory hog (it's a slice of bools), and not very fast, but it's going to be a good place to start optimizing from, once it's all working.
func NewBitSliceFromBytes ¶
NewBitSliceFromBytes will allocate a new BitSlice, and fill it with the bytes provided.
func (*BitSlice) AppendByte ¶
AppendByte will append a byte to the list, MSB first.
func (*BitSlice) AppendBytes ¶
AppendBytes will append a slice of bytes.
func (*BitSlice) BigEndianUint ¶
BigEndianUint will Read the bit slice as a uint. This assumes the Nth index is the MSB.
Click to show internal directories.
Click to hide internal directories.