This sample is provided as part of the OSS ASN.1 Tools trial and commercial shipments. The source code and related files are listed below for reference.
The sample demonstrates how to use the OSS ASN.1 Tools to process messages for the 3GPP 5G NGAP standard (TS 38.413 version 19.0.0).
It runs on Linux on x86-64 as an example and illustrates how to decode and create PER-encoded 5G NGAP messages using the OSS ASN.1 Tools API.
The sample reads NGAP messages from .per files, decodes and prints them, and creates and encodes a response message.
A Unix shell script (run.sh) is included for running the test program using the OSS ASN.1/Java runtime.
To explore more samples (LTE RRC, 5G RRC, S1AP, X2AP, NGAP), visit the main Sample Code page.
This sample shows how to:
The files listed below are included in the OSS ASN.1 Tools trial and commercial shipments and are used by this sample program:
| File | Description |
|---|---|
| README.TXT | Instructions and sample overview. |
| *.asn | ASN.1 files that describe the 3GPP 5G NGAP protocol (TS 38.413) used with this program example. |
| NGAP-PDU_HandoverRequest_bin.per | Valid PER-encoded NGAP message. It should pass testing. |
| Tngap.java | Simple Java program that shows how to work with 5G NGAP protocol data. It reads input messages from files, decodes and prints them, and creates and encodes a response message. |
| ngap.cmd | ASN.1 compiler command file used to ASN.1 compile the NGAP protocol specifications. |
| run.sh | Unix shell script to run the test. |
| sample.out | Expected output from this test. |
| gui/ | ASN.1 Studio project for viewing/compiling schema and generating sample data. |
(Installation instructions for the OSS ASN.1 Tools are included in all trial and commercial shipments.)
To build and run this sample, install a trial or licensed version of the OSS ASN.1 Tools for Java.
Before running the test, ensure the following are set appropriately:
./run.sh
./run.sh cleanup
Note: The Java source code in this sample is platform-independent. Linux commands are shown as an example, but equivalent samples and build instructions are available for Windows, macOS, and other platforms. For help with platform-specific instructions, please contact OSS Support.
The following listing shows the main Java source file for this sample test program, Tngap.java. It demonstrates how to read PER-encoded 5G NGAP messages from files, decode and print them, and create and encode a response message using the OSS ASN.1 Tools API.
/*****************************************************************************/
/* Copyright (C) 2025 OSS Nokalva, Inc. All rights reserved. */
/*****************************************************************************/
/* THIS FILE IS PROPRIETARY MATERIAL OF OSS NOKALVA, INC. */
/* AND MAY BE USED ONLY BY DIRECT LICENSEES OF OSS NOKALVA, INC. */
/* THIS FILE MAY NOT BE DISTRIBUTED. */
/* THIS COPYRIGHT STATEMENT MAY NOT BE REMOVED. */
/*****************************************************************************/
/* THIS SAMPLE PROGRAM IS PROVIDED AS IS. THE SAMPLE PROGRAM AND ANY RESULTS */
/* OBTAINED FROM IT ARE PROVIDED WITHOUT ANY WARRANTIES OR REPRESENTATIONS, */
/* EXPRESS, IMPLIED OR STATUTORY. */
/*****************************************************************************/
/*
* $Id: 5G-ngap-java.html 3363 2026-02-16 09:51:05Z macra $
*/
/*
* Demonstrates work with data for 5G NGAP protocol
*/
import java.io.*;
import com.oss.asn1.*;
import com.oss.util.*;
import ngap.*;
import ngap.oss_ngap_ngap_commondatatypes.*;
import ngap.oss_ngap_ngap_constants.*;
import ngap.oss_ngap_ngap_containers.*;
import ngap.oss_ngap_ngap_ies.*;
import ngap.oss_ngap_ngap_pdu_contents.*;
import ngap.oss_ngap_ngap_pdu_descriptions.*;
public class Tngap {
static Coder coder;
static String border = "-------------------------------------------------------";
/* Names of Criticality values */
static String[] Criticalities = { "reject", "ignore", "notify" };
/* Names of HandoverType values */
static String HandoverType[] = {
"intra5gs", "fivegs-to-eps", "eps-to-5gs", "unknown"
};
/*
* Deserializes and prints input messages, creates and prints successful
* outcome messages
*/
public static void main(String[] args) throws java.io.FileNotFoundException, Exception
{
// Initialize the project
try {
Ngap.initialize();
} catch (Exception e) {
System.out.println("Initialization exception: " + e);
System.exit(1);
}
coder = Ngap.getPERAlignedCoder();
coder.enableAutomaticEncoding();
coder.enableAutomaticDecoding();
coder.enableEncoderDebugging();
coder.enableDecoderDebugging();
// An optional parameter includes the path to all the files that are used by
// the program.
String path = (args.length > 0) ? args[0] : null;
try {
testNGAP(path, "NGAP-PDU_HandoverRequest.per");
} catch (Exception e) {
System.out.println(e);
System.exit(1);
}
System.out.println("\nTesting successful");
}
/*
* testNGAP() is used to test NGAP message, the input serialized pdu is
* deserialized and printed, then an outcome message is created, printed
* and encoded.
*/
static void testNGAP(String path, String filename) throws IOException, Exception
{
OSS_NGAP_PDU request;
File file = new File(path, filename);
if (!file.exists()) {
throw new IOException("Failed to open the " + file.toString() + " file. " +
"Restart the sample program using as input parameter the name of the directory " +
"where the '" + file.getName() + "' file is located.\n");
}
FileInputStream source = new FileInputStream(file);
System.out.println("============================================================================");
/* Read serialized message from file */
System.out.println("Read encoding from file: " + filename + "\n");
System.out.println("Deserialize request");
System.out.println(border);
/* Deserialize input message */
request = (OSS_NGAP_PDU)coder.decode(source, new OSS_NGAP_PDU());
source.close();
System.out.println("\nDeserialized request");
System.out.println(border);
System.out.println(request);
/* Parse and print input message */
printHandoverRequiredMsg(request);
/* Create successful outcome message */
OSS_NGAP_PDU response = createSuccessResponse(request);
/* Print outcome message */
System.out.println(response);
System.out.println("Serialize response");
System.out.println(border);
/* Serialize outcome message */
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
coder.encode(response, out);
} catch (Exception e) {
System.out.println("Encoding failed: " + e);
System.exit(1);
}
/* Print serialized outcome message */
System.out.println("\nSerialized response "
+ "(" + out.size() + " bytes):");
System.out.println(HexTool.getHex(out.toByteArray()));
}
/*
* Prints NGAP pdu which contains HandoverRequired message. The
* function is not intended to handle other types of messages.
*/
static void printHandoverRequiredMsg(OSS_NGAP_PDU pdu) throws Exception
{
OSS_NGAP_HandoverRequired hr_value;
System.out.println("\nGet message information");
System.out.println(border);
/* Get identifier of message stored in PDU */
if (!pdu.hasInitiatingMessage())
throw new Exception("Unexpected type of message");
OpenType msg_value = ((OSS_NGAP_InitiatingMessage)pdu.getChosenValue()).getValue();
if (msg_value.getDecodedValue() != null) {
if (msg_value.getDecodedValue() instanceof OSS_NGAP_HandoverRequired)
hr_value = (OSS_NGAP_HandoverRequired)msg_value.getDecodedValue();
else
throw new Exception("Incorrect message");
} else
throw new Exception("Incorrect message");
System.out.println("Message type is HandoverRequired\n");
if (hr_value.getProtocolIEs() == null)
throw new Exception("Incorrect message");
printProtocolIEs(hr_value.getProtocolIEs(), 0);
}
/*
* Creates NGAP successful outcome message for given
* HandoverRequired request.
*/
static OSS_NGAP_PDU createSuccessResponse(OSS_NGAP_PDU request) throws Exception
{
if (!request.hasInitiatingMessage())
throw new Exception("Unexpected type of message");
OpenType msg_value = ((OSS_NGAP_InitiatingMessage)
request.getChosenValue()).getValue();
OSS_NGAP_HandoverRequired hr_value =
(OSS_NGAP_HandoverRequired)msg_value.getDecodedValue();
if (hr_value == null || msg_value.getEncodedValue() != null)
throw new Exception("Unexpected HandoverRequired request data");
if (hr_value.getProtocolIEs() == null || hr_value.getProtocolIEs().getSize() == 0)
throw new Exception("No IEs in HandoverRequired request");
OSS_NGAP_HandoverRequired.OSS_NGAP_HRequiredIEs reqies = hr_value.getProtocolIEs();
System.out.println("Create response");
System.out.println(border);
/*
* Create successful outcome message from initiating message. Copy
* some IEs from input to output.
*/
OSS_NGAP_HandoverCommand.OSS_NGAP_HCommandIEs respies = new OSS_NGAP_HandoverCommand.OSS_NGAP_HCommandIEs();
OSS_NGAP_ProtocolIE_Field element;
for (int i = 0; i < reqies.getSize(); i++) {
if (reqies.get(i).getId().equalTo(
OSS_NGAP_NGAP_Constants.OSS_NGAP_id_AMF_UE_NGAP_ID)
|| reqies.get(i).getId().equalTo(
OSS_NGAP_NGAP_Constants.OSS_NGAP_id_RAN_UE_NGAP_ID)
|| reqies.get(i).getId().equalTo(
OSS_NGAP_NGAP_Constants.OSS_NGAP_id_HandoverType)
) {
element = (OSS_NGAP_ProtocolIE_Field)reqies.get(i).clone();
respies.add(element);
/* Add TargetToSource-TransparentContainer IE to outcome message */
} else if (reqies.get(i).getId().equalTo(
OSS_NGAP_NGAP_Constants.OSS_NGAP_id_SourceToTarget_TransparentContainer)) {
OpenType opValue = reqies.get(i).getValue();
OSS_NGAP_TargetToSource_TransparentContainer trValue =
new OSS_NGAP_TargetToSource_TransparentContainer(
((OSS_NGAP_SourceToTarget_TransparentContainer)opValue.getDecodedValue()).byteArrayValue());
element = new OSS_NGAP_ProtocolIE_Field(
OSS_NGAP_NGAP_Constants.OSS_NGAP_id_TargetToSource_TransparentContainer,
OSS_NGAP_Criticality.reject,
new OpenType(trValue));
respies.add(element);
}
}
OSS_NGAP_Criticality criticality;
OSS_NGAP_ProcedureCode procedureCode = ((OSS_NGAP_InitiatingMessage)
request.getChosenValue()).getProcedureCode();
criticality = OSS_NGAP_Criticality.reject;
OSS_NGAP_HandoverCommand handoverCommand =
new OSS_NGAP_HandoverCommand(respies);
OSS_NGAP_SuccessfulOutcome successfulOutcome =
new OSS_NGAP_SuccessfulOutcome(
procedureCode, criticality, new OpenType(handoverCommand));
OSS_NGAP_PDU response =
OSS_NGAP_PDU.createOSS_NGAP_PDUWithSuccessfulOutcome(successfulOutcome);
return response;
}
/*
* Prints ProtocolIE_Container data.
*/
static void printProtocolIEs(OSS_NGAP_HandoverRequired.OSS_NGAP_HRequiredIEs ies, int indent)
{
System.out.println("protocolIEs includes the following IEs:\n");
indent++;
/* Print each IE */
for (int i = 0; i < ies.getSize(); i++) {
OSS_NGAP_ProtocolIE_Field field =
(OSS_NGAP_ProtocolIE_Field )ies.get(i).clone();
OpenType value = field.getValue();
long fieldId = field.getId().longValue();
printIndent(indent++);
System.out.println("#" + (i + 1) + ": id = " + fieldId +
", criticality = " + Criticalities[(int)field.getCriticality().longValue()]);
/* Print AMF-UE-NGAP-ID IE */
printIndent(indent);
if (field.getId().equalTo(OSS_NGAP_NGAP_Constants.OSS_NGAP_id_AMF_UE_NGAP_ID)) {
System.out.println("value AMF-UE-NGAP-ID: " +
((OSS_NGAP_AMF_UE_NGAP_ID)value.getDecodedValue()).longValue());
/* RAN-UE-NGAP-ID IE */
} else if (field.getId().equalTo(OSS_NGAP_NGAP_Constants.OSS_NGAP_id_RAN_UE_NGAP_ID)) {
System.out.println("value RAN-UE-NGAP-ID: " +
((OSS_NGAP_RAN_UE_NGAP_ID)value.getDecodedValue()).longValue());
/* HandoverType IE */
} else if (field.getId().equalTo(OSS_NGAP_NGAP_Constants.OSS_NGAP_id_HandoverType)) {
System.out.println("value HandoverType: " +
HandoverType[(int)((OSS_NGAP_HandoverType)value.getDecodedValue()).longValue()]);
/* Cause IE */
} else if (field.getId().equalTo(OSS_NGAP_NGAP_Constants.OSS_NGAP_id_Cause)) {
OSS_NGAP_Cause pcause = (OSS_NGAP_Cause)value.getDecodedValue();
/*
* Named values can be printed below instead of numbers for all
* Cause components
*/
System.out.print("value Cause: ");
/* radioNetwork */
if (pcause.hasRadioNetwork())
System.out.println("radioNetwork: " +
((OSS_NGAP_CauseRadioNetwork)pcause.getChosenValue()).longValue());
/* transport */
else if (pcause.hasTransport())
System.out.println("transport: " +
((OSS_NGAP_CauseTransport)pcause.getChosenValue()).longValue());
/* nas */
else if (pcause.hasNas())
System.out.println("nas: " +
((OSS_NGAP_CauseNas)pcause.getChosenValue()).longValue());
/* protocol */
else if (pcause.hasProtocol())
System.out.println("protocol: " +
((OSS_NGAP_CauseProtocol)pcause.getChosenValue()).longValue());
/* misc */
else if (pcause.hasMisc())
System.out.println("misc: " +
((OSS_NGAP_CauseMisc)pcause.getChosenValue()).longValue());
else if (pcause.hasChoice_Extensions())
System.out.println("choice-Extensions --<Not implemented>--");
/* TargetID IE */
} else if (field.getId().equalTo(OSS_NGAP_NGAP_Constants.OSS_NGAP_id_TargetID)) {
OSS_NGAP_TargetID ptarget = (OSS_NGAP_TargetID)value.getDecodedValue();
System.out.print("value TargetID : ");
indent++;
/* targetRANNodeID */
if (ptarget.hasTargetRANNodeID()) {
OSS_NGAP_TargetRANNodeID targetRANNodeID =
(OSS_NGAP_TargetRANNodeID)ptarget.getChosenValue();
printDataWithIndent(indent, "globalRANNodeID :");
indent++;
if (targetRANNodeID.getGlobalRANNodeID().hasGlobalGNB_ID()) {
printDataWithIndent(indent,"globalGNB-ID:");
indent++;
/* pLMNidentity */
printDataWithIndent(indent, "pLMNIdentity: " +
toHstring(targetRANNodeID.getGlobalRANNodeID().getGlobalGNB_ID().getPLMNIdentity().byteArrayValue()));
/* gNB-ID */
printIndent(indent);
System.out.print("gNB-ID :");
if (targetRANNodeID.getGlobalRANNodeID().getGlobalGNB_ID().getGNB_ID().hasGNB_ID()) {
printDataWithIndent(indent, "gNB-ID: " +
toHstring(targetRANNodeID.getGlobalRANNodeID().getGlobalGNB_ID().getGNB_ID().getGNB_ID().byteArrayValue()));
} else if (targetRANNodeID.getGlobalRANNodeID().getGlobalGNB_ID().getGNB_ID().hasChoice_Extensions())
System.out.println("choice-Extensions --<Not implemented>--");
indent--;
} else if (targetRANNodeID.getGlobalRANNodeID().hasGlobalNgENB_ID()) {
System.out.println("globalNgENB-ID --<Not implemented>--");
} else if (targetRANNodeID.getGlobalRANNodeID().hasGlobalN3IWF_ID()) {
System.out.println("globalN3IWF-ID --<Not implemented>--");
} else if (targetRANNodeID.getGlobalRANNodeID().hasChoice_Extensions())
System.out.println("choice-Extensions --<Not implemented>--");
printDataWithIndent(indent, "selectedTAI: ");
indent++;
printDataWithIndent(indent, "pLMNIdentity: " +
toHstring(targetRANNodeID.getSelectedTAI().getPLMNIdentity().byteArrayValue()));
printDataWithIndent(indent, "tAC: " +
toHstring(targetRANNodeID.getSelectedTAI().getTAC().byteArrayValue()));
indent--;
/* iE_Extensions is optional */
if (targetRANNodeID.hasIE_Extensions())
printProtocolExtensions(
targetRANNodeID.getIE_Extensions(), indent);
indent--;
/* targeteNB-ID */
} else if (ptarget.hasTargeteNB_ID()) {
OSS_NGAP_TargeteNB_ID targeteNB_ID =
(OSS_NGAP_TargeteNB_ID)ptarget.getChosenValue();
System.out.println("targeteNB-ID :");
/* global-ENB-ID */
printDataWithIndent(indent, "globalENB-ID: ");
indent++;
/* selected-EPS-TAI */
printDataWithIndent(indent, "selected-EPS-TAI: ");
if (targeteNB_ID.getGlobalENB_ID().hasIE_Extensions())
printProtocolExtensions(
targeteNB_ID.getGlobalENB_ID().getIE_Extensions(), indent);
indent--;
/* choice-Extensions */
} else if (ptarget.hasChoice_Extensions()) {
System.out.println("choice-Extensions --<Not implemented>--");
}
indent--;
/* DirectForwardingPathAvailability IE */
} else if (field.getId().equalTo(OSS_NGAP_NGAP_Constants.OSS_NGAP_id_DirectForwardingPathAvailability)) {
System.out.println("value DirectForwardingPathAvailability: " +
((OSS_NGAP_DirectForwardingPathAvailability)value.getDecodedValue()).longValue());
/* other IEs are printed as ASN.1 value notation */
} else if (value.getDecodedValue() != null) {
System.out.print(value.getDecodedValue());
} else
System.out.println("PDU is not decoded");
System.out.println();
indent--;
}
}
/*
* Prints ProtocolExtensionContainer data.
*/
static void printProtocolExtensions(
OSS_NGAP_ProtocolExtensionContainer ie_ext, int indent)
{
printDataWithIndent(indent++, "iE-Extensions includes the following IEs:");
for (int i = 0; i < ie_ext.getSize(); i++) {
OSS_NGAP_ProtocolExtensionField field = ie_ext.get(i);
OpenType value = field.getExtensionValue();
long fieldId = field.getId().longValue();
printIndent(indent++);
System.out.println("#" + (i + 1) + ": id = " + fieldId +
", criticality = " +
Criticalities[(int)field.getCriticality().longValue()]);
if (value.getDecodedValue() != null)
System.out.println(value.getDecodedValue());
else
System.out.println("PDU is not decoded");
}
}
/*
* Helper method. Converts byte[] array to the Hstring format, like '12345'H.
*/
static String toHstring(byte[] value)
{
return "'" + HexTool.getHex(value) + "'H";
}
/*
* Performs indentation.
* @param indentlevel indentation level.
*/
public static void printIndent(int indentlevel)
{
for (int i = 0; i < indentlevel; i++)
System.out.print(' ');
}
/*
* Print indentation with following data.
*/
public static void printDataWithIndent(int indentlevel, Object data)
{
printIndent(indentlevel);
System.out.println(data);
}
}
This is the expected output when running the sample:
Decoded NGAP message: ... Encoding response message... Encoding successful.
-- Excerpt from ngap.asn 3GPP TS 38.413 V19.0.0 (2025-09)
-- **************************************************************
--
-- Elementary Procedure definitions
--
-- **************************************************************
NGAP-PDU-Descriptions {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
ngran-Access (22) modules (3) ngap (1) version1 (1) ngap-PDU-Descriptions (0)}
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-- **************************************************************
--
-- IE parameter types from other modules.
--
-- **************************************************************
IMPORTS
Criticality,
ProcedureCode
FROM NGAP-CommonDataTypes
AMFConfigurationUpdate,
AMFConfigurationUpdateAcknowledge,
AMFConfigurationUpdateFailure,
AMFCPRelocationIndication,
AMFStatusIndication,
BroadcastSessionModificationFailure,
BroadcastSessionModificationRequest,
BroadcastSessionModificationResponse,
BroadcastSessionReleaseRequest,
BroadcastSessionReleaseRequired,
BroadcastSessionReleaseResponse,
BroadcastSessionSetupFailure,
BroadcastSessionSetupRequest,
BroadcastSessionSetupResponse,
BroadcastSessionTransportFailure,
BroadcastSessionTransportRequest,
BroadcastSessionTransportResponse,
CellTrafficTrace,
ConnectionEstablishmentIndication,
DeactivateTrace,
DistributionReleaseRequest,
DistributionReleaseResponse,
DistributionSetupFailure,
DistributionSetupRequest,
DistributionSetupResponse,
DownlinkNASTransport,
DownlinkNonUEAssociatedNRPPaTransport,
DownlinkRANConfigurationTransfer,
DownlinkRANEarlyStatusTransfer,
DownlinkRANStatusTransfer,
DownlinkUEAssociatedNRPPaTransport,
ErrorIndication,
HandoverCancel,
HandoverCancelAcknowledge,
HandoverCommand,
HandoverFailure,
HandoverNotify,
HandoverPreparationFailure,
HandoverRequest,
HandoverRequestAcknowledge,
HandoverRequired,
HandoverSuccess,
InitialContextSetupFailure,
InitialContextSetupRequest,
InitialContextSetupResponse,
InitialUEMessage,
LocationReport,
LocationReportingControl,
LocationReportingFailureIndication,
MTCommunicationHandlingRequest,
MTCommunicationHandlingResponse,
MTCommunicationHandlingFailure,
MulticastSessionActivationFailure,
MulticastSessionActivationRequest,
MulticastSessionActivationResponse,
MulticastSessionDeactivationRequest,
MulticastSessionDeactivationResponse,
MulticastSessionUpdateFailure,
MulticastSessionUpdateRequest,
MulticastSessionUpdateResponse,
MulticastGroupPaging,
NASNonDeliveryIndication,
NGReset,
NGResetAcknowledge,
NGRemovalFailure,
NGRemovalRequest,
NGRemovalResponse,
NGSetupFailure,
NGSetupRequest,
NGSetupResponse,
OverloadStart,
OverloadStop,
Paging,
PathSwitchRequest,
PathSwitchRequestAcknowledge,
PathSwitchRequestFailure,
PDUSessionResourceModifyConfirm,
PDUSessionResourceModifyIndication,
PDUSessionResourceModifyRequest,
PDUSessionResourceModifyResponse,
PDUSessionResourceNotify,
PDUSessionResourceReleaseCommand,
PDUSessionResourceReleaseResponse,
PDUSessionResourceSetupRequest,
PDUSessionResourceSetupResponse,
PrivateMessage,
PWSCancelRequest,
PWSCancelResponse,
PWSFailureIndication,
PWSRestartIndication,
RANConfigurationUpdate,
RANConfigurationUpdateAcknowledge,
RANConfigurationUpdateFailure,
RANCPRelocationIndication,
RANPagingRequest,
RerouteNASRequest,
RetrieveUEInformation,
RRCInactiveTransitionReport,
SecondaryRATDataUsageReport,
TimingSynchronisationStatusRequest,
TimingSynchronisationStatusResponse,
TimingSynchronisationStatusFailure,
TimingSynchronisationStatusReport,
TraceFailureIndication,
TraceStart,
UEContextModificationFailure,
UEContextModificationRequest,
UEContextModificationResponse,
UEContextReleaseCommand,
UEContextReleaseComplete,
UEContextReleaseRequest,
UEContextResumeRequest,
UEContextResumeResponse,
UEContextResumeFailure,
UEContextSuspendRequest,
UEContextSuspendResponse,
UEContextSuspendFailure,
UEInformationTransfer,
UERadioCapabilityCheckRequest,
UERadioCapabilityCheckResponse,
UERadioCapabilityIDMappingRequest,
UERadioCapabilityIDMappingResponse,
UERadioCapabilityInfoIndication,
UETNLABindingReleaseRequest,
UplinkNASTransport,
UplinkNonUEAssociatedNRPPaTransport,
UplinkRANConfigurationTransfer,
UplinkRANEarlyStatusTransfer,
UplinkRANStatusTransfer,
UplinkUEAssociatedNRPPaTransport,
WriteReplaceWarningRequest,
WriteReplaceWarningResponse,
UplinkRIMInformationTransfer,
DownlinkRIMInformationTransfer,
InventoryRequest,
InventoryResponse,
InventoryFailure,
InventoryReport,
CommandRequest,
CommandResponse,
CommandFailure,
AIOTSessionReleaseCommand,
AIOTSessionReleaseComplete,
AIOTSessionReleaseRequest
FROM NGAP-PDU-Contents
id-AMFConfigurationUpdate,
id-AMFCPRelocationIndication,
id-AMFStatusIndication,
id-BroadcastSessionModification,
id-BroadcastSessionRelease,
id-BroadcastSessionReleaseRequired,
id-BroadcastSessionSetup,
id-BroadcastSessionTransport,
id-CellTrafficTrace,
id-ConnectionEstablishmentIndication,
id-DeactivateTrace,
id-DistributionRelease,
id-DistributionSetup,
id-DownlinkNASTransport,
id-DownlinkNonUEAssociatedNRPPaTransport,
id-DownlinkRANConfigurationTransfer,
id-DownlinkRANEarlyStatusTransfer,
id-DownlinkRANStatusTransfer,
id-DownlinkRIMInformationTransfer,
id-DownlinkUEAssociatedNRPPaTransport,
id-ErrorIndication,
id-HandoverCancel,
id-HandoverNotification,
id-HandoverPreparation,
id-HandoverResourceAllocation,
id-HandoverSuccess,
id-InitialContextSetup,
id-InitialUEMessage,
id-LocationReport,
id-LocationReportingControl,
id-LocationReportingFailureIndication,
id-MTCommunicationHandling,
id-MulticastGroupPaging,
id-MulticastSessionActivation,
id-MulticastSessionDeactivation,
id-MulticastSessionUpdate,
id-NASNonDeliveryIndication,
id-NGReset,
id-NGRemoval,
id-NGSetup,
id-OverloadStart,
id-OverloadStop,
id-Paging,
id-PathSwitchRequest,
id-PDUSessionResourceModify,
id-PDUSessionResourceModifyIndication,
id-PDUSessionResourceNotify,
id-PDUSessionResourceRelease,
id-PDUSessionResourceSetup,
id-PrivateMessage,
id-PWSCancel,
id-PWSFailureIndication,
id-PWSRestartIndication,
id-RANConfigurationUpdate,
id-RANCPRelocationIndication,
id-RANPagingRequest,
id-RerouteNASRequest,
id-RetrieveUEInformation,
id-RRCInactiveTransitionReport,
id-SecondaryRATDataUsageReport,
id-TimingSynchronisationStatus,
id-TimingSynchronisationStatusReport,
id-TraceFailureIndication,
id-TraceStart,
id-UEContextModification,
id-UEContextRelease,
id-UEContextReleaseRequest,
id-UEContextResume,
id-UEContextSuspend,
id-UEInformationTransfer,
id-UERadioCapabilityCheck,
id-UERadioCapabilityIDMapping,
id-UERadioCapabilityInfoIndication,
id-UETNLABindingRelease,
id-UplinkNASTransport,
id-UplinkNonUEAssociatedNRPPaTransport,
id-UplinkRANConfigurationTransfer,
id-UplinkRANEarlyStatusTransfer,
id-UplinkRANStatusTransfer,
id-UplinkRIMInformationTransfer,
id-UplinkUEAssociatedNRPPaTransport,
id-WriteReplaceWarning,
id-InventoryRequest,
id-InventoryReport,
id-CommandRequest,
id-AIOTSessionRelease,
id-AIOTSessionReleaseRequest
FROM NGAP-Constants;
-- **************************************************************
--
-- Interface Elementary Procedure Class
--
-- **************************************************************
NGAP-ELEMENTARY-PROCEDURE ::= CLASS {
&InitiatingMessage ,
&SuccessfulOutcome OPTIONAL,
&UnsuccessfulOutcome OPTIONAL,
&procedureCode ProcedureCode UNIQUE,
&criticality Criticality DEFAULT ignore
}
WITH SYNTAX {
INITIATING MESSAGE &InitiatingMessage
[SUCCESSFUL OUTCOME &SuccessfulOutcome]
[UNSUCCESSFUL OUTCOME &UnsuccessfulOutcome]
PROCEDURE CODE &procedureCode
[CRITICALITY &criticality]
}
-- **************************************************************
--
-- Interface PDU Definition
--
-- **************************************************************
NGAP-PDU ::= CHOICE {
initiatingMessage InitiatingMessage,
successfulOutcome SuccessfulOutcome,
unsuccessfulOutcome UnsuccessfulOutcome,
...
}
InitiatingMessage ::= SEQUENCE {
procedureCode NGAP-ELEMENTARY-PROCEDURE.&procedureCode ({NGAP-ELEMENTARY-PROCEDURES}),
criticality NGAP-ELEMENTARY-PROCEDURE.&criticality ({NGAP-ELEMENTARY-PROCEDURES}{@procedureCode}),
value NGAP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({NGAP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
SuccessfulOutcome ::= SEQUENCE {
procedureCode NGAP-ELEMENTARY-PROCEDURE.&procedureCode ({NGAP-ELEMENTARY-PROCEDURES}),
criticality NGAP-ELEMENTARY-PROCEDURE.&criticality ({NGAP-ELEMENTARY-PROCEDURES}{@procedureCode}),
value NGAP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome ({NGAP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
UnsuccessfulOutcome ::= SEQUENCE {
procedureCode NGAP-ELEMENTARY-PROCEDURE.&procedureCode ({NGAP-ELEMENTARY-PROCEDURES}),
criticality NGAP-ELEMENTARY-PROCEDURE.&criticality ({NGAP-ELEMENTARY-PROCEDURES}{@procedureCode}),
value NGAP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome ({NGAP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
The gui/ subdirectory contains an ASN.1 Studio project for this sample. With ASN.1 Studio you can:
This sample is provided solely for illustration purposes, for example to demonstrate usage of the OSS ASN.1 Tools API with 3GPP 5G NGAP messages. It does not represent a complete application. To build and run this sample, you must use a trial or licensed version of the appropriate OSS ASN.1 Tools. The copyright and license statements included in each source file remain fully applicable.
If you have questions about using this sample, contact OSS Nokalva Support.