public abstract class AisBinaryMessage extends AisMessage
| Modifier and Type | Field and Description |
|---|---|
protected AisApplicationMessage |
appMessage
The App message.
|
protected int |
dac
The Dac.
|
protected BinArray |
data
The Data.
|
protected int |
fi
The Fi.
|
protected int |
spare
The Spare.
|
msgId, repeat, userId, VALID_MESSAGE_TYPES, vdm| Constructor and Description |
|---|
AisBinaryMessage(int msgId)
Construct empty binary message with msgId
|
AisBinaryMessage(Vdm vdm)
Construct binary message from VDM sentence
|
| Modifier and Type | Method and Description |
|---|---|
protected SixbitEncoder |
encode()
Base encode method to be called by all extending classes
|
AisApplicationMessage |
getApplicationMessage()
Get the application specific message, if it is implemented
|
AisApplicationMessage |
getAppMessage()
Get the application specific message contained in the sentence
|
SixbitEncoder |
getBinaryData()
Get binary data for this message
|
int |
getDac()
Gets dac.
|
BinArray |
getData()
Get the raw binary data of this message
|
int |
getFi()
Gets fi.
|
int |
getSpare()
Gets spare.
|
void |
setAppMessage(AisApplicationMessage appMessage)
Set application specific message to be contained in this message
|
void |
setBinary(BinArray binArray)
Set values from ABM/BBM binary part
|
void |
setDac(int dac)
Sets dac.
|
void |
setData(BinArray data)
Set the raw binary data of this message
|
void |
setFi(int fi)
Sets fi.
|
void |
setSpare(int spare)
Sets spare.
|
String |
toString() |
getEncoded, getInstance, getMsgId, getRepeat, getSourceTag, getTags, getTargetType, getUserId, getValidPosition, getVdm, parse, reassemble, setRepeat, setTag, setTags, setUserId, trimTextprotected int spare
protected int dac
protected int fi
protected BinArray data
protected AisApplicationMessage appMessage
public AisBinaryMessage(int msgId)
msgId - the msg idpublic AisBinaryMessage(Vdm vdm)
vdm - the vdmpublic AisApplicationMessage getApplicationMessage() throws SixbitException
SixbitException - the sixbit exceptionprotected SixbitEncoder encode()
AisMessageencode in class AisMessagepublic SixbitEncoder getBinaryData()
public int getSpare()
public void setSpare(int spare)
spare - the sparepublic int getDac()
public void setDac(int dac)
dac - the dacpublic int getFi()
public void setFi(int fi)
fi - the fipublic BinArray getData()
public void setData(BinArray data)
data - the datapublic AisApplicationMessage getAppMessage()
public void setAppMessage(AisApplicationMessage appMessage)
appMessage - the app messagepublic void setBinary(BinArray binArray) throws SixbitException
binArray - the bin arraySixbitException - the sixbit exceptionpublic String toString()
toString in class AisMessageCopyright © 2011–2019 Danish Maritime Authority. All rights reserved.