As per IEEE 802.3. See http://en.wikipedia.org/wiki/Manchester_encoding
Creates a new encoder.
numBits |
The maximum number of bits in the data to be encoded. The default 8 can deal with values between 0 and 255. |
The lowest level method for encoding. Give and return arrays with raw 0/1 bits.
bits |
An array of raw bits (zeros and ones) representing the n-bit value to be encoded. The length of this array should match numBits. |
An array of raw bits (zeros and ones) with encoded clock and data bits.
A method for encoding single numbers. Converts the number to bits and then calls -encode.
value |
Some number to be encoded. Make sure to not go above the current set numBits capacity (0-255 by default). |
Same as -encode above
A method for encoding arrays of numbers.
array |
Some array of numbers to be encoded. |
Same as -encode above
Get or set the number of bits dynamically.