Package org.openmuc.jdlms
Class SnMemberRange
- java.lang.Object
-
- org.openmuc.jdlms.internal.Range<java.lang.Integer>
-
- org.openmuc.jdlms.SnMemberRange
-
- All Implemented Interfaces:
java.io.Serializable
public class SnMemberRange extends org.openmuc.jdlms.internal.Range<java.lang.Integer>
This class represents an SN class member of a coherent range.- See Also:
SnClassInfo
, Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SnMemberRange
between(int fromInclusive, int toInclusive)
Get a new range within the lower and the upper bound (both inclusive).static SnMemberRange
between(int fromInclusive, int toInclusive, int firstMemberId)
Get a new range within the lower and the upper bound (both inclusive).static SnMemberRange
from(int fromInclusive)
Get a new range within the lower bound and0xFFF8
(both inclusive).static SnMemberRange
from(int fromInclusive, int firstMemberId)
Get a new range within the lower bound and0xFFF8
(both inclusive).int
getFirstRangeId()
Get the first range ID. -1 if not set.static SnMemberRange
is(int element)
Get a new range with a single element.static SnMemberRange
is(int element, int memberId)
Get a new range with a single element.java.lang.String
toString()
-
-
-
Method Detail
-
from
public static SnMemberRange from(int fromInclusive)
Get a new range within the lower bound and0xFFF8
(both inclusive).- Parameters:
fromInclusive
- the lower bound.- Returns:
- a new range object.
-
from
public static SnMemberRange from(int fromInclusive, int firstMemberId)
Get a new range within the lower bound and0xFFF8
(both inclusive).Note: this initializer must only be used, if fc lp + 1, with fc the first member ID of this range and lp the last member ID of the preceding range.
- Parameters:
fromInclusive
- the lower bound.firstMemberId
- the member ID of the first element of this range.- Returns:
- a new range object.
-
between
public static SnMemberRange between(int fromInclusive, int toInclusive)
Get a new range within the lower and the upper bound (both inclusive).- Parameters:
fromInclusive
- the lower bound.toInclusive
- the upper bound.- Returns:
- a new range object.
-
between
public static SnMemberRange between(int fromInclusive, int toInclusive, int firstMemberId)
Get a new range within the lower and the upper bound (both inclusive).Note: this initializer must only be used, if fc lp + 1, with fc the first member ID of this range and lp the last member ID of the preceding range.
- Parameters:
fromInclusive
- the lower bound.toInclusive
- the upper bound.firstMemberId
- the member ID of the first element of this range.- Returns:
- a new range object.
-
is
public static SnMemberRange is(int element)
Get a new range with a single element.- Parameters:
element
- the element. E.g.0x40
.- Returns:
- a new range object.
-
is
public static SnMemberRange is(int element, int memberId)
Get a new range with a single element.Note: this initializer must only be used, if fc lp + 1, with fc the first member ID of this range and lp the last member ID of the preceding range.
- Parameters:
element
- the element. E.g.0x40
.memberId
- the member ID of the element.- Returns:
- a new range object.
- See Also:
is(int)
-
getFirstRangeId
public int getFirstRangeId()
Get the first range ID. -1 if not set.- Returns:
- the first member ID of this range.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classorg.openmuc.jdlms.internal.Range<java.lang.Integer>
-
-