Class MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b
- java.lang.Object
-
- com.opencloud.util.AbstractDataObject
-
- com.opencloud.util.AbstractFieldsObject
-
- AbstractEncodedDataObject<T>
-
- AbstractLazyEncodedDataObject<byte[]>
-
- AbstractLazyEncodedByteArray
-
- com.opencloud.slee.resources.in.datatypes.cc.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b
-
- All Implemented Interfaces:
DataObject
,Serializable
- Enclosing class:
- MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a
public static final class MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b extends AbstractLazyEncodedByteArray
Class O6b represents data that is relevant to octets 6b* to 6g*. It represents part of a larger octet string; it is not transmitted on a network by itself.The API offered by this class is as if the type were specified in ASN.1 as follows.
O6b ::= SEQUENCE { parity Parity, networkIndependentClockOnReceive NetworkIndependentClockOnReceive, networkIndependentClockOnTransmit NetworkIndependentClockOnTransmit, intermediateRate IntermediateRate, o6c O6c OPTIONAL }
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 3GPP TS 24.008 v4.17.0 (2007-09) §10.5.4.5 pp343-361 8 7 6 5 4 3 2 1 Octet 6b* Spare Intermediate rate NIC on Tx NIC on Rx Parity Octet 6c* ext. 0/1 Connection element Modem type Octet 6d* ext. 0/1 Other modem type Fixed network user rate Octet 6e* ext. 0/1 Acceptable channel codings Maximum number of traffic channels Octet 6f* ext. 0/1 UIMI Wanted air interface user rate Octet 6g* ext. 1 Acceptable channel codings extended Asymmetry indication Spare (00)
The octet numbering in the above table is that used in the cited standard for the octet encoded here.There is a static condition in standard 24.008 that says if octet 6b is present then octet 6c shall also be present, in the GSM encoding. Contradicting that, the standard allows the ext bit in octet 6b to be 1, which would indicate that there is no following octet 6c. As a compromise, this API offers field O6c as an OPTIONAL field, but with this recommendation: you should always provide a value for field O6c.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.IntermediateRate
IntermediateRate constants.static class
MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.NetworkIndependentClockOnReceive
Enumeration of Network Independent Clock On Receive constants.static class
MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.NetworkIndependentClockOnTransmit
Enumeration of Network Independent Clock On Transmit constants.static class
MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c
Class O6c represents data that is relevant to octets 6c* to 6g*.static class
MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.Parity
Parity 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 O6b()
Constructs a new O6b object with no fields set.O6b(byte[] data)
Constructs a new O6b object from network-encoded data.O6b(byte[] data, int start, int len)
Constructs a new O6b object from part of network-encoded data.O6b(DataInput in)
Constructs a new O6b 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.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b
clone()
Constructs a copy of this object and everything reachable from it.static MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b
copyOf(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b 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.byte[]
getEncodedForm()
Gets the encoded form.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.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.IntermediateRate
getIntermediateRate()
Gets the value of the V.110/X.30 rate adaptation Intermediate rate.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.NetworkIndependentClockOnReceive
getNetworkIndependentClockOnReceive()
Gets the value of the network independent clock (NIC) on reception (Rx).MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.NetworkIndependentClockOnTransmit
getNetworkIndependentClockOnTransmit()
Gets the value of the network independent clock (NIC) on transmission (Tx).MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c
getO6c()
Gets the value of the octets 6c*..6g*.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.Parity
getParity()
Gets the value of the parity information.boolean
hasIntermediateRate()
Tests whether the field IntermediateRate has a value.boolean
hasNetworkIndependentClockOnReceive()
Tests whether the field NetworkIndependentClockOnReceive has a value.boolean
hasNetworkIndependentClockOnTransmit()
Tests whether the field NetworkIndependentClockOnTransmit has a value.boolean
hasO6c()
Tests whether the field O6c has a value.boolean
hasParity()
Tests whether the field Parity has a value.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b
setIntermediateRate(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.IntermediateRate value)
Sets the value of the V.110/X.30 rate adaptation Intermediate rate.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b
setNetworkIndependentClockOnReceive(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.NetworkIndependentClockOnReceive value)
Sets the value of the network independent clock (NIC) on reception (Rx).MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b
setNetworkIndependentClockOnTransmit(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.NetworkIndependentClockOnTransmit value)
Sets the value of the network independent clock (NIC) on transmission (Tx).MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b
setO6c(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c value)
Sets the value of the octets 6c*..6g*.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b
setParity(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.Parity value)
Sets the value of the parity information.void
toStream(DataOutput out)
Serializes this object to a stream in a form suitable for reading by {@link #MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b(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
-
O6b
public O6b()
Constructs a new O6b object with no fields set.
-
O6b
public O6b(byte[] data)
Constructs a new O6b 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
-
O6b
public O6b(byte[] data, int start, int len)
Constructs a new O6b 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
-
O6b
public O6b(DataInput in) throws IOException
Constructs a new O6b 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 #MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b(DataInput)}.- Parameters:
out
- the stream to write to- Throws:
IOException
- if an I/O error occurs
-
hasParity
public boolean hasParity() throws DecodeException
Tests whether the field Parity has a value.- Returns:
- whether the field has a value
- Throws:
DecodeException
- if encoded state cannot be decoded
-
hasNetworkIndependentClockOnReceive
public boolean hasNetworkIndependentClockOnReceive() throws DecodeException
Tests whether the field NetworkIndependentClockOnReceive has a value.- Returns:
- whether the field has a value
- Throws:
DecodeException
- if encoded state cannot be decoded
-
hasNetworkIndependentClockOnTransmit
public boolean hasNetworkIndependentClockOnTransmit() throws DecodeException
Tests whether the field NetworkIndependentClockOnTransmit has a value.- Returns:
- whether the field has a value
- Throws:
DecodeException
- if encoded state cannot be decoded
-
hasIntermediateRate
public boolean hasIntermediateRate() throws DecodeException
Tests whether the field IntermediateRate has a value.- Returns:
- whether the field has a value
- Throws:
DecodeException
- if encoded state cannot be decoded
-
hasO6c
public boolean hasO6c() throws DecodeException
Tests whether the field O6c 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
-
getParity
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.Parity getParity() throws DecodeException
Gets the value of the parity information.- Returns:
- Parity representation of the parity information
- Throws:
DecodeException
- if encoded state cannot be decoded
-
getNetworkIndependentClockOnReceive
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.NetworkIndependentClockOnReceive getNetworkIndependentClockOnReceive() throws DecodeException
Gets the value of the network independent clock (NIC) on reception (Rx).- Returns:
- NetworkIndependentClockOnReceive representation of the network independent clock (NIC) on reception (Rx)
- Throws:
DecodeException
- if encoded state cannot be decoded
-
getNetworkIndependentClockOnTransmit
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.NetworkIndependentClockOnTransmit getNetworkIndependentClockOnTransmit() throws DecodeException
Gets the value of the network independent clock (NIC) on transmission (Tx).- Returns:
- NetworkIndependentClockOnTransmit representation of the network independent clock (NIC) on transmission (Tx)
- Throws:
DecodeException
- if encoded state cannot be decoded
-
getIntermediateRate
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.IntermediateRate getIntermediateRate() throws DecodeException
Gets the value of the V.110/X.30 rate adaptation Intermediate rate.- Returns:
- IntermediateRate representation of the V.110/X.30 rate adaptation Intermediate rate
- Throws:
DecodeException
- if encoded state cannot be decoded
-
getO6c
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c getO6c() throws DecodeException
Gets the value of the octets 6c*..6g*.- Returns:
- O6c representation of the octets 6c*..6g*
- Throws:
DecodeException
- if encoded state cannot be decoded
-
setParity
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b setParity(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.Parity value) throws IllegalStateException
Sets the value of the parity information.- Parameters:
value
- Parity representation of the parity information- Returns:
- this
- Throws:
IllegalStateException
-
setNetworkIndependentClockOnReceive
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b setNetworkIndependentClockOnReceive(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.NetworkIndependentClockOnReceive value) throws IllegalStateException
Sets the value of the network independent clock (NIC) on reception (Rx).- Parameters:
value
- NetworkIndependentClockOnReceive representation of the network independent clock (NIC) on reception (Rx)- Returns:
- this
- Throws:
IllegalStateException
-
setNetworkIndependentClockOnTransmit
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b setNetworkIndependentClockOnTransmit(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.NetworkIndependentClockOnTransmit value) throws IllegalStateException
Sets the value of the network independent clock (NIC) on transmission (Tx).- Parameters:
value
- NetworkIndependentClockOnTransmit representation of the network independent clock (NIC) on transmission (Tx)- Returns:
- this
- Throws:
IllegalStateException
-
setIntermediateRate
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b setIntermediateRate(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.IntermediateRate value) throws IllegalStateException
Sets the value of the V.110/X.30 rate adaptation Intermediate rate.- Parameters:
value
- IntermediateRate representation of the V.110/X.30 rate adaptation Intermediate rate- Returns:
- this
- Throws:
IllegalStateException
-
setO6c
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b setO6c(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c value) throws IllegalStateException
Sets the value of the octets 6c*..6g*.- Parameters:
value
- O6c representation of the octets 6c*..6g*- Returns:
- this
- Throws:
IllegalStateException
-
copyOf
public static MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b copyOf(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b 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:
- O6b
-
clone
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b 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 mnay or too few octets
-
-