Class MSClassmark.MSClassmark1
- java.lang.Object
-
- com.opencloud.util.AbstractDataObject
-
- com.opencloud.util.AbstractFieldsObject
-
- AbstractEncodedDataObject<T>
-
- AbstractLazyEncodedDataObject<byte[]>
-
- AbstractLazyEncodedByteArray
-
- com.opencloud.slee.resources.in.datatypes.cc.MSClassmark.MSClassmark1
-
- All Implemented Interfaces:
DataObject
,FastSerializable
,Serializable
- Enclosing class:
- MSClassmark
public static final class MSClassmark.MSClassmark1 extends AbstractLazyEncodedByteArray implements FastSerializable
Class MSClassmark1 provides the network with information concerning aspects of high priority of the mobile station equipment, coded in MSClassmark1 format.The API offered by this class is as if the type were specified in ASN.1 as follows.
MSClassmark1 ::= SEQUENCE { iEI INTEGER, revisionLevel RevisionLevel, esIndicator ESIndicator, a51Algorithm A51Algorithm, rfPowerCapability RFPowerCapability }
The class takes care of encoding the field values into a byte-array and decoding field values from a byte-array, the encoded representation being as tabulated below.Data Encoding - based on GSM 24.008 v9.3.0 8 7 6 5 4 3 2 1 Octet 1 0 IEI Octet 2 0 Revision Level ES A5/1 RF Power - See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MSClassmark.MSClassmark1.A51Algorithm
MSClassmark1 A5/1 Algorithm constants.static class
MSClassmark.MSClassmark1.ESIndicator
MSClassmark1 Controlled Early Classmark Sending Indicator constants.static class
MSClassmark.MSClassmark1.RevisionLevel
MSClassmark1 Revision Level constants.static class
MSClassmark.MSClassmark1.RFPowerCapability
MSClassmark1 RF Power Capability constants.
-
Field Summary
-
Fields inherited from class com.opencloud.slee.resources.cgin.AbstractLazyEncodedDataObject
isDecoded
-
Fields inherited from class com.opencloud.slee.resources.cgin.AbstractEncodedDataObject
encoded
-
Fields inherited from class com.opencloud.util.AbstractFieldsObject
FIELD_ABSENT, FIELD_UNINITIALISED
-
-
Constructor Summary
Constructors Constructor Description MSClassmark1()
Constructs a new MSClassmark1 object with no fields set.MSClassmark1(byte[] data)
Constructs a new MSClassmark1 object from network-encoded data.MSClassmark1(byte[] data, int start, int len)
Constructs a new MSClassmark1 object from part of network-encoded data.MSClassmark1(int iEI, MSClassmark.MSClassmark1.RevisionLevel revisionLevel, MSClassmark.MSClassmark1.ESIndicator eSIndicator, MSClassmark.MSClassmark1.A51Algorithm a51Algorithm, MSClassmark.MSClassmark1.RFPowerCapability rFPowerCapability)
Constructs a new MSClassmark1 object from given values for all fields.MSClassmark1(DataInput in)
Constructs a new MSClassmark1 object from data deserialized from a stream that was written bytoStream(DataOutput)
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkFieldsSet()
Checks that all mandatory fields are present.MSClassmark.MSClassmark1
clone()
Constructs a copy of this object and everything reachable from it.static MSClassmark.MSClassmark1
copyOf(MSClassmark.MSClassmark1 from)
Creates a new object of this type, cloning the values of common fields from the given object of any subclass of the same base type.protected void
decode()
Computes the decoded form from the encoded form.protected void
encode()
Computes the encoded form from the decoded form.protected boolean
encodedIsInvalid()
Determines whether the encoded form is invalid.MSClassmark.MSClassmark1.A51Algorithm
getA51Algorithm()
Gets the value of the A5/1 algorithm supported indicator.byte[]
getEncodedForm()
Gets the encoded form.MSClassmark.MSClassmark1.ESIndicator
getESIndicator()
Gets the value of the controlled early classmark sending indicator.static FieldAccessor[]
getFieldAccessors()
Gets a new array of the accessors for fields of this type.Map<String,Object>
getFieldsMap(boolean withAbsents)
Gets a Map from field-name to field-value for the fields of a sequence.int
getIEI()
Gets the value of the Information Element Identifier.MSClassmark.MSClassmark1.RevisionLevel
getRevisionLevel()
Gets the value of the revision level.MSClassmark.MSClassmark1.RFPowerCapability
getRFPowerCapability()
Gets the value of the RF power capability.boolean
hasA51Algorithm()
Tests whether the field A51Algorithm has a value.boolean
hasESIndicator()
Tests whether the field ESIndicator has a value.boolean
hasIEI()
Tests whether the field IEI has a value.boolean
hasRevisionLevel()
Tests whether the field RevisionLevel has a value.boolean
hasRFPowerCapability()
Tests whether the field RFPowerCapability has a value.MSClassmark.MSClassmark1
setA51Algorithm(MSClassmark.MSClassmark1.A51Algorithm value)
Sets the value of the A5/1 algorithm supported indicator.MSClassmark.MSClassmark1
setESIndicator(MSClassmark.MSClassmark1.ESIndicator value)
Sets the value of the controlled early classmark sending indicator.MSClassmark.MSClassmark1
setIEI(int value)
Sets the value of the Information Element Identifier.MSClassmark.MSClassmark1
setIEIPresent(boolean flag)
Sets the presence or absence of the field IEI.MSClassmark.MSClassmark1
setRevisionLevel(MSClassmark.MSClassmark1.RevisionLevel value)
Sets the value of the revision level.MSClassmark.MSClassmark1
setRFPowerCapability(MSClassmark.MSClassmark1.RFPowerCapability value)
Sets the value of the RF power capability.void
toStream(DataOutput out)
Serializes this object to a stream in a form suitable for reading by {@link #MSClassmark.MSClassmark1(DataInput)}.-
Methods inherited from class com.opencloud.slee.resources.cgin.AbstractLazyEncodedDataObject
checkDecode, checkModifyAndDecode
-
Methods inherited from class com.opencloud.util.AbstractFieldsObject
equals, hashCode, toString
-
Methods inherited from class com.opencloud.util.AbstractDataObject
checkModify, isReadOnly, setReadOnly
-
-
-
-
Constructor Detail
-
MSClassmark1
public MSClassmark1()
Constructs a new MSClassmark1 object with no fields set.
-
MSClassmark1
public MSClassmark1(byte[] data)
Constructs a new MSClassmark1 object from network-encoded data. The data is not decoded and might not be decodable.- Parameters:
data
- network-encoded data- Throws:
NullPointerException
- if data is null
-
MSClassmark1
public MSClassmark1(byte[] data, int start, int len)
Constructs a new MSClassmark1 object from part of network-encoded data. The part starts at indexstart
and islen
bytes long. The data is not decoded and might not be decodable.- Parameters:
data
- network-encoded datastart
- starting offset of network-encoded data in byte arraylen
- default length if not predictable- Throws:
NullPointerException
- if data is nullIllegalArgumentException
- if len is negative
-
MSClassmark1
public MSClassmark1(int iEI, MSClassmark.MSClassmark1.RevisionLevel revisionLevel, MSClassmark.MSClassmark1.ESIndicator eSIndicator, MSClassmark.MSClassmark1.A51Algorithm a51Algorithm, MSClassmark.MSClassmark1.RFPowerCapability rFPowerCapability)
Constructs a new MSClassmark1 object from given values for all fields.- Parameters:
iEI
- the Information Element IdentifierrevisionLevel
- the revision leveleSIndicator
- the controlled early classmark sending indicatora51Algorithm
- the A5/1 algorithm supported indicatorrFPowerCapability
- the RF power capability
-
MSClassmark1
public MSClassmark1(DataInput in) throws IOException
Constructs a new MSClassmark1 object from data deserialized from a stream that was written bytoStream(DataOutput)
.- Parameters:
in
- the stream to read from- Throws:
EOFException
- if reading is pre-empted by end-of-fileIOException
- if the data cannot be read
-
-
Method Detail
-
toStream
public void toStream(DataOutput out) throws IOException
Serializes this object to a stream in a form suitable for reading by {@link #MSClassmark.MSClassmark1(DataInput)}.- Specified by:
toStream
in interfaceFastSerializable
- Parameters:
out
- the stream to write to- Throws:
IOException
- if an I/O error occurs
-
hasIEI
public boolean hasIEI() throws DecodeException
Tests whether the field IEI has a value.- Returns:
- whether the field has a value
- Throws:
DecodeException
- if encoded state cannot be decoded
-
setIEIPresent
public MSClassmark.MSClassmark1 setIEIPresent(boolean flag) throws IllegalStateException
Sets the presence or absence of the field IEI.- Parameters:
flag
- whether the field should be marked as present- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
hasRevisionLevel
public boolean hasRevisionLevel() throws DecodeException
Tests whether the field RevisionLevel has a value.- Returns:
- whether the field has a value
- Throws:
DecodeException
- if encoded state cannot be decoded
-
hasESIndicator
public boolean hasESIndicator() throws DecodeException
Tests whether the field ESIndicator has a value.- Returns:
- whether the field has a value
- Throws:
DecodeException
- if encoded state cannot be decoded
-
hasA51Algorithm
public boolean hasA51Algorithm() throws DecodeException
Tests whether the field A51Algorithm has a value.- Returns:
- whether the field has a value
- Throws:
DecodeException
- if encoded state cannot be decoded
-
hasRFPowerCapability
public boolean hasRFPowerCapability() throws DecodeException
Tests whether the field RFPowerCapability has a value.- Returns:
- whether the field has a value
- Throws:
DecodeException
- if encoded state cannot be decoded
-
checkFieldsSet
public void checkFieldsSet() throws EncodeException
Checks that all mandatory fields are present. Should be called immediately before all calls to encode().- Specified by:
checkFieldsSet
in classAbstractLazyEncodedDataObject<byte[]>
- Throws:
EncodeException
- if any mandatory field is not present
-
getIEI
public int getIEI() throws DecodeException
Gets the value of the Information Element Identifier.- Returns:
- int representation of the Information Element Identifier
- Throws:
DecodeException
- if encoded state cannot be decoded
-
getRevisionLevel
public MSClassmark.MSClassmark1.RevisionLevel getRevisionLevel() throws DecodeException
Gets the value of the revision level.- Returns:
- RevisionLevel representation of the revision level
- Throws:
DecodeException
- if encoded state cannot be decoded
-
getESIndicator
public MSClassmark.MSClassmark1.ESIndicator getESIndicator() throws DecodeException
Gets the value of the controlled early classmark sending indicator.- Returns:
- ESIndicator representation of the controlled early classmark sending indicator
- Throws:
DecodeException
- if encoded state cannot be decoded
-
getA51Algorithm
public MSClassmark.MSClassmark1.A51Algorithm getA51Algorithm() throws DecodeException
Gets the value of the A5/1 algorithm supported indicator.- Returns:
- A51Algorithm representation of the A5/1 algorithm supported indicator
- Throws:
DecodeException
- if encoded state cannot be decoded
-
getRFPowerCapability
public MSClassmark.MSClassmark1.RFPowerCapability getRFPowerCapability() throws DecodeException
Gets the value of the RF power capability.- Returns:
- RFPowerCapability representation of the RF power capability
- Throws:
DecodeException
- if encoded state cannot be decoded
-
setIEI
public MSClassmark.MSClassmark1 setIEI(int value) throws IllegalStateException
Sets the value of the Information Element Identifier.- Parameters:
value
- int representation of the Information Element Identifier- Returns:
- this
- Throws:
IllegalStateException
-
setRevisionLevel
public MSClassmark.MSClassmark1 setRevisionLevel(MSClassmark.MSClassmark1.RevisionLevel value) throws IllegalStateException
Sets the value of the revision level.- Parameters:
value
- RevisionLevel representation of the revision level- Returns:
- this
- Throws:
IllegalStateException
-
setESIndicator
public MSClassmark.MSClassmark1 setESIndicator(MSClassmark.MSClassmark1.ESIndicator value) throws IllegalStateException
Sets the value of the controlled early classmark sending indicator.- Parameters:
value
- ESIndicator representation of the controlled early classmark sending indicator- Returns:
- this
- Throws:
IllegalStateException
-
setA51Algorithm
public MSClassmark.MSClassmark1 setA51Algorithm(MSClassmark.MSClassmark1.A51Algorithm value) throws IllegalStateException
Sets the value of the A5/1 algorithm supported indicator.- Parameters:
value
- A51Algorithm representation of the A5/1 algorithm supported indicator- Returns:
- this
- Throws:
IllegalStateException
-
setRFPowerCapability
public MSClassmark.MSClassmark1 setRFPowerCapability(MSClassmark.MSClassmark1.RFPowerCapability value) throws IllegalStateException
Sets the value of the RF power capability.- Parameters:
value
- RFPowerCapability representation of the RF power capability- Returns:
- this
- Throws:
IllegalStateException
-
copyOf
public static MSClassmark.MSClassmark1 copyOf(MSClassmark.MSClassmark1 from)
Creates a new object of this type, cloning the values of common fields from the given object of any subclass of the same base type.- Parameters:
from
- the object from which to copy- Returns:
- MSClassmark1
-
clone
public MSClassmark.MSClassmark1 clone()
Constructs a copy of this object and everything reachable from it.- Specified by:
clone
in interfaceDataObject
- Specified by:
clone
in classAbstractDataObject
- Returns:
- copy of object
-
getFieldAccessors
public static FieldAccessor[] getFieldAccessors()
Gets a new array of the accessors for fields of this type.- Returns:
- FieldAccessor[]
-
getFieldsMap
public Map<String,Object> getFieldsMap(boolean withAbsents)
Gets a Map from field-name to field-value for the fields of a sequence. For a field of primitive type, the field-value is boxed. For an absent optional field, the field-value is AbstractFieldsObject.FIELD_ABSENT. For an uninitialised mandatory field, the field-value is AbstractFieldsObject.FIELD_UNINITIALISED. For a field of String type, the encoded form is used if the String cannot be decoded. For a type that represents an OCTET STRING that cannot be decoded, a map from "encodedValue" to the byte array value is returned.- Specified by:
getFieldsMap
in classAbstractFieldsObject
- Parameters:
withAbsents
- whether to put absent optional fields into Map- Returns:
- Map from field-name to field-value
-
encodedIsInvalid
protected boolean encodedIsInvalid()
Determines whether the encoded form is invalid.- Returns:
- boolean
-
getEncodedForm
public byte[] getEncodedForm() throws EncodeException
Gets the encoded form.- Returns:
- encoded form
- Throws:
EncodeException
- if encoding fails
-
encode
protected void encode() throws EncodeException
Computes the encoded form from the decoded form.- Specified by:
encode
in classAbstractLazyEncodedDataObject<byte[]>
- Throws:
EncodeException
- if any mandatory field is out of range
-
decode
protected void decode() throws DecodeException
Computes the decoded form from the encoded form.- Specified by:
decode
in classAbstractLazyEncodedDataObject<byte[]>
- Throws:
DecodeException
- if too few or too many octets to be decoded
-
-