Skip to content

Commit

Permalink
Eliminated sun.jdbcodbcJdbcOdbcObject.hexStringToByteArray import and…
Browse files Browse the repository at this point in the history
… all its usage in load test suite, which btw was provoking a compilation problem.
  • Loading branch information
Fernando Mendioroz committed Dec 7, 2017
1 parent 4216e72 commit 64967e8
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 103 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
RestComm GMLC
============

[![Join the chat at https://gitter.im/RestComm/gmlc](https://badges.gitter.im/RestComm/gmlc.svg)](https://gitter.im/RestComm/gmlc?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
The Gateway Mobile Location Centre enables offering Location Based Services (LBS) involving mobile subscribers roaming accross either legacy GSM or UMTS/HSPA+ networks, or Next Generation Networks like LTE/LTE-Advanced.

In one PLMN (Public Land Mobile Network), there may be more than one GMLC. The GMLC is the first node an external LCS client accesses in a GSM, UMTS or LTE network. The GMLC may request routing information from the HLR (Home Location register) or HSS (Home Subscriber Server). After performing registration authorization, it sends positioning requests to either the VMSC (Visited Mobile Switching Centre), SGSN (Serving GPRS Support Node) MSC (Mobile Switching Centre) Server or MME (Mobility Management Entity) and receives final location estimates from the corresponding network node. Furthermore, it may receive mobile subscriber location reports on event based deferred location requests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

package org.mobicents.protocols.ss7.gmlc.load;

import java.math.BigInteger;
import java.nio.charset.Charset;
import java.util.ArrayList;
// import java.io.Serializable;
Expand Down Expand Up @@ -96,7 +97,6 @@

import static org.mobicents.protocols.ss7.map.api.service.lsm.LCSEvent.emergencyCallOrigination;
import static org.mobicents.protocols.ss7.map.api.service.lsm.LocationEstimateType.currentLocation;
import static sun.jdbc.odbc.JdbcOdbcObject.hexStringToByteArray;

/**
* @author <a href="mailto:fernando.mendioroz@gmail.com"> Fernando Mendioroz </a>
Expand Down Expand Up @@ -511,11 +511,13 @@ User error C C(=)
org.mobicents.protocols.ss7.map.api.primitives.NumberingPlan.ISDN, "222333");
/*
long[] oid = {0, 0, 17, 773, 1, 1, 1};
byte[] privateExtData = hexStringToByteArray("1144");
String pExtData = "1144";
byte[] privateExtData = pExtData.getBytes();
MAPPrivateExtension mapPrivateExtension = new MAPPrivateExtensionImpl(oid, privateExtData);
ArrayList<MAPPrivateExtension> mapPrivateExtensions = new ArrayList<MAPPrivateExtension>();
mapPrivateExtensions.add(mapPrivateExtension);
byte[] pcsExtensions = hexStringToByteArray("1033");
String pcsExt = "1033";
byte[] pcsExtensions = pcsExt.getBytes();
MAPExtensionContainer mapExtensionContainer = new MAPExtensionContainerImpl(mapPrivateExtensions, pcsExtensions);
*/
MAPExtensionContainer mapExtensionContainer = null;
Expand Down Expand Up @@ -636,12 +638,13 @@ User error C C(=)
LCSFormatIndicator lcsFormatIndicator = LCSFormatIndicator.url;
LCSClientName lcsClientName = new LCSClientNameImpl(cbsDataCodingScheme, ussdString, lcsFormatIndicator);
AddressString lcsClientDialedByMS = new AddressStringImpl(AddressNature.international_number, NumberingPlan.ISDN, clientName);
byte[] apn = hexStringToByteArray("8877665544");;
byte[] apn = new BigInteger("8877665544",16).toByteArray();
APN lcsAPN = new APNImpl(apn);
LCSClientID lcsClientID = new LCSClientIDImpl(LCSClientType.valueAddedServices, lcsClientExternalID, lcsClientInternalID, lcsClientName, lcsClientDialedByMS, lcsAPN, null);
Boolean privacyOverride = false;
IMSI imsi = new IMSIImpl("124356871012345");
byte[] lmsid = hexStringToByteArray("09876543");;
String lmsiId = "09876543";
byte[] lmsid = lmsiId.getBytes();
LMSI lmsi = new LMSIImpl(lmsid);
IMEI imei = new IMEIImpl("01171400466105");
LCSPriority lcsPriority = LCSPriority.normalPriority;
Expand All @@ -666,11 +669,13 @@ User error C C(=)
ResponseTime responseTime = new ResponseTimeImpl(responseTimeCategory);
/*
long[] oid = {0, 0, 17, 773, 1, 1, 1};
byte[] privateExtData = hexStringToByteArray("1144");
String pExtData = "1144";
byte[] privateExtData = pExtData.getBytes();
MAPPrivateExtension mapPrivateExtension = new MAPPrivateExtensionImpl(oid, privateExtData);
ArrayList<MAPPrivateExtension> mapPrivateExtensions = new ArrayList<MAPPrivateExtension>();
mapPrivateExtensions.add(mapPrivateExtension);
byte[] pcsExtensions = hexStringToByteArray("1033");
String pcsExt = "1033";
byte[] pcsExtensions = pcsExt.getBytes();
MAPExtensionContainer mapExtensionContainer = new MAPExtensionContainerImpl(mapPrivateExtensions, pcsExtensions);
*/
MAPExtensionContainer extensionContainer = null;
Expand All @@ -680,23 +685,25 @@ User error C C(=)
LCSPrivacyCheck lcsPrivacyCheck = new LCSPrivacyCheckImpl(callSessionUnrelated, callSessionRelated);
ArrayList<Area> areaList = new ArrayList<Area>();
AreaType areaType = AreaType.locationAreaId;
byte[] areaId = hexStringToByteArray("102132");
String aId = "102132";
byte[] areaId = aId.getBytes();
AreaIdentification areaIdentification = new AreaIdentificationImpl(areaId);
Area area1 = new AreaImpl(areaType, areaIdentification);
areaList.add(area1);
AreaDefinition areaDefinition = new AreaDefinitionImpl(areaList);
OccurrenceInfo occurrenceInfo = OccurrenceInfo.oneTimeEvent;
Integer intervalTime = 10;
AreaEventInfo areaEventInfo = new AreaEventInfoImpl(areaDefinition, occurrenceInfo, intervalTime);
byte[] homeGmlcAddress = hexStringToByteArray("999988887777");
byte[] homeGmlcAddress = new BigInteger("999988887777",16).toByteArray();
GSNAddress hGmlcAddress = new GSNAddressImpl(homeGmlcAddress);
boolean b1 = false;
int reportingAmount = 3;
int reportingInterval = 60;
PeriodicLDRInfo periodicLDRInfo = new PeriodicLDRInfoImpl(reportingAmount, reportingInterval);
boolean plmnListPrioritized = false;
ArrayList<ReportingPLMN> plmnList = new ArrayList<ReportingPLMN>();
byte[] plmnID = hexStringToByteArray("885577");
String plmnIdstr = "885577";
byte[] plmnID = plmnIdstr.getBytes();
PlmnId plmnId = new PlmnIdImpl(plmnID);
RANTechnology ranTechnology = RANTechnology.umts;
boolean ranPeriodicLocationSupport = true;
Expand Down Expand Up @@ -835,12 +842,13 @@ User error C C(=)
LCSFormatIndicator lcsFormatIndicator = LCSFormatIndicator.url;
LCSClientName lcsClientName = new LCSClientNameImpl(cbsDataCodingScheme, ussdString, lcsFormatIndicator);
AddressString lcsClientDialedByMS = new AddressStringImpl(AddressNature.international_number, NumberingPlan.ISDN, clientName);
byte[] apn = hexStringToByteArray("6763a20b0890");;
byte[] apn = new BigInteger("6763a20b0890",16).toByteArray();
APN lcsAPN = new APNImpl(apn);
LCSClientID lcsClientID = new LCSClientIDImpl(LCSClientType.valueAddedServices, lcsClientExternalID, lcsClientInternalID, lcsClientName, lcsClientDialedByMS, lcsAPN, null);
ISDNAddressString networkNodeNumber = new ISDNAddressStringImpl(AddressNature.international_number,
org.mobicents.protocols.ss7.map.api.primitives.NumberingPlan.ISDN, "5983392892");
byte[] lmsid = hexStringToByteArray("0a010203");
String lmsiStr = "0a010203";
byte[] lmsid = lmsiStr.getBytes();
LMSI lmsi = new LMSIImpl(lmsid);
boolean gprsNodeIndicator = true;
AdditionalNumber additionalNumber = new AdditionalNumberImpl(null, sgsnNumber);
Expand All @@ -854,9 +862,9 @@ User error C C(=)
lcsCapabilitySetRelease7 = true;
SupportedLCSCapabilitySets additionalLCSCapabilitySets = new SupportedLCSCapabilitySetsImpl(lcsCapabilitySetRelease98_99, lcsCapabilitySetRelease4,
lcsCapabilitySetRelease5, lcsCapabilitySetRelease6, lcsCapabilitySetRelease7);
byte[] mme = hexStringToByteArray("8720c00a30a1743401000a");
byte[] mme = new BigInteger("8720c00a30a1743401000a", 16).toByteArray();
DiameterIdentity mmeName = new DiameterIdentityImpl(mme);
byte[] aaa = hexStringToByteArray("8720c00a30a1743401101112");
byte[] aaa = new BigInteger("8720c00a30a1743401101112", 16).toByteArray();
DiameterIdentity aaaServerName = new DiameterIdentityImpl(aaa);
LCSLocationInfo lcsLocationInfo = new LCSLocationInfoImpl(networkNodeNumber, lmsi, mapExtensionContainer, gprsNodeIndicator, additionalNumber,
supportedLCSCapabilitySets, additionalLCSCapabilitySets, mmeName, aaaServerName);
Expand All @@ -880,7 +888,7 @@ User error C C(=)
ExtGeographicalInformation extGeographicalInformation = new ExtGeographicalInformationImpl(typeOfShape, latitude, longitude, uncertainty, uncertaintySemiMajorAxis,
uncertaintySemiMinorAxis, angleOfMajorAxis, confidence, altitude, uncertaintyAltitude, innerRadius, uncertaintyRadius, offsetAngle, includedAngle);
SLRArgExtensionContainer slrArgExtensionContainer = null;
byte[] addLocationEstimate = hexStringToByteArray("0000000002");;
byte[] addLocationEstimate = new BigInteger("8090009002", 16).toByteArray();
AddGeographicalInformation addGeographicalInformation = new AddGeographicalInformationImpl(addLocationEstimate);
boolean msAvailable = false;
boolean enteringIntoArea = true;
Expand All @@ -889,32 +897,32 @@ User error C C(=)
DeferredLocationEventType deferredLocationEventType = new DeferredLocationEventTypeImpl(msAvailable, enteringIntoArea, leavingFromArea, beingInsideArea);
TerminationCause terminationCause = TerminationCause.congestion;
DeferredmtlrData deferredmtlrData = new DeferredmtlrDataImpl(deferredLocationEventType, terminationCause, lcsLocationInfo);
byte[] data = hexStringToByteArray("123456789012");
byte[] data = new BigInteger("123456789012",16).toByteArray();
PositioningDataInformation positioningDataInformation = new PositioningDataInformationImpl(data);
byte[] utranData = hexStringToByteArray("43210987654321");
byte[] utranData = new BigInteger("00000000004c21",16).toByteArray();
UtranPositioningDataInfo utranPositioningDataInfo = new UtranPositioningDataInfoImpl(utranData);
Integer lcsServiceTypeID = 1;
boolean saiPresent = true;
Boolean pseudonymIndicator = false;
AccuracyFulfilmentIndicator accuracyFulfilmentIndicator = AccuracyFulfilmentIndicator.requestedAccuracyNotFulfilled;
byte[] velEstimate = hexStringToByteArray("0000000001");
byte[] velEstimate = new BigInteger("4123567890",16).toByteArray();
VelocityEstimate velocityEstimate = new VelocityEstimateImpl(velEstimate);
int reportingAmount = 3;
int reportingInterval = 600;
PeriodicLDRInfo periodicLDRInfo = new PeriodicLDRInfoImpl(reportingAmount, reportingInterval);
boolean b2 = false;
byte[] cidOrSaiFixedLength = hexStringToByteArray("349a0120b04321");
byte[] cidOrSaiFixedLength = new BigInteger("349a0120b04321",16).toByteArray();
CellGlobalIdOrServiceAreaIdFixedLength cellGlobalIdOrServiceAreaIdFixedLength = new CellGlobalIdOrServiceAreaIdFixedLengthImpl(cidOrSaiFixedLength);
CellGlobalIdOrServiceAreaIdOrLAI cellIdOrSai = new CellGlobalIdOrServiceAreaIdOrLAIImpl(cellGlobalIdOrServiceAreaIdFixedLength);
byte[] gGanss = hexStringToByteArray("666601019999");
byte[] gGanss = new BigInteger("666601019999",16).toByteArray();
GeranGANSSpositioningData geranGanssPositioningData = new GeranGANSSpositioningDataImpl(gGanss);
byte[] uGanss = hexStringToByteArray("777701019898");
byte[] uGanss = new BigInteger("777701019898",16).toByteArray();
UtranGANSSpositioningData utranGanssPositioningData = new UtranGANSSpositioningDataImpl(uGanss);
boolean isMsc = true;
ServingNodeAddress servingNodeAddress = new ServingNodeAddressImpl(networkNodeNumber, isMsc);
Integer lcsReferenceNumber = 379;
Integer integer3 = 0;
byte[] homeGmlcAddress = hexStringToByteArray("3734383439323337");
byte[] homeGmlcAddress = new BigInteger("3734383439323337",16).toByteArray();
GSNAddress hGmlcAddress = new GSNAddressImpl(homeGmlcAddress);

mapDialogLsm.addSubscriberLocationReportRequest(lcsEvent, lcsClientID, lcsLocationInfo, msisdn, imsi, imei, naEsrd, naEsrk, extGeographicalInformation,
Expand Down

0 comments on commit 64967e8

Please sign in to comment.