public class AisMessage1 extends AisPositionMessage
This class handles the content of an AIS class A transponders general position report as defined by ITU-R M.1371-4.
Generally the position report is handled in the super class but there are some specific purposes of this class. This is mainly the communication state field, that requires some special attention.
The communication state field covers 19 bits and this is general to both message 1, message 2 and message 3. The content is though different for the different communication states applied by the different message types.
This message type is using SOTDMA communication state, which is described below.
CommState - 19 bits sync state: 2 bits slot timeout: 3 bits sub message: 14 bits
The sub message depends upon the value of the slot timeout. The slot timeout is defined to be between 0 and 7 both values included.
The sub message is defined as:
When slot timeout = 0 - Then the sub message is the slot offset: If the slot time-out value is 0 (zero) then the slot offset should indicate the offset to the slot in which transmission will occur during the next frame. If the slot offset is zero, the slot should be de-allocated after transmission
When slot timeout = 1 - Then the sub message is UTC hour and minute: If the station has access to UTC, the hour and minute should be indicated in this sub message. Hour (0-23) should be coded in bits 13 to 9 of the sub message (bit 13 is MSB). Minute (0-59) should be coded in bit 8 to 2 (bit 8 is MSB). Bit 1 and bit 0 are not used.
When slot timeout = 2,4,6 - Then the sub message is the slot number: Slot number used for this transmission (between 0 and 2249).
When slot timeout = 3,5,7 - Then the sub message is the recieved stations: Number of other stations (not own station) which the station currently is receiving (between 0 and 16383).
| Modifier and Type | Field and Description |
|---|---|
protected int |
slotTimeout
SOTDMA Slot Timeout Specifies frames remaining until a new slot is selected 0 means that this was the last
transmission in this slot 1-7 means that 1 to 7 frames respectively are left until slot change
|
protected int |
subMessage
SOTDMA sub-message This field has many purposes see class description for help:
|
cog, navStatus, pos, posAcc, raim, rot, sog, spare, specialManIndicator, syncState, trueHeading, utcSecmsgId, repeat, userId, VALID_MESSAGE_TYPES, vdm| Constructor and Description |
|---|
AisMessage1()
Instantiates a new Ais message 1.
|
AisMessage1(Vdm vdm)
Instantiates a new Ais message 1.
|
| Modifier and Type | Method and Description |
|---|---|
SixbitEncoder |
getEncoded()
Abstract method to be implemented by all extending classes
|
int |
getSlotTimeout()
Gets slot timeout.
|
int |
getSubMessage()
Gets sub message.
|
void |
parse()
Parse.
|
void |
setSlotTimeout(int slotTimeout)
Sets slot timeout.
|
void |
setSubMessage(int subMessage)
Sets sub message.
|
String |
toString() |
encode, getCog, getNavStatus, getPos, getPosAcc, getRaim, getRot, getSensorRot, getSog, getSpare, getSpecialManIndicator, getSyncState, getTrueHeading, getUtcSec, getValidPosition, isCogValid, isHeadingValid, isPositionValid, isRotValid, isSogValid, parse, setCog, setNavStatus, setPos, setPosAcc, setRaim, setRot, setSog, setSpare, setSpecialManIndicator, setSyncState, setTrueHeading, setUtcSecgetInstance, getMsgId, getRepeat, getSourceTag, getTags, getTargetType, getUserId, getVdm, reassemble, setRepeat, setTag, setTags, setUserId, trimTextprotected int slotTimeout
protected int subMessage
public AisMessage1()
public AisMessage1(Vdm vdm) throws AisMessageException, SixbitException
vdm - the vdmAisMessageException - the ais message exceptionSixbitException - the sixbit exceptionpublic void parse()
throws AisMessageException,
SixbitException
AisMessageException - the ais message exceptionSixbitException - the sixbit exceptionpublic SixbitEncoder getEncoded()
AisMessagegetEncoded in class AisMessagepublic int getSlotTimeout()
public void setSlotTimeout(int slotTimeout)
slotTimeout - the slot timeoutpublic int getSubMessage()
public void setSubMessage(int subMessage)
subMessage - the sub messagepublic String toString()
toString in class AisPositionMessageCopyright © 2011–2019 Danish Maritime Authority. All rights reserved.