Data Structures | |
| struct | sixbit |
| sixbit state More... | |
Defines | |
| #define | SIXBIT_LEN 255 |
Functions | |
| char __stdcall | binfrom6bit (char ascii) |
| Convert an ascii value to a 6-bit binary value. | |
| int __stdcall | init_6bit (sixbit *state) |
| Initialize a 6-bit datastream structure. | |
| unsigned long __stdcall | get_6bit (sixbit *state, short numbits) |
| Return 0-32 bits from a 6-bit ASCII stream. | |
| unsigned int __stdcall | sixbit_length (sixbit *state) |
| Calculate the number of bits remaining in the six_state. | |
| char __stdcall | binto6bit (char value) |
| Convert a binary value to a 6-bit ASCII value. | |
| #define SIXBIT_LEN 255 |
| char __stdcall binfrom6bit | ( | char | ascii | ) |
Convert an ascii value to a 6-bit binary value.
This function checks the ASCII value to make sure it can be coverted. If not, it returns a -1. Otherwise it returns the 6-bit binary value.
| ascii | character to convert |
This is used to convert the packed 6-bit value to a binary value. It is not used to convert data from fields such as the name and destination -- Use ais2ascii() instead.
| char __stdcall binto6bit | ( | char | value | ) |
Convert a binary value to a 6-bit ASCII value.
This function checks the binary value to make sure it can be coverted. If not, it returns a -1. Otherwise it returns the 6-bit ASCII value.
| value | to convert |
This is used to convert a 6 bit binary value to the packed 6-bit value It is not used to convert data from fields such as the name and destination -- Use ais2ascii() instead.
| unsigned long __stdcall get_6bit | ( | sixbit * | state, | |
| short | numbits | |||
| ) |
Return 0-32 bits from a 6-bit ASCII stream.
| state | pointer to a sixbit state structure | |
| numbits | number of bits to return |
The full string can be addressed by pointing to state->bits and the length can be calculated by strlen(state->bits) * 6, but note that the string also includes any final padding, so when checking lengths take into account that it will be a multiples of 6 bits.
Example:
| int __stdcall init_6bit | ( | sixbit * | state | ) |
| unsigned int __stdcall sixbit_length | ( | sixbit * | state | ) |
Calculate the number of bits remaining in the six_state.
| state | returns:
|
1.5.2