public static final class BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital extends AbstractLazyEncodedNamedInteger<BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.EncodedValue>
The API offered by this class is as if the type were specified in ASN.1 as follows.
UnrestrictedDigital ::= CHOICE { v110 V110, v120 V120 }The class takes care of encoding the field values into a NamedInteger and decoding field values from a NamedInteger, the encoded representation being as tabulated below.
Data Encoding - based on ITU-T Q.931 (05/98) §4.5.5 p58 | ||||||||
---|---|---|---|---|---|---|---|---|
8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | |
Octet 5b* | ext. 0/1 | Intermediate rate | NIC on Tx | NIC on Rx | Flow control on Tx | Flow control on Rx | Discriminant (0) | |
Octet 5b* | ext. 0/1 | Intermediate rate | NIC on Tx | NIC on Rx | Flow control on Tx | Flow control on Rx | Discriminant (1) |
Modifier and Type | Class and Description |
---|---|
static class |
BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.Choice
Enumeration of discriminating values.
|
static class |
BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.EncodedValue
Representation of UnrestrictedDigital values as NamedIntegers.
|
static class |
BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.V110
Class V110 represents data that is relevant when TransferCapability is UNRESTRICTED_DIGITAL
and Layer1Protocol is V110 or I460 or X30.
|
static class |
BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.V120
Class V120 represents data that is relevant when TransferCapability is UNRESTRICTED_DIGITAL
and Layer1Protocol is V120.
|
isDecoded
encoded
FIELD_ABSENT, FIELD_UNINITIALISED
Constructor and Description |
---|
BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital()
Constructs a new UnrestrictedDigital object with no fields set.
|
BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital(byte[] data)
Constructs a new UnrestrictedDigital object from network-encoded data.
|
BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital(byte[] data,
int start,
int len)
Constructs a new UnrestrictedDigital object from part of network-encoded data.
|
BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital(DataInput in)
Constructs a new UnrestrictedDigital object from data deserialized from a stream that was written by
toStream(DataOutput) . |
Modifier and Type | Method and Description |
---|---|
void |
checkFieldsSet()
Checks that all mandatory fields are present.
|
BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital |
clone()
Constructs a copy of this object and everything reachable from it.
|
static BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital |
copyOf(BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital 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.
|
protected BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.EncodedValue |
fromValue(int value)
Converts an int to a NamedInteger.
|
byte[] |
getByteArrayForm()
Gets the byte array encoded form.
|
BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.Choice |
getChoice()
Gets the discriminant for which choice is chosen.
|
BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.EncodedValue |
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 :discriminant-name to field-value.
|
BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.V110 |
getV110()
Gets the value of data relevant when TransferCapability is UNRESTRICTED_DIGITAL and Layer1Protocol is V110 or I460 or X30.
|
BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.V120 |
getV120()
Gets the value of data relevant when TransferCapability is UNRESTRICTED_DIGITAL and Layer1Protocol is V120.
|
boolean |
isV110Chosen()
Tests whether the choice is v110.
|
boolean |
isV120Chosen()
Tests whether the choice is v120.
|
void |
setReadOnly()
Sets this and all its fields to be immutable.
|
BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital |
setV110(BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.V110 value)
Sets the value of data relevant when TransferCapability is UNRESTRICTED_DIGITAL and Layer1Protocol is V110 or I460 or X30.
|
BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital |
setV120(BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.V120 value)
Sets the value of data relevant when TransferCapability is UNRESTRICTED_DIGITAL and Layer1Protocol is V120.
|
void |
toStream(DataOutput out)
Serializes this object to a stream in a form suitable for reading by
BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital(DataInput) . |
checkDecode, checkModifyAndDecode
equals, hashCode, toString
checkModify, isReadOnly
public BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital()
public BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital(byte[] data)
data
- network-encoded dataNullPointerException
- if data is nullpublic BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital(byte[] data, int start, int len)
start
and is len
bytes long.
The data is not decoded and might not be decodable.data
- network-encoded datastart
- starting offset of network-encoded data in byte arraylen
- default length if not predictableNullPointerException
- if data is nullIllegalArgumentException
- if len is negativepublic BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital(DataInput in) throws IOException
toStream(DataOutput)
.in
- the stream to read fromEOFException
- if reading is pre-empted by end-of-fileIOException
- if the data cannot be readpublic void toStream(DataOutput out) throws IOException
BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital(DataInput)
.out
- the stream to write toIOException
- if an I/O error occurspublic BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.Choice getChoice() throws DecodeException
DecodeException
- if encoded state cannot be decodedpublic boolean isV110Chosen() throws DecodeException
DecodeException
- if encoded state cannot be decodedpublic boolean isV120Chosen() throws DecodeException
DecodeException
- if encoded state cannot be decodedpublic void checkFieldsSet() throws EncodeException
checkFieldsSet
in class AbstractLazyEncodedDataObject<BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.EncodedValue>
EncodeException
- if any mandatory field is not presentpublic BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.V110 getV110() throws DecodeException
DecodeException
- if encoded state cannot be decodedpublic BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.V120 getV120() throws DecodeException
DecodeException
- if encoded state cannot be decodedpublic BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital setV110(BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.V110 value) throws IllegalStateException
value
- V110 representation of data relevant when TransferCapability is UNRESTRICTED_DIGITAL and Layer1Protocol is V110 or I460 or X30IllegalStateException
public BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital setV120(BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.V120 value) throws IllegalStateException
value
- V120 representation of data relevant when TransferCapability is UNRESTRICTED_DIGITAL and Layer1Protocol is V120IllegalStateException
public static BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital copyOf(BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital from)
from
- the object from which to copypublic BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital clone()
clone
in interface DataObject
clone
in class AbstractDataObject
public void setReadOnly()
setReadOnly
in interface DataObject
setReadOnly
in class AbstractDataObject
public static FieldAccessor[] getFieldAccessors()
public Map<String,Object> getFieldsMap(boolean withAbsents)
getFieldsMap
in class AbstractFieldsObject
withAbsents
- the value of this parameter is ignoredprotected boolean encodedIsInvalid()
public BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.EncodedValue getEncodedForm() throws EncodeException
EncodeException
- if encoding failspublic byte[] getByteArrayForm() throws EncodeException
EncodeException
- if encoding failsprotected BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.EncodedValue fromValue(int value)
fromValue
in class AbstractLazyEncodedNamedInteger<BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.EncodedValue>
value
- intprotected void encode() throws EncodeException
encode
in class AbstractLazyEncodedDataObject<BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.EncodedValue>
EncodeException
- if address cannot be encodedprotected void decode()