Skip to content

Commit

Permalink
Fixed grouped AVPs for SLg PLR/PLA and LRR/LRA implementation .Issues #…
Browse files Browse the repository at this point in the history
…37 and #38. PR #48.
  • Loading branch information
Fernando Mendioroz committed Oct 7, 2016
1 parent e77cb9b commit b92434e
Show file tree
Hide file tree
Showing 8 changed files with 591 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,16 @@ public interface LocationReportAnswer extends AppAnswerEvent{
long getLRAFLags();

boolean isReportingPLMNListAVPPresent();
// Reporting-PLMN-List AVP of type grouped, includes:
// PLMN-ID-List, Prioritized-List-Indicator
boolean isPrioritizedListIndicatorAVPPresent();
int getPrioritizedListIndicator();
boolean isPLMNIDListAVPPresent();
// PLMN-ID-List AVP of type grouped, includes:
// Visited-PLMN-Id, Periodic-Location-Support-Indicator
boolean isVisitedPLMNIdAVPPResent();
byte[] getVisitedPLMNId();
boolean isPeriodicLocationSupportIndicatorAVPPresent();
int getPeriodicLocationSupportIndicator();

boolean isLCSReferenceNumberAVPPresent();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ public interface LocationReportRequest extends AppRequestEvent {
String getIMEI();

boolean isLCSEPSClientNameAVPPresent();
// LCS-EPS-Client-Name AVP of type grouped, includes:
// LCS-Name-String, LCS-Format-Indicator
boolean isLSCNameStringAVPPresent();
String getLSCNameString();
boolean isLCSFormatIndicatorAVPPresent();
int getLCSFormatIndicator();

boolean isLocationEstimateAvpPresent();
Expand All @@ -80,14 +84,22 @@ public interface LocationReportRequest extends AppRequestEvent {
byte[] getECGI();

boolean isGERANPositioningInfoAvpPresent();
// GERAN-Positioning-Info AVP of type grouped, includes:
// GERAN-Positioning-Data, GERAN-GANSS-Positioning-Data
boolean isGERANPositioningDataAVPPresent();
byte[] getGERANPositioningData();
boolean isGERANGANSSPositioningDataAVPPresent();
byte[] getGERANGANSSPositioningData();

boolean isCellGlobalIdentityAvpPresent();
byte[] getCellGlobalIdentity();

boolean isUTRANPositioningInfoAvpPresent();
// UTRAN-Positioning-Info AVP of type grouped, includes:
// UTRAN-Positioning-Data, UTRAN-GANSS-Positioning-Data
boolean isUTRANPositioningDataAVPPresent();
byte[] getUTRANPositioningData();
boolean isUTRANGANSSPositioningDataAVPPresent();
byte[] getUTRANGANSSPositioningData();

boolean isServiceAreaIdentityAvpPresent();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,22 @@ public interface ProvideLocationAnswer extends AppAnswerEvent{
byte[] getECGI();

boolean isGERANPositioningInfoAvpPresent();
// GERAN-Positioning-Info AVP of type grouped, includes:
// GERAN-Positioning-Data, GERAN-GANSS-Positioning-Data
boolean isGERANPositioningDataAVPPresent();
byte[] getGERANPositioningData();
boolean isGERANGANSSPositioningDataAVPPresent();
byte[] getGERANGANSSPositioningData();

boolean isCellGlobalIdentityAvpPresent();
byte[] getCellGlobalIdentity();

boolean isUTRANPositioningInfoAvpPresent();
// UTRAN-Positioning-Info AVP of type grouped, includes:
// UTRAN-Positioning-Data, UTRAN-GANSS-Positioning-Data
boolean isUTRANPositioningDataAVPPresent();
byte[] getUTRANPositioningData();
boolean isUTRANGANSSPositioningDataAVPPresent();
byte[] getUTRANGANSSPositioningData();

boolean isServiceAreaIdentityAvpPresent();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,40 @@ public interface ProvideLocationRequest extends AppRequestEvent {
String getIMEI();

boolean isLCSEPSClientNameAVPPresent();
// LCS-EPS-Client-Name AVP of type grouped, includes:
// LCS-Name-String, LCS-Format-Indicator
boolean isLSCNameStringAVPPresent();
String getLSCNameString();
boolean isLCSFormatIndicatorAVPPresent();
int getLCSFormatIndicator();

boolean isLCSCLientTypeAVPPresent();
int getLCSClientType();

boolean isLCSRequestorNamePresent();
// LCS-Requestor-NAme AVP of type grouped, includes:
// LCS-Requestor-Id-String, LCS-Format-Indicator
boolean isLCSRequestorIdStringAVPPresent();
String getLCSRequestorIdString();
boolean isReqLCSFormatIndicatorAVPPresent();
int getReqLCSFormatIndicator();

boolean isLCSPriorityPresent();
long getLCSPriority();

boolean isLCSQoSAVPPresent();
// LCS-QoS AVP of type grouped, includes:
// LCS-QoS-Class, Horizontal-Accuracy, Vertical-Accuracy
// Vertical-Requested, Response-Time
boolean isLCSQoSClassAVPPresent();
int getLCSQoSClass();
boolean isHorizontalAccuracyAVPPresent();
long getHorizontalAccuracy();
boolean isVerticalAccuracyAVPPresent();
long getVerticalAccuracy();
boolean isVerticalRequestedAVPPresent();
int getVerticalRequested();
boolean isResponseTimeAVPPresent();
int getResponseTime();

boolean isVelocityRequestedAVPPresent();
Expand Down Expand Up @@ -108,7 +125,11 @@ public interface ProvideLocationRequest extends AppRequestEvent {
byte[] getLCSReferenceNumber();

boolean isAreaEventInfoAVPPresent();
// Area-Event-Info AVP of type grouped, includes:
// Area-Type, Area-Identification
boolean isAreaTypeAVPPresent();
long getAreaType();
boolean isAreaIdentificationAVPPresent();
byte[] getAreaIdentification();

boolean isGMLCAddressAVPPresent();
Expand All @@ -117,8 +138,12 @@ public interface ProvideLocationRequest extends AppRequestEvent {
boolean isPLRFlagsAVPPresent();
long getPLRFLags();

boolean isPeriodicLDRInformationAVPPresent();
boolean isPeriodicLDRInfoAVPPresent();
// Periodic-LDR-Info AVP of type grouped, includes:
// Reporting-Amount, Reporting-Interval
boolean isReportingAmountAVPPresent();
long getReportingAmount();
boolean isReportingIntervalAVPPresent();
long getReportingInterval();

}
Original file line number Diff line number Diff line change
Expand Up @@ -103,30 +103,99 @@ public boolean isReportingPLMNListAVPPresent(){
return super.message.getAvps().getAvp(Avp.REPORTING_PLMN_LIST) != null;
}

@Override
public boolean isPrioritizedListIndicatorAVPPresent(){
Avp lcsReportingPLMNListAvp = super.message.getAvps().getAvp(Avp.REPORTING_PLMN_LIST);
if (lcsReportingPLMNListAvp != null) {
try {
return lcsReportingPLMNListAvp.getGrouped().getAvp(Avp.PRIORITIZED_LIST_INDICATOR) != null;
} catch (AvpDataException e) {
logger.debug("Failure trying to obtain Prioritized-List-Indicator AVP", e);
}
}
return false;
}

@Override
public int getPrioritizedListIndicator(){
Avp lcsReportingPLMNListAvp = super.message.getAvps().getAvp(Avp.REPORTING_PLMN_LIST);
if (lcsReportingPLMNListAvp != null) {
try {
Avp lcsPrioritizedListIndicatorAvp = lcsReportingPLMNListAvp.getGrouped().getAvp(Avp.PRIORITIZED_LIST_INDICATOR);
if (lcsPrioritizedListIndicatorAvp != null){
return lcsPrioritizedListIndicatorAvp.getInteger32();
}
} catch (AvpDataException e) {
logger.debug("Failure trying to obtain LCS GERAN-Positioning-Data AVP value", e);
}
}
return -1;
}

@Override
public boolean isPLMNIDListAVPPresent(){
return super.message.getAvps().getAvp(Avp.PLMN_ID_LIST) != null;
Avp lcsReportingPLMNListAvp = super.message.getAvps().getAvp(Avp.REPORTING_PLMN_LIST);
if (lcsReportingPLMNListAvp != null) {
try {
return lcsReportingPLMNListAvp.getGrouped().getAvp(Avp.PLMN_ID_LIST) != null;
} catch (AvpDataException e) {
logger.debug("Failure trying to obtain PLMN-Id-List AVP", e);
}
}
return false;
}

@Override
public boolean isVisitedPLMNIdAVPPResent(){
Avp lcsPLMNIdListAvp = super.message.getAvps().getAvp(Avp.PLMN_ID_LIST);
if (lcsPLMNIdListAvp != null) {
try {
return lcsPLMNIdListAvp.getGrouped().getAvp(Avp.VISITED_PLMN_ID) != null;
} catch (AvpDataException e) {
logger.debug("Failure trying to obtain Visited-PLMN-Id AVP", e);
}
}
return false;
}

@Override
public byte[] getVisitedPLMNId() {
Avp lcsVisitedPLMNIdAvp = super.message.getAvps().getAvp(Avp.VISITED_PLMN_ID);
if (lcsVisitedPLMNIdAvp != null) {
Avp lcsPLMNIdListAvp = super.message.getAvps().getAvp(Avp.PLMN_ID_LIST);
if (lcsPLMNIdListAvp != null) {
try {
return lcsVisitedPLMNIdAvp.getOctetString();
Avp lcsVisitedPLMNIdAvp = lcsPLMNIdListAvp.getGrouped().getAvp(Avp.VISITED_PLMN_ID);
if (lcsVisitedPLMNIdAvp != null){
return lcsVisitedPLMNIdAvp.getOctetString();
}
} catch (AvpDataException e) {
logger.debug("Failure trying to obtain LCS Visited PLMN ID AVP value", e);
}
}
return null;
}

@Override
public boolean isPeriodicLocationSupportIndicatorAVPPresent(){
Avp lcsPLMNIdListAvp = super.message.getAvps().getAvp(Avp.PLMN_ID_LIST);
if (lcsPLMNIdListAvp != null) {
try {
return lcsPLMNIdListAvp.getGrouped().getAvp(Avp.PERIODIC_LOCATION_SUPPORT_INDICATOR) != null;
} catch (AvpDataException e) {
logger.debug("Failure trying to obtain Periodic-Location-Support-Indicator AVP", e);
}
}
return false;
}

@Override
public int getPeriodicLocationSupportIndicator() {
Avp lcsPeriodicLocationSupportIndicatorAvp = super.message.getAvps().getAvp(Avp.PERIODIC_LOCATION_SUPPORT_INDICATOR);
if (lcsPeriodicLocationSupportIndicatorAvp != null) {
Avp lcsPLMNIdListAvp = super.message.getAvps().getAvp(Avp.PLMN_ID_LIST);
if (lcsPLMNIdListAvp != null) {
try {
return lcsPeriodicLocationSupportIndicatorAvp.getInteger32();
Avp lcsPeriodicLocationSupportIndicatorAvp = lcsPLMNIdListAvp.getGrouped().getAvp(Avp.PERIODIC_LOCATION_SUPPORT_INDICATOR);
if (lcsPeriodicLocationSupportIndicatorAvp != null){
return lcsPeriodicLocationSupportIndicatorAvp.getInteger32();
}
} catch (AvpDataException e) {
logger.debug("Failure trying to obtain LCS Periodic Location Support Indicator AVP value", e);
}
Expand Down
Loading

0 comments on commit b92434e

Please sign in to comment.