インタフェース Secs1MessageBlock
public interface Secs1MessageBlock
SECS-I Message Block.
-
メソッドの概要
修飾子とタイプ メソッド 説明 intblockNumber()Returns Block number.booleancheckSum()Returns Check SUM result.intdeviceId()Returns Block Device-ID number.booleanebit()Returns Block E-Bit.booleanequalsSystemBytes(Secs1MessageBlock otherBlock)Returns Block system bytes is equals.byte[]getBytes()Returns Block bytes.booleanisFirstBlock()Return Block is First.booleanisNextBlock(Secs1MessageBlock nextBlock)Returns nextBlock is next block.booleanisValid()Returns true if block is valid data.intlength()Returns Length-byte number.static Secs1MessageBlockof(byte[] bs)Returns Secs1MessageBlock.
-
メソッドの詳細
-
isValid
boolean isValid()Returns true if block is valid data.Valid block condition is
- bytes.ength is
>=13 && <=257 - length-byte is
>=10 && <=254 - length-byte + 3 == bytes.length
- checksum is true
- 戻り値:
- true if valid block
- bytes.ength is
-
deviceId
int deviceId()Returns Block Device-ID number.Returns -1 if block is NOT valid data.
- 戻り値:
- Device-ID
-
ebit
boolean ebit()Returns Block E-Bit.Returns false if block is NOT valid data.
- 戻り値:
- true if has e-bit
-
blockNumber
int blockNumber()Returns Block number.Returns -1 if block is NOT valid data.
- 戻り値:
- block number
-
isFirstBlock
boolean isFirstBlock()Return Block is First.Returns false if block is NOT valid data.
- 戻り値:
- true if block-number is ZERO or ONE
-
length
int length()Returns Length-byte number.Returns -1 if block is NOT valid data.
- 戻り値:
- Length-byte number
-
getBytes
byte[] getBytes()Returns Block bytes.- 戻り値:
- Block bytes
-
checkSum
boolean checkSum()Returns Check SUM result.Returns false if block is NOT valid data.
- 戻り値:
- true if check-sum is valid
-
equalsSystemBytes
Returns Block system bytes is equals.Returns false if block is NOT valid data.
- パラメータ:
otherBlock- the Other SECS-I Message Block- 戻り値:
- true if system bytes is equals
-
isNextBlock
Returns nextBlock is next block.Returns false if block is NOT valid data.
- パラメータ:
nextBlock- the next SECS-I Message Block- 戻り値:
- true if nextBlock is next block.
-
of
Returns Secs1MessageBlock.This method can build also invalid block.
- パラメータ:
bs- block bytes.- 戻り値:
- Secs1MessageBlock
- 例外:
java.lang.NullPointerException- if input null
-