public void parse() throws AisMessageException, SixbitException { BinArray binArray = vdm.getBinArray(); super.parse(binArray); this.slotIncrement = (int) binArray.getVal(13); this.numSlots = (int) binArray.getVal(3); this.keep = (int) binArray.getVal(1); }
public void parse() throws AisMessageException, SixbitException { BinArray binArray = vdm.getBinArray(); if (binArray.getLength() < 424) { throw new AisMessageException("Message 5 wrong length " + binArray.getLength()); } super.parse(binArray); this.version = (int) binArray.getVal(2); this.imo = binArray.getVal(30); this.callsign = binArray.getString(7); this.name = binArray.getString(20); this.shipType = (int) binArray.getVal(8); this.dimBow = (int) binArray.getVal(9); this.dimStern = (int) binArray.getVal(9); this.dimPort = (int) binArray.getVal(6); this.dimStarboard = (int) binArray.getVal(6); this.posType = (int) binArray.getVal(4); this.eta = binArray.getVal(20); this.draught = (int) binArray.getVal(8); this.dest = binArray.getString(20); this.dte = (int) binArray.getVal(1); this.spare = (int) binArray.getVal(1); }
public void parse() throws AisMessageException, SixbitException { BinArray sixbit = vdm.getBinArray(); if (sixbit.getLength() < 80 || sixbit.getLength() > 816) { throw new AisMessageException("Message " + msgId + " wrong length: " + sixbit.getLength()); } super.parse(sixbit); this.spare1 = (int) sixbit.getVal(2); this.lon = (int) sixbit.getVal(18); this.lat = (int) sixbit.getVal(17); this.spare2 = (int) sixbit.getVal(5); this.messageType = (int) sixbit.getVal(6); this.stationId = (int) sixbit.getVal(10); this.zCount = (int) sixbit.getVal(13); this.seqNum = (int) sixbit.getVal(3); this.dataWordCount = (int) sixbit.getVal(5); this.health = (int) sixbit.getVal(3); // How many datawords are actually in the remaining part // How to handle if length - 120 does not match the // indicated data word count this.dataWords = new int[this.dataWordCount]; for (int i = 0; i < this.dataWordCount && sixbit.hasMoreBits(); i++) { this.dataWords[i] = (int) sixbit.getVal(24); } }
@Override protected void parse(BinArray binArray) throws AisMessageException, SixbitException { BinArray sixbit = vdm.getBinArray(); if (sixbit.getLength() != 312) { throw new AisMessageException("Message 19 wrong length " + sixbit.getLength()); } super.parse(sixbit); this.spare1 = (int) sixbit.getVal(8); this.sog = (int) sixbit.getVal(10); this.posAcc = (int) sixbit.getVal(1); this.pos = new AisPosition(); this.pos.setRawLongitude(sixbit.getVal(28)); this.pos.setRawLatitude(sixbit.getVal(27)); this.cog = (int) sixbit.getVal(12); this.trueHeading = (int) sixbit.getVal(9); this.utcSec = (int) sixbit.getVal(6); this.spare2 = (int) sixbit.getVal(4); this.name = sixbit.getString(20); this.shipType = (int) sixbit.getVal(8); this.dimBow = (int) sixbit.getVal(9); this.dimStern = (int) sixbit.getVal(9); this.dimPort = (int) sixbit.getVal(6); this.dimStarboard = (int) sixbit.getVal(6); this.posType = (int) sixbit.getVal(4); this.raimFlag = (int) sixbit.getVal(1); this.dte = (int) sixbit.getVal(1); this.modeFlag = (int) sixbit.getVal(1); this.spare3 = (int) sixbit.getVal(4); }
public void parse() throws AisMessageException, SixbitException { BinArray binArray = vdm.getBinArray(); super.parse(binArray); this.slotTimeout = (int) binArray.getVal(3); this.subMessage = (int) binArray.getVal(14); }