Package org.openmuc.j60870.ie
Class IeStatusAndStatusChanges
- java.lang.Object
-
- org.openmuc.j60870.ie.InformationElement
-
- org.openmuc.j60870.ie.IeStatusAndStatusChanges
-
public class IeStatusAndStatusChanges extends InformationElement
Represents a status and status change detection (SCD) information element.
-
-
Constructor Summary
Constructors Constructor Description IeStatusAndStatusChanges(int value)
Creates a SCD (status and status change detection) information element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getStatus(int position)
Returns true if the status at the given position is ON(1) and false otherwise.int
getValue()
boolean
hasStatusChanged(int position)
Returns true if the status at the given position has changed and false otherwise.java.lang.String
toString()
-
-
-
Constructor Detail
-
IeStatusAndStatusChanges
public IeStatusAndStatusChanges(int value)
Creates a SCD (status and status change detection) information element.- Parameters:
value
- the bits of value represent the status and status changed bits. Bit1 (the least significant bit) of value represents the first status changed detection bit. Bit17 of value represents the first status bit.
-
-
Method Detail
-
getValue
public int getValue()
-
getStatus
public boolean getStatus(int position)
Returns true if the status at the given position is ON(1) and false otherwise.- Parameters:
position
- the position in the status bitstring. Range: 1-16. Status 1 is bit 17 and status 16 is bit 32 of the value returned bygetValue()
.- Returns:
- true if the status at the given position is ON(1) and false otherwise.
-
hasStatusChanged
public boolean hasStatusChanged(int position)
Returns true if the status at the given position has changed and false otherwise.- Parameters:
position
- the position in the status changed bitstring. Range: 1-16. Status changed 1 is bit 1 and status 16 is bit 16 of the value returned bygetValue()
.- Returns:
- true if the status at the given position has changed and false otherwise.
-
toString
public java.lang.String toString()
- Specified by:
toString
in classInformationElement
-
-