|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.org.apache.xalan.internal.xsltc.dom.BitArray
NMEA.NMEABitArray
public class NMEABitArray
| Field Summary | |
|---|---|
static char[] |
ASCII6
Lookup table to convert from integer to 6 bit ASCII data for AIS vessel names, destinations, etc. |
(package private) static char[] |
charLUTData
Lookup table data to go from characters to 6 bit integers. |
private static byte[] |
lut6
|
static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
NMEABitArray()
|
|
NMEABitArray(int size)
|
|
NMEABitArray(int size,
int[] bits)
|
|
| Method Summary | |
|---|---|
static byte |
convert628(char ch)
converts a character from an AIS data string into a six bit integer value packed into an 8 bit byte. |
static char |
convert826(int n)
Convert a six bit integer value to AIS / NMEA character data |
static byte[] |
createLUT6()
Converts the character lookup data to an integer-to-character LUT, where the indexing is the standard ASCII character, converted to an integer. |
int |
getSignedInteger(int b1,
int b2)
Get a signed integer from the bit array. |
java.lang.String |
getString(int b1,
int b2)
Gets a string based on packed bits from an AIS string using the 6 bit ascii character set. |
int |
getUnsignedInteger(int b1,
int b2)
Get an unsigned integer from the bit array. |
java.lang.String |
toString()
|
| Methods inherited from class com.sun.org.apache.xalan.internal.xsltc.dom.BitArray |
|---|
cloneArray, data, getBit, getBitNumber, getMask, getNextBit, merge, readExternal, resize, setBit, setMask, size, writeExternal |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final long serialVersionUID
public static final char[] ASCII6
private static byte[] lut6
static char[] charLUTData
Table G1 from page 171 of IEC 61993
19 June - changed '\'' to 0x60 (opposite of error in ASCII6 array !
| Constructor Detail |
|---|
public NMEABitArray()
public NMEABitArray(int size,
int[] bits)
public NMEABitArray(int size)
| Method Detail |
|---|
public int getUnsignedInteger(int b1,
int b2)
Integers can be any number of bits. The first bit is the most significant.
b1 - First bit to unpackb2 - Last bit to unpack
public int getSignedInteger(int b1,
int b2)
Integers can be any number of bits and are stored in 2's compliment format.
b1 - First bit to unpackb2 - Last bit to unpack
public java.lang.String getString(int b1,
int b2)
b1 - First bit from AIS / NMEA datab2 - Last bit from AIS / NMEA data
public static byte convert628(char ch)
ch - Character from AIS or NMEA string
public static char convert826(int n)
n - an six bit ascii code
public static byte[] createLUT6()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||