接口 TLBSentence
- 所有超级接口:
Sentence
Target label data in pairs of target IDs and target labels.
Example:
$RATLB,3,SHIPTHREE,5,SHIPFIVE,99,SHIP99*1F- 作者:
- Joshua Sweaney
-
字段概要
从接口继承的字段 net.sf.marineapi.nmea.sentence.Sentence
ALTERNATIVE_BEGIN_CHAR, BEGIN_CHAR, CHECKSUM_DELIMITER, FIELD_DELIMITER, MAX_LENGTH, TERMINATOR -
方法概要
修饰符和类型方法说明voidaddTargetLabel(int targetId, String targetLabel) Adds a target (id,label) pair to this sentence.int[]Get the list of target IDs listed in this sentence.String[]Get the list of target labels listed in this sentence.voidsetTargetPairs(int[] targetIds, String[] targetLabels) Sets the target (id,label) pairs in this sentence.从接口继承的方法 net.sf.marineapi.nmea.sentence.Sentence
getBeginChar, getFieldCount, getSentenceId, getTalkerId, isAISSentence, isProprietary, isValid, reset, setBeginChar, setTalkerId, toSentence, toSentence, toString
-
方法详细资料
-
getTargetIds
int[] getTargetIds()Get the list of target IDs listed in this sentence. The nth array element returned by this method, corresponds to the nth array element returned bygetTargetLabels().- 返回:
- targets IDs as int array
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.
-
getTargetLabels
String[] getTargetLabels()Get the list of target labels listed in this sentence. The nth array element returned by this method, corresponds to the nth array element returned bygetTargetIds().- 返回:
- target labels as String array
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.
-
addTargetLabel
Adds a target (id,label) pair to this sentence.- 参数:
targetId- int The target ID of the pairtargetLabel- String The label of the pair
-
setTargetPairs
Sets the target (id,label) pairs in this sentence. The size of each array must be identical. The nth position in each array corresponds to the nth position in the other array.- 参数:
targetIds- array of target IDstargetLabels- array of target labels- 抛出:
IllegalArgumentException- If array sizes are not the same
-