@Override public void encodeData(AsnOutputStream asnOs) throws CAPException { try { if (this.locationInformation != null) { ((LocationInformationImpl) this.locationInformation).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_locationInformation); } } catch (MAPException e) { throw new CAPException("MAPException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } }
@Override public void encodeData(AsnOutputStream aos) throws CAPException { try { if (this.locationInformation != null) { ((LocationInformationImpl) this.locationInformation).encodeAll(aos, Tag.CLASS_CONTEXT_SPECIFIC, _ID_locationInformation); } } catch (MAPException e) { throw new CAPException("MAPException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } }
@Override public void encodeData(AsnOutputStream asnOs) throws CAPException { try { if (this.supplementToLongQoSFormat == null) throw new CAPException("Error while encoding " + _PrimitiveName + ": supplementToLongQoSFormat must not be null"); ((Ext2QoSSubscribedImpl) this.supplementToLongQoSFormat).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_supplementToLongQoSFormat); } catch (MAPException e) { throw new CAPException("MAPException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } }
@Override public void encodeData(AsnOutputStream asnOs) throws CAPException { if (this.shortQoSFormat == null && this.longQoSFormat == null || this.shortQoSFormat != null && this.longQoSFormat != null) { throw new CAPException("Error while decoding " + _PrimitiveName + ": One and only one choice must be selected"); } try { if (this.shortQoSFormat != null) { ((QoSSubscribedImpl) this.shortQoSFormat).encodeData(asnOs); } else { ((ExtQoSSubscribedImpl) this.longQoSFormat).encodeData(asnOs); } } catch (MAPException e) { throw new CAPException("MAPException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } }
@Override public ValidityPeriod getValidityPeriod() throws CAPException { if (this.data == null) throw new CAPException("Error when getting ValidityPeriod: data must not be null"); // we support RelativeFormat and AbsoluteFormat if (this.data.length != 1 && this.data.length != 7) throw new CAPException("Error when getting ValidityPeriod: data must has length 1 or 7, found " + data.length); ValidityPeriodImpl vp; if (this.data.length == 1) { vp = new ValidityPeriodImpl(this.data[0]); } else { AbsoluteTimeStamp absoluteFormatValue; try { InputStream stm = new ByteArrayInputStream(data); absoluteFormatValue = AbsoluteTimeStampImpl.createMessage(stm); } catch (MAPException e) { throw new CAPException("MAPException when AbsoluteTimeStampImpl creating: " + e.getMessage(), e); } vp = new ValidityPeriodImpl(absoluteFormatValue); } return vp; }
@Override public void encodeData(AsnOutputStream asnOs) throws CAPException { try { if (this.callingPartysNumber != null) ((SMSAddressStringImpl) this.callingPartysNumber).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_callingPartysNumber); if (this.destinationSubscriberNumber != null) ((CalledPartyBCDNumberImpl) this.destinationSubscriberNumber).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_destinationSubscriberNumber); if (this.smscAddress != null) ((ISDNAddressStringImpl) this.smscAddress) .encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_smscAddress); if (this.extensions != null) ((CAPExtensionsImpl) this.extensions).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_extensions); } catch (MAPException e) { throw new CAPException("MAPException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } }
@Override public void encodeData(AsnOutputStream aos) throws CAPException { if (this.metDPCriteriaList != null && (this.metDPCriteriaList.size() < 1 || this.metDPCriteriaList.size() > 10)) throw new CAPException("Error while encoding " + _PrimitiveName + ": metDPCriteriaList length must be from 1 to 10"); try { if (this.locationInformation != null) { ((LocationInformationImpl) this.locationInformation).encodeAll(aos, Tag.CLASS_CONTEXT_SPECIFIC, _ID_locationInformation); } if (this.metDPCriteriaList != null) { aos.writeTag(Tag.CLASS_CONTEXT_SPECIFIC, false, _ID_metDPCriteriaList); int pos = aos.StartContentDefiniteLength(); for (MetDPCriterion be : this.metDPCriteriaList) { MetDPCriterionImpl bee = (MetDPCriterionImpl) be; bee.encodeAll(aos); } aos.FinalizeContent(pos); } } catch (AsnException e) { throw new CAPException("AsnException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } catch (MAPException e) { throw new CAPException("MAPException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } }
@Override public void encodeData(AsnOutputStream aos) throws CAPException { if (this.metDPCriteriaList != null && (this.metDPCriteriaList.size() < 1 || this.metDPCriteriaList.size() > 10)) throw new CAPException("Error while encoding " + _PrimitiveName + ": metDPCriteriaList length must be from 1 to 10"); try { if (this.locationInformation != null) { ((LocationInformationImpl) this.locationInformation).encodeAll(aos, Tag.CLASS_CONTEXT_SPECIFIC, _ID_locationInformation); } if (this.metDPCriteriaList != null) { aos.writeTag(Tag.CLASS_CONTEXT_SPECIFIC, false, _ID_metDPCriteriaList); int pos = aos.StartContentDefiniteLength(); for (MetDPCriterion be : this.metDPCriteriaList) { MetDPCriterionImpl bee = (MetDPCriterionImpl) be; bee.encodeAll(aos); } aos.FinalizeContent(pos); } } catch (AsnException e) { throw new CAPException("AsnException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } catch (MAPException e) { throw new CAPException("MAPException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } }
public void encodeData(AsnOutputStream aos) throws CAPException { try { if (this.supportedCamelPhases != null) ((SupportedCamelPhasesImpl) this.supportedCamelPhases).encodeAll(aos, Tag.CLASS_CONTEXT_SPECIFIC, _ID_supportedCamelPhases); if (this.extensions != null) ((CAPExtensionsImpl) this.extensions).encodeAll(aos, Tag.CLASS_CONTEXT_SPECIFIC, _ID_extensions); if (this.offeredCamel4Functionalities != null) ((OfferedCamel4FunctionalitiesImpl) this.offeredCamel4Functionalities).encodeAll(aos, Tag.CLASS_CONTEXT_SPECIFIC, _ID_offeredCamel4Functionalities); if (this.releaseCallArgExtensionAllowed) aos.writeNull(Tag.CLASS_CONTEXT_SPECIFIC, _ID_releaseCallArgExtensionAllowed); } catch (IOException e) { throw new CAPException("IOException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } catch (AsnException e) { throw new CAPException("AsnException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } catch (MAPException e) { throw new CAPException("MAPException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } }
@Override public void encodeData(AsnOutputStream aos) throws CAPException { try { if (this.extBasicServiceCode != null) { aos.writeTag(Tag.CLASS_CONTEXT_SPECIFIC, false, _ID_extBasicServiceCode); int pos = aos.StartContentDefiniteLength(); ((ExtBasicServiceCodeImpl) this.extBasicServiceCode).encodeAll(aos); aos.FinalizeContent(pos); } } catch (AsnException e) { throw new CAPException("AsnException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } catch (MAPException e) { throw new CAPException("MAPException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } }
@Override public void encodeData(AsnOutputStream aos) throws CAPException { try { if (this.extBasicServiceCode != null) { aos.writeTag(Tag.CLASS_CONTEXT_SPECIFIC, false, _ID_extBasicServiceCode); int pos = aos.StartContentDefiniteLength(); ((ExtBasicServiceCodeImpl) this.extBasicServiceCode).encodeAll(aos); aos.FinalizeContent(pos); } } catch (AsnException e) { throw new CAPException("AsnException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } catch (MAPException e) { throw new CAPException("MAPException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } }
@Override public void onAlertServiceCentreRequest(AlertServiceCentreRequest ind) { if (!isStarted) return; this.countAscReq++; MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider(); MAPDialogSms curDialog = ind.getMAPDialog(); long invokeId = ind.getInvokeId(); this.testerHost.sendNotif(SOURCE_NAME, "Rcvd: ascReq", ind.toString(), Level.DEBUG); try { if (curDialog.getApplicationContext().getApplicationContextVersion() == MAPApplicationContextVersion.version1) { curDialog.release(); } else { curDialog.addAlertServiceCentreResponse(invokeId); this.countAscResp++; this.testerHost.sendNotif(SOURCE_NAME, "Sent: ascResp", "", Level.DEBUG); this.needSendClose = true; } } catch (MAPException e) { this.testerHost.sendNotif(SOURCE_NAME, "Exception when invoking addAlertServiceCentreResponse() : " + e.getMessage(), e, Level.ERROR); } }
@Override public void encodeData(AsnOutputStream asnOs) throws CAPException { try { if (this.accessPointName != null) ((AccessPointNameImpl) this.accessPointName).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_accessPointName); if (this.chargingID != null) ((GPRSChargingIDImpl) this.chargingID).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_chargingID); if (this.locationInformationGPRS != null) ((LocationInformationGPRSImpl) this.locationInformationGPRS).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_locationInformationGPRS); if (this.endUserAddress != null) ((EndUserAddressImpl) this.endUserAddress).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_endUserAddress); if (this.qualityOfService != null) ((QualityOfServiceImpl) this.qualityOfService).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_qualityOfService); if (this.timeAndTimezone != null) ((TimeAndTimezoneImpl) this.timeAndTimezone).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_timeAndTimezone); if (this.gsnAddress != null) ((GSNAddressImpl) this.gsnAddress).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_gsnAddress); } catch (MAPException e) { throw new CAPException("MAPException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } }
@Override public void encodeData(AsnOutputStream asnOs) throws CAPException { try { if (this.accessPointName != null) ((AccessPointNameImpl) this.accessPointName).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_accessPointName); if (this.chargingID != null) ((GPRSChargingIDImpl) this.chargingID).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_chargingID); if (this.locationInformationGPRS != null) ((LocationInformationGPRSImpl) this.locationInformationGPRS).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_locationInformationGPRS); if (this.endUserAddress != null) ((EndUserAddressImpl) this.endUserAddress).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_endUserAddress); if (this.qualityOfService != null) ((QualityOfServiceImpl) this.qualityOfService).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_qualityOfService); if (this.timeAndTimezone != null) ((TimeAndTimezoneImpl) this.timeAndTimezone).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_timeAndTimezone); if (this.gsnAddress != null) ((GSNAddressImpl) this.gsnAddress).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_gsnAddress); } catch (MAPException e) { throw new CAPException("MAPException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } }
@Override public void onMoForwardShortMessageRequest(MoForwardShortMessageRequest ind) { if (!isStarted) return; MAPDialogSms curDialog = ind.getMAPDialog(); long invokeId = ind.getInvokeId(); SM_RP_DA da = ind.getSM_RP_DA(); SM_RP_OA oa = ind.getSM_RP_OA(); SmsSignalInfo si = ind.getSM_RP_UI(); this.onMoRequest(da, oa, si, curDialog); try { curDialog.addMoForwardShortMessageResponse(invokeId, null, null); this.needSendClose = true; this.countMoFsmResp++; this.testerHost.sendNotif(SOURCE_NAME, "Sent: moResp", "", Level.DEBUG); } catch (MAPException e) { this.testerHost.sendNotif(SOURCE_NAME, "Exception when invoking addMoForwardShortMessageResponse : " + e.getMessage(), e, Level.ERROR); } }
@Override public void encodeData(AsnOutputStream asnOs) throws CAPException { try { if (this.accessPointName != null) ((AccessPointNameImpl) this.accessPointName).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_accessPointName); if (this.endUserAddress != null) ((EndUserAddressImpl) this.endUserAddress).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_endUserAddress); if (this.qualityOfService != null) ((QualityOfServiceImpl) this.qualityOfService).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_qualityOfService); if (this.locationInformationGPRS != null) ((LocationInformationGPRSImpl) this.locationInformationGPRS).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_locationInformationGPRS); if (this.timeAndTimezone != null) ((TimeAndTimezoneImpl) this.timeAndTimezone).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_timeAndTimezone); if (this.pdpInitiationType != null) asnOs.writeInteger(Tag.CLASS_CONTEXT_SPECIFIC, _ID_pdpInitiationType, this.pdpInitiationType.getCode()); if (this.secondaryPDPContext) asnOs.writeNull(Tag.CLASS_CONTEXT_SPECIFIC, _ID_secondaryPDPContext); } catch (MAPException e) { throw new CAPException("MAPException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } catch (IOException e) { throw new CAPException("IOException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } catch (AsnException e) { throw new CAPException("AsnException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } }
@Override public void encodeData(AsnOutputStream asnOs) throws CAPException { try { if (cellGlobalId != null) { ((CellGlobalIdOrServiceAreaIdFixedLengthImpl) cellGlobalId).encodeData(asnOs); return; } else if (serviceAreaId != null) { ((CellGlobalIdOrServiceAreaIdFixedLengthImpl) serviceAreaId).encodeData(asnOs); return; } else if (locationAreaId != null) { ((LAIFixedLengthImpl) locationAreaId).encodeData(asnOs); return; } else if (interSystemHandOver) { asnOs.writeNullData(); return; } else if (interPLMNHandOver) { asnOs.writeNullData(); return; } else if (interMSCHandOver) { asnOs.writeNullData(); return; } else if (changeOfLocationAlt != null) { ((ChangeOfLocationAltImpl) changeOfLocationAlt).encodeData(asnOs); return; } } catch (MAPException e) { throw new CAPException("MAPException when encoding " + _PrimitiveName + ": " + e.getMessage(), e); } throw new CAPException("Error while encoding " + _PrimitiveName + ": no choice is specified"); }
@Override public void onForwardShortMessageRequest(ForwardShortMessageRequest ind) { if (!isStarted) return; MAPDialogSms curDialog = ind.getMAPDialog(); long invokeId = ind.getInvokeId(); SM_RP_DA da = ind.getSM_RP_DA(); SM_RP_OA oa = ind.getSM_RP_OA(); SmsSignalInfo si = ind.getSM_RP_UI(); if (da.getServiceCentreAddressDA() != null) { // mo message this.onMoRequest(da, oa, si, curDialog); try { curDialog.addForwardShortMessageResponse(invokeId); this.needSendClose = true; this.countMoFsmResp++; this.testerHost.sendNotif(SOURCE_NAME, "Sent: moResp", "", Level.DEBUG); } catch (MAPException e) { this.testerHost.sendNotif(SOURCE_NAME, "Exception when invoking addMoForwardShortMessageResponse : " + e.getMessage(), e, Level.ERROR); } } }
} catch (MAPException e) { this.testerHost.sendNotif(SOURCE_NAME, "Exception when invoking addUnstructuredSSNotifyResponse() : " + e.getMessage(), e, Level.ERROR);
this.testerHost.sendNotif(SOURCE_NAME, "Exception when invoking addCheckImeiResponse() : " + e.getMessage(), e, Level.ERROR);