public void encodeData(AsnOutputStream aos) throws MAPException { if (this.extensionContainer == null && (this.shapeOfLocationEstimateNotSupported == null || this.shapeOfLocationEstimateNotSupported == false) && (this.neededLcsCapabilityNotSupportedInServingNode == null || this.neededLcsCapabilityNotSupportedInServingNode == false)) return; try { if (this.extensionContainer != null) ((MAPExtensionContainerImpl) this.extensionContainer).encodeAll(aos); if (this.shapeOfLocationEstimateNotSupported != null && this.shapeOfLocationEstimateNotSupported == true) aos.writeNull(Tag.CLASS_CONTEXT_SPECIFIC, shapeOfLocationEstimateNotSupported_TAG); if (this.neededLcsCapabilityNotSupportedInServingNode != null && this.neededLcsCapabilityNotSupportedInServingNode == true) aos.writeNull(Tag.CLASS_CONTEXT_SPECIFIC, neededLcsCapabilityNotSupportedInServingNode_TAG); } catch (IOException e) { throw new MAPException( "IOException when encoding MAPErrorMessageFacilityNotSup: " + e.getMessage(), e); } catch (AsnException e) { throw new MAPException( "AsnException when encoding MAPErrorMessageFacilityNotSup: " + e.getMessage(), e); } }
/* * (non-Javadoc) * * @see org.mobicents.protocols.protocols.ss7.cap.api.map.api.primitives.MAPAsnPrimitive#encodeAll * (com.ebridge.protocols.asn.AsnOutputStream, int, int) */ public void encodeAll(AsnOutputStream asnOs, int tagClass, int tag) throws MAPException { try { asnOs.writeTag(tagClass, this.getIsPrimitive(), tag); int pos = asnOs.StartContentDefiniteLength(); this.encodeData(asnOs); asnOs.FinalizeContent(pos); } catch (AsnException e) { throw new MAPException( "AsnException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } }
public void encodeAll(AsnOutputStream asnOs, int tagClass, int tag) throws MAPException { try { asnOs.writeTag(tagClass, false, tag); int pos = asnOs.StartContentDefiniteLength(); this.encodeData(asnOs); asnOs.FinalizeContent(pos); } catch (AsnException e) { throw new MAPException( "AsnException when encoding MAPErrorMessageFacilityNotSup: " + e.getMessage(), e); } }
/* * (non-Javadoc) * * @see org.mobicents.protocols.protocols.ss7.cap.api.map.api.primitives.MAPAsnPrimitive#encodeData * (com.ebridge.protocols.asn.AsnOutputStream) */ public void encodeData(AsnOutputStream asnOs) throws MAPException { if (this.horizontalAccuracy != null) { try { asnOs.writeOctetString( Tag.CLASS_CONTEXT_SPECIFIC, _TAG_HORIZONTAL_ACCURACY, new byte[] {this.horizontalAccuracy.byteValue()}); } catch (IOException e) { throw new MAPException("IOException when encoding parameter horizontalAccuracy: ", e); } catch (AsnException e) { throw new MAPException("AsnException when encoding parameter horizontalAccuracy: ", e); } } if (this.verticalCoordinateRequest) { try { asnOs.writeNull(Tag.CLASS_CONTEXT_SPECIFIC, _TAG_VERTICAL_COORDINATE_REQUEST); } catch (IOException e) { throw new MAPException( "IOException when encoding parameter verticalCoordinateRequest: ", e); } catch (AsnException e) { throw new MAPException( "IOException when encoding parameter verticalCoordinateRequest: ", e); } } if (this.verticalAccuracy != null) { try { asnOs.writeOctetString( Tag.CLASS_CONTEXT_SPECIFIC, _TAG_VERTICAL_ACCURACY, new byte[] {this.verticalAccuracy.byteValue()}); } catch (IOException e) { throw new MAPException("IOException when encoding parameter verticalAccuracy: ", e); } catch (AsnException e) { throw new MAPException("AsnException when encoding parameter verticalAccuracy: ", e); } } if (this.responseTime != null) { ((ResponseTimeImpl) this.responseTime) .encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _TAG_RESPONSE_TIME); } if (this.extensionContainer != null) { ((MAPExtensionContainerImpl) this.extensionContainer) .encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _TAG_EXTENSION_CONTAINER); } }
public void encode(AsnOutputStream aos) throws EncodeException { if (this.component == null || this.component.length == 0) throw new EncodeException( "Error encoding TC-Uni: Component portion is mandatory but not defined"); try { aos.writeTag(Tag.CLASS_APPLICATION, false, _TAG); int pos = aos.StartContentDefiniteLength(); if (this.dp != null) this.dp.encode(aos); aos.writeTag(Tag.CLASS_APPLICATION, false, Component._COMPONENT_TAG); int pos2 = aos.StartContentDefiniteLength(); for (Component c : this.component) { c.encode(aos); } aos.FinalizeContent(pos2); aos.FinalizeContent(pos); } catch (AsnException e) { throw new EncodeException("AsnException while encoding TC-Uni: " + e.getMessage(), e); } }
public void encodeData(AsnOutputStream asnOs) throws MAPException { if (this.plmnId == null) throw new MAPException("plmnId parameter must not be null"); try { ((PlmnIdImpl) plmnId).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_plmn_Id); if (this.ranTechnology != null) { asnOs.writeInteger( Tag.CLASS_CONTEXT_SPECIFIC, _ID_ran_Technology, this.ranTechnology.getCode()); } if (this.ranPeriodicLocationSupport) { asnOs.writeNull(Tag.CLASS_CONTEXT_SPECIFIC, _ID_ran_PeriodicLocationSupport); } } catch (IOException e) { throw new MAPException( "IOException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } catch (AsnException e) { throw new MAPException( "AsnException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } }
/* * (non-Javadoc) * * @see org.mobicents.protocols.protocols.ss7.cap.api.map.primitives.MAPAsnPrimitive#encodeData (com.ebridge * .protocols.asn.AsnOutputStream) */ public void encodeData(AsnOutputStream asnOs) throws MAPException { try { if (this.locationInformation) { asnOs.writeNull(Tag.CLASS_CONTEXT_SPECIFIC, _ID_locationInformation); } } catch (IOException e) { throw new MAPException("IOException when encoding parameter locationInformation: ", e); } catch (AsnException e) { throw new MAPException("AsnException when encoding parameter locationInformation: ", e); } try { if (this.subscriberState) { asnOs.writeNull(Tag.CLASS_CONTEXT_SPECIFIC, _ID_subscriberState); } } catch (IOException e) { throw new MAPException("IOException when encoding parameter subscriberState: ", e); } catch (AsnException e) { throw new MAPException("AsnException when encoding parameter subscriberState: ", e); } if (this.extensionContainer != null) ((MAPExtensionContainerImpl) this.extensionContainer) .encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_extensionContainer); try { if (this.currentLocation) { asnOs.writeNull(Tag.CLASS_CONTEXT_SPECIFIC, _ID_currentLocation); } } catch (IOException e) { throw new MAPException("IOException when encoding parameter currentLocation: ", e); } catch (AsnException e) { throw new MAPException("AsnException when encoding parameter currentLocation: ", e); } try { if (this.requestedDomain != null) { asnOs.writeInteger( Tag.CLASS_CONTEXT_SPECIFIC, _ID_requestedDomain, this.requestedDomain.getType()); } } catch (IOException e) { throw new MAPException("IOException when encoding parameter requestedDomain: ", e); } catch (AsnException e) { throw new MAPException("AsnException when encoding parameter requestedDomain: ", e); } try { if (this.imei) { asnOs.writeNull(Tag.CLASS_CONTEXT_SPECIFIC, _ID_imei); } } catch (IOException e) { throw new MAPException("IOException when encoding parameter imei: ", e); } catch (AsnException e) { throw new MAPException("AsnException when encoding parameter imei: ", e); } try { if (this.msClassmark) { asnOs.writeNull(Tag.CLASS_CONTEXT_SPECIFIC, _ID_msclassmark); } } catch (IOException e) { throw new MAPException("IOException when encoding parameter msClassmark: ", e); } catch (AsnException e) { throw new MAPException("AsnException when encoding parameter msClassmark: ", e); } try { if (this.mnpRequestedInfo) { asnOs.writeNull(Tag.CLASS_CONTEXT_SPECIFIC, _ID_mnpRequestedInfo); } } catch (IOException e) { throw new MAPException("IOException when encoding parameter mnpRequestedInfo: ", e); } catch (AsnException e) { throw new MAPException("AsnException when encoding parameter mnpRequestedInfo: ", e); } }