public class ASdu
extends java.lang.Object
TypeId
(1 byte)CauseOfTransmission
, a bit indicating whether the message was sent for test purposes only
and a bit indicating whether a confirmation message is positive or negative. The optional second byte of the Cause of
Transmission field is the Originator Address. It is the address of the originating controlling station so that
responses can be routed back to it.Constructor and Description |
---|
ASdu(TypeId typeId,
boolean isSequenceOfElements,
CauseOfTransmission causeOfTransmission,
boolean test,
boolean negativeConfirm,
int originatorAddress,
int commonAddress,
InformationObject[] informationObjects)
Use this constructor to create standardized ASDUs.
|
ASdu(TypeId typeId,
boolean isSequenceOfElements,
int sequenceLength,
CauseOfTransmission causeOfTransmission,
boolean test,
boolean negativeConfirm,
int originatorAddress,
int commonAddress,
byte[] privateInformation)
Use this constructor to create private ASDU with TypeIDs in the range 128-255.
|
Modifier and Type | Method and Description |
---|---|
CauseOfTransmission |
getCauseOfTransmission() |
int |
getCommonAddress() |
InformationObject[] |
getInformationObjects() |
java.lang.Integer |
getOriginatorAddress() |
byte[] |
getPrivateInformation() |
int |
getSequenceLength() |
TypeId |
getTypeIdentification() |
boolean |
isNegativeConfirm() |
boolean |
isSequenceOfElements() |
boolean |
isTestFrame() |
java.lang.String |
toString() |
public ASdu(TypeId typeId, boolean isSequenceOfElements, CauseOfTransmission causeOfTransmission, boolean test, boolean negativeConfirm, int originatorAddress, int commonAddress, InformationObject[] informationObjects)
typeId
- type identification field that defines the purpose and contents of the ASDUisSequenceOfElements
- if false then the ASDU contains a sequence of information objects consisting of a fixed number of
information elements. If true the ASDU contains a single information object with a sequence of
elements.causeOfTransmission
- the cause of transmissiontest
- true if the ASDU is sent for test purposesnegativeConfirm
- true if the ASDU is a negative confirmationoriginatorAddress
- the address of the originating controlling station so that responses can be routed back to itcommonAddress
- the address of the target station or the broadcast address.informationObjects
- the information objects containing the actual datapublic ASdu(TypeId typeId, boolean isSequenceOfElements, int sequenceLength, CauseOfTransmission causeOfTransmission, boolean test, boolean negativeConfirm, int originatorAddress, int commonAddress, byte[] privateInformation)
typeId
- type identification field that defines the purpose and contents of the ASDUisSequenceOfElements
- if false then the ASDU contains a sequence of information objects consisting of a fixed number of
information elements. If true the ASDU contains a single information object with a sequence of
elements.sequenceLength
- the number of information objects or the number elements depending depending on which is transmitted
as a sequencecauseOfTransmission
- the cause of transmissiontest
- true if the ASDU is sent for test purposesnegativeConfirm
- true if the ASDU is a negative confirmationoriginatorAddress
- the address of the originating controlling station so that responses can be routed back to itcommonAddress
- the address of the target station or the broadcast address.privateInformation
- the bytes to be transmitted as payloadpublic TypeId getTypeIdentification()
public boolean isSequenceOfElements()
public int getSequenceLength()
public CauseOfTransmission getCauseOfTransmission()
public boolean isTestFrame()
public boolean isNegativeConfirm()
public java.lang.Integer getOriginatorAddress()
public int getCommonAddress()
public InformationObject[] getInformationObjects()
public byte[] getPrivateInformation()
public java.lang.String toString()
toString
in class java.lang.Object