Class MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g
- 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.O6c.O6d.O6e.O6f.O6g
-
- All Implemented Interfaces:
DataObject,Serializable
public static final class MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g extends AbstractLazyEncodedByteArray
Class O6g represents the data of Octet 6g in an MSBearerCapability. 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.
O6g ::= SEQUENCE { asymmetryIndication AsymmetryIndication, channelCodingExtTCH_F28_8 BOOLEAN, channelCodingExtTCH_F32_0 BOOLEAN, channelCodingExtTCH_F43_2 BOOLEAN }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 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 octets encoded here.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g.AsymmetryIndicationEnumeration of AsymmetryIndication 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 O6g()Constructs a new O6g object with no fields set.O6g(byte[] data)Constructs a new O6g object from network-encoded data.O6g(byte[] data, int start, int len)Constructs a new O6g object from part of network-encoded data.O6g(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g.AsymmetryIndication asymmetryIndication, boolean channelCodingExtTCH_F28_8, boolean channelCodingExtTCH_F32_0, boolean channelCodingExtTCH_F43_2)Constructs a new O6g object from given values for all fields.O6g(DataInput in)Constructs a new O6g 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.O6b.O6c.O6d.O6e.O6f.O6gclone()Constructs a copy of this object and everything reachable from it.static MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6gcopyOf(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g 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.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g.AsymmetryIndicationgetAsymmetryIndication()Gets the value of the user asymmetry indication.booleangetChannelCodingExtTCH_F28_8()Gets the value of TCH/F28.8 acceptable/not acceptable.booleangetChannelCodingExtTCH_F32_0()Gets the value of TCH/32.0 acceptable/not acceptable.booleangetChannelCodingExtTCH_F43_2()Gets the value of TCH/F32.2 acceptable/not acceptable.static intgetContainedLength(byte[] data, int start, int len)Determines the length of the encoded value that commences at offsetstartin the givendata.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.booleanhasAsymmetryIndication()Tests whether the field AsymmetryIndication has a value.booleanhasChannelCodingExtTCH_F28_8()Tests whether the field ChannelCodingExtTCH_F28_8 has a value.booleanhasChannelCodingExtTCH_F32_0()Tests whether the field ChannelCodingExtTCH_F32_0 has a value.booleanhasChannelCodingExtTCH_F43_2()Tests whether the field ChannelCodingExtTCH_F43_2 has a value.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6gsetAsymmetryIndication(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g.AsymmetryIndication value)Sets the value of the user asymmetry indication.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6gsetChannelCodingExtTCH_F28_8(boolean value)Sets the value of TCH/F28.8 acceptable/not acceptable.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6gsetChannelCodingExtTCH_F28_8Present(boolean flag)Sets the presence or absence of the field ChannelCodingExtTCH_F28_8.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6gsetChannelCodingExtTCH_F32_0(boolean value)Sets the value of TCH/32.0 acceptable/not acceptable.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6gsetChannelCodingExtTCH_F32_0Present(boolean flag)Sets the presence or absence of the field ChannelCodingExtTCH_F32_0.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6gsetChannelCodingExtTCH_F43_2(boolean value)Sets the value of TCH/F32.2 acceptable/not acceptable.MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6gsetChannelCodingExtTCH_F43_2Present(boolean flag)Sets the presence or absence of the field ChannelCodingExtTCH_F43_2.voidtoStream(DataOutput out)Serializes this object to a stream in a form suitable for reading by {@link #MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g(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
-
O6g
public O6g()
Constructs a new O6g object with no fields set.
-
O6g
public O6g(byte[] data)
Constructs a new O6g 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
-
O6g
public O6g(byte[] data, int start, int len)Constructs a new O6g 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
-
O6g
public O6g(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g.AsymmetryIndication asymmetryIndication, boolean channelCodingExtTCH_F28_8, boolean channelCodingExtTCH_F32_0, boolean channelCodingExtTCH_F43_2)
Constructs a new O6g object from given values for all fields.- Parameters:
asymmetryIndication- the user asymmetry indicationchannelCodingExtTCH_F28_8- TCH/F28.8 acceptable/not acceptablechannelCodingExtTCH_F32_0- TCH/32.0 acceptable/not acceptablechannelCodingExtTCH_F43_2- TCH/F32.2 acceptable/not acceptable
-
O6g
public O6g(DataInput in) throws IOException
Constructs a new O6g 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.O6c.O6d.O6e.O6f.O6g(DataInput)}.- Parameters:
out- the stream to write to- Throws:
IOException- if an I/O error occurs
-
hasAsymmetryIndication
public boolean hasAsymmetryIndication() throws DecodeExceptionTests whether the field AsymmetryIndication has a value.- Returns:
- whether the field has a value
- Throws:
DecodeException- if encoded state cannot be decoded
-
hasChannelCodingExtTCH_F28_8
public boolean hasChannelCodingExtTCH_F28_8() throws DecodeExceptionTests whether the field ChannelCodingExtTCH_F28_8 has a value.- Returns:
- whether the field has a value
- Throws:
DecodeException- if encoded state cannot be decoded
-
setChannelCodingExtTCH_F28_8Present
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g setChannelCodingExtTCH_F28_8Present(boolean flag) throws IllegalStateException
Sets the presence or absence of the field ChannelCodingExtTCH_F28_8.- Parameters:
flag- whether the field should be marked as present- Returns:
- this
- Throws:
IllegalStateException- if this instance has been marked as read-only
-
hasChannelCodingExtTCH_F32_0
public boolean hasChannelCodingExtTCH_F32_0() throws DecodeExceptionTests whether the field ChannelCodingExtTCH_F32_0 has a value.- Returns:
- whether the field has a value
- Throws:
DecodeException- if encoded state cannot be decoded
-
setChannelCodingExtTCH_F32_0Present
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g setChannelCodingExtTCH_F32_0Present(boolean flag) throws IllegalStateException
Sets the presence or absence of the field ChannelCodingExtTCH_F32_0.- Parameters:
flag- whether the field should be marked as present- Returns:
- this
- Throws:
IllegalStateException- if this instance has been marked as read-only
-
hasChannelCodingExtTCH_F43_2
public boolean hasChannelCodingExtTCH_F43_2() throws DecodeExceptionTests whether the field ChannelCodingExtTCH_F43_2 has a value.- Returns:
- whether the field has a value
- Throws:
DecodeException- if encoded state cannot be decoded
-
setChannelCodingExtTCH_F43_2Present
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g setChannelCodingExtTCH_F43_2Present(boolean flag) throws IllegalStateException
Sets the presence or absence of the field ChannelCodingExtTCH_F43_2.- Parameters:
flag- whether the field should be marked as present- Returns:
- this
- Throws:
IllegalStateException- if this instance has been marked as read-only
-
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
-
getAsymmetryIndication
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g.AsymmetryIndication getAsymmetryIndication() throws DecodeException
Gets the value of the user asymmetry indication.- Returns:
- AsymmetryIndication representation of the user asymmetry indication
- Throws:
DecodeException- if encoded state cannot be decoded
-
getChannelCodingExtTCH_F28_8
public boolean getChannelCodingExtTCH_F28_8() throws DecodeExceptionGets the value of TCH/F28.8 acceptable/not acceptable.- Returns:
- boolean representation of TCH/F28.8 acceptable/not acceptable
- Throws:
DecodeException- if encoded state cannot be decoded
-
getChannelCodingExtTCH_F32_0
public boolean getChannelCodingExtTCH_F32_0() throws DecodeExceptionGets the value of TCH/32.0 acceptable/not acceptable.- Returns:
- boolean representation of TCH/32.0 acceptable/not acceptable
- Throws:
DecodeException- if encoded state cannot be decoded
-
getChannelCodingExtTCH_F43_2
public boolean getChannelCodingExtTCH_F43_2() throws DecodeExceptionGets the value of TCH/F32.2 acceptable/not acceptable.- Returns:
- boolean representation of TCH/F32.2 acceptable/not acceptable
- Throws:
DecodeException- if encoded state cannot be decoded
-
setAsymmetryIndication
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g setAsymmetryIndication(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g.AsymmetryIndication value) throws IllegalStateException
Sets the value of the user asymmetry indication.- Parameters:
value- AsymmetryIndication representation of the user asymmetry indication- Returns:
- this
- Throws:
IllegalStateException
-
setChannelCodingExtTCH_F28_8
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g setChannelCodingExtTCH_F28_8(boolean value) throws IllegalStateException
Sets the value of TCH/F28.8 acceptable/not acceptable.- Parameters:
value- boolean representation of TCH/F28.8 acceptable/not acceptable- Returns:
- this
- Throws:
IllegalStateException
-
setChannelCodingExtTCH_F32_0
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g setChannelCodingExtTCH_F32_0(boolean value) throws IllegalStateException
Sets the value of TCH/32.0 acceptable/not acceptable.- Parameters:
value- boolean representation of TCH/32.0 acceptable/not acceptable- Returns:
- this
- Throws:
IllegalStateException
-
setChannelCodingExtTCH_F43_2
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g setChannelCodingExtTCH_F43_2(boolean value) throws IllegalStateException
Sets the value of TCH/F32.2 acceptable/not acceptable.- Parameters:
value- boolean representation of TCH/F32.2 acceptable/not acceptable- Returns:
- this
- Throws:
IllegalStateException
-
copyOf
public static MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g copyOf(MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g 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:
- O6g
-
clone
public MSBearerCapability.GSM.Content.NonSpeech.Layer1Capability.O6a.O6b.O6c.O6d.O6e.O6f.O6g 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
-
getContainedLength
public static int getContainedLength(byte[] data, int start, int len)Determines the length of the encoded value that commences at offsetstartin the givendata. The value is not fully decoded and might not be decodable. Values of this type are of a fixed length, so that length is returned if the data is long enough, otherwise 0 is returned.- Parameters:
data- network-encoded datastart- index into data where value commenceslen- length in data to be considered- Returns:
- 1, or 0 if encoded value is not long enough
-
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 decoding fails
-
-