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 classMSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.IntermediateRateIntermediateRate constants.static classMSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.NetworkIndependentClockOnReceiveEnumeration of Network Independent Clock On Receive constants.static classMSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.NetworkIndependentClockOnTransmitEnumeration of Network Independent Clock On Transmit constants.static classMSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6cClass O6c represents data that is relevant to octets 6c* to 6g*.static classMSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.ParityParity 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 voidcheckFieldsSet()Checks that all mandatory fields are present.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6bclone()Constructs a copy of this object and everything reachable from it.static MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6bcopyOf(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 voiddecode()Computes the decoded form from the encoded form.protected voidencode()Computes the encoded form from the decoded form.protected booleanencodedIsInvalid()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.IntermediateRategetIntermediateRate()Gets the value of the V.110/X.30 rate adaptation Intermediate rate.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.NetworkIndependentClockOnReceivegetNetworkIndependentClockOnReceive()Gets the value of the network independent clock (NIC) on reception (Rx).MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.NetworkIndependentClockOnTransmitgetNetworkIndependentClockOnTransmit()Gets the value of the network independent clock (NIC) on transmission (Tx).MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6cgetO6c()Gets the value of the octets 6c*..6g*.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.ParitygetParity()Gets the value of the parity information.booleanhasIntermediateRate()Tests whether the field IntermediateRate has a value.booleanhasNetworkIndependentClockOnReceive()Tests whether the field NetworkIndependentClockOnReceive has a value.booleanhasNetworkIndependentClockOnTransmit()Tests whether the field NetworkIndependentClockOnTransmit has a value.booleanhasO6c()Tests whether the field O6c has a value.booleanhasParity()Tests whether the field Parity has a value.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6bsetIntermediateRate(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.O6bsetNetworkIndependentClockOnReceive(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.O6bsetNetworkIndependentClockOnTransmit(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.O6bsetO6c(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c value)Sets the value of the octets 6c*..6g*.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6bsetParity(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.Parity value)Sets the value of the parity information.voidtoStream(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 indexstartand islenbytes 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 DecodeExceptionTests 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 DecodeExceptionTests 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 DecodeExceptionTests 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 DecodeExceptionTests 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 DecodeExceptionTests 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 EncodeExceptionChecks that all mandatory fields are present. Should be called immediately before all calls to encode().- Specified by:
checkFieldsSetin 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:
clonein interfaceDataObject- Specified by:
clonein 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:
getFieldsMapin 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 EncodeExceptionGets the encoded form.- Returns:
- encoded form
- Throws:
EncodeException- if encoding fails
-
encode
protected void encode() throws EncodeExceptionComputes the encoded form from the decoded form.- Specified by:
encodein classAbstractLazyEncodedDataObject<byte[]>- Throws:
EncodeException- if any mandatory field is out of range
-
decode
protected void decode() throws DecodeExceptionComputes the decoded form from the encoded form.- Specified by:
decodein classAbstractLazyEncodedDataObject<byte[]>- Throws:
DecodeException- if too mnay or too few octets
-
-