dk.navicon.AIS
Class AISMsgFactory
java.lang.Object
|
+--dk.navicon.AIS.AISMsgFactory
- public class AISMsgFactory
- extends java.lang.Object
Factory class for generating AIS messages from VDM/VDO NMEA
messages. methods for decode/encode. Messages are checksummed
before any decoding takes place.
Here is an example of how the Factory could be used.
String pos_msg = "!AIVDM,1,1,,A,102=a?0P01OqVnVM7bo@igwR`001,0*0A";
PositionReport pos_rep = (PositionReport)AISMsgFactory.make(pos_msg);
Notice that the Factory is mt safe. However the factory should only
be feed mesages from one AIS source as it expects the sequence
numbers to be unique.
|
Method Summary |
static boolean |
isCheckSumValid(java.lang.String s)
|
static dk.navicon.AIS.AISMessage |
make(java.lang.String nmeaString)
Create a new AIS message. |
static void |
reset()
reset factory if multi sentence mngt fails |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AISMsgFactory
public AISMsgFactory()
make
public static dk.navicon.AIS.AISMessage make(java.lang.String nmeaString)
throws AISParseException
- Create a new AIS message. returns null if message could not be
parsed or if input is not the end of a multi sentence message
AISParseException
reset
public static void reset()
- reset factory if multi sentence mngt fails
isCheckSumValid
public static boolean isCheckSumValid(java.lang.String s)