Package org.openmuc.j60870.ie
Class InformationObject
- java.lang.Object
-
- org.openmuc.j60870.ie.InformationObject
-
public class InformationObject extends java.lang.Object
Every Information Object contains:- The Information Object Address (IOA) that is 1, 2 or 3 bytes long.
- A set of Information Elements or a sequence of information element sets. The type of information elements in the set and their order depend on the ASDU's TypeId and is the same for all information objects within one ASDU. If the sequence bit is set in the ASDU then the ASDU contains a single Information Object containing a sequence of information element sets. If the sequence bit is not set the ASDU contains a sequence of information objects each containing only single information elements sets.
-
-
Constructor Summary
Constructors Constructor Description InformationObject(int informationObjectAddress, InformationElement... informationElement)
InformationObject(int informationObjectAddress, InformationElement[][] informationElements)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static InformationObject
decode(org.openmuc.j60870.internal.ExtendedDataInputStream is, ASduType aSduType, int numberOfSequenceElements, int ioaFieldLength, ReservedASduTypeDecoder reservedASduTypeDecoder)
int
encode(byte[] buffer, int i, int ioaFieldLength)
InformationElement[][]
getInformationElements()
Returns the information elements as a two dimensional array.int
getInformationObjectAddress()
java.lang.String
toString()
-
-
-
Constructor Detail
-
InformationObject
public InformationObject(int informationObjectAddress, InformationElement[][] informationElements)
-
InformationObject
public InformationObject(int informationObjectAddress, InformationElement... informationElement)
-
-
Method Detail
-
decode
public static InformationObject decode(org.openmuc.j60870.internal.ExtendedDataInputStream is, ASduType aSduType, int numberOfSequenceElements, int ioaFieldLength, ReservedASduTypeDecoder reservedASduTypeDecoder) throws java.io.IOException
- Throws:
java.io.IOException
-
encode
public int encode(byte[] buffer, int i, int ioaFieldLength)
-
getInformationObjectAddress
public int getInformationObjectAddress()
-
getInformationElements
public InformationElement[][] getInformationElements()
Returns the information elements as a two dimensional array. The first dimension of the array is the index of the sequence of information element sets. The second dimension is the index of the information element set. For example an information object containing a single set of three information elements will have the dimension [1][3]. Note that you will have to cast the returnedInformationElement
s to a concrete implementation in order to access the data inside them.- Returns:
- the information elements as a two dimensional array.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-