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 F1AP standard (TS 38.473 version 19.0.0).
It runs on Linux on x86-64 as an example and illustrates how to decode, inspect, and create PER-encoded 5G F1AP messages using the OSS ASN.1 Tools API.
The sample reads F1AP messages from .per files, decodes and prints them, and creates and encodes a response message.
A makefile is included for building and running the test program using the OSS ASN.1/C++ runtime.
To explore more samples (LTE RRC, 5G RRC, S1AP, X2AP, E1AP), 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 source files that describe the 3GPP NG-RAN F1AP protocol (TS 38.473) used with this program example. |
| F1AP-PDU_Reset.per | Valid PER-encoded F1AP message. It should pass testing. |
| tf1ap.cpp | Simple C++ program that shows how to work with NG-RAN F1AP protocol data. It reads input messages from files, decodes and prints them, and creates and encodes a response message. |
| makefile | Makefile that builds and runs the sample test. |
| makefile.rtoed | Makefile that builds and runs the sample test using RTOED. |
| 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 C++.
If your shipment is runtime-only, generate the .cpp and .h files by running:
make cross
This creates a samples/cross directory with:
make
This command compiles the sample C++ source, links it with the OSS ASN.1 static library, and executes the test. To use another type of library in the shipment (such as a shared library), set the A makefile variable, for example:
make A=so
make clean
Note: The C++ 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 C++ source file for this sample test program, tf1ap.cpp. It demonstrates how to read PER-encoded 5G F1AP messages from files, decode and print them, and create and encode a response message using the OSS ASN.1 Tools API.
/*****************************************************************************/
/* Copyright (C) ###RELEASE_YEAR### 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. */
/*****************************************************************************/
/*
*Demonstrates work with data for F1 protocol of NG-RAN
*/
#include <errno.h>
#include <string.h>
#ifdef TOED
#include "of1ap_r19.h"
#else
#include "f1ap_r19.h"
#endif
/* Names of Criticality values */
static const char *Criticalities[] = { "reject", "ignore", "notify" };
/* The directory where input files reside. It is set to the command line parameter
* if any and to the directory where the sample is started, otherwise.
*/
char *filesDir;
/************************ UTILITY FUNCTIONS section: ************************/
/*
* FUNCTION Helper function to open file in the specified directory.
*
* PARAMETERS
* directoryName directory where fileName resides
* fileName file to open
*
* RETURNS pointer to file on success, NULL on failure
*/
FILE * openInputFile(char *directoryName, const char *fileName)
{
char *path;
FILE *fv;
const char kPathSeparator =
#ifdef _WIN32
'\\';
#else
'/';
#endif
if (directoryName) {
size_t dLength = strlen(directoryName);
if (NULL == (path = (char*)asn1Malloc(dLength + strlen(fileName) + 2))) {
return NULL;
}
memcpy(path, directoryName, dLength);
if (path[dLength - 1] != kPathSeparator)
path[dLength++] = kPathSeparator;
strcpy(path+dLength, fileName);
} else {
path = (char *) fileName;
}
if (!(fv = fopen(path, "rb"))) {
printf("Failed to open the '%s' file. Restart the sample program using the file "
"location as the input parameter.\n", path);
}
if (path != fileName)
asn1Free(path);
return fv;
}
/*
* FUNCTION readEncodingFromFile() reads serialized message from specified
* file
*
* PARAMETERS
* filename name of file containing serialized message
* buf read message
*
* RETURNS 0 on success, error code on failure
*/
static int readEncodingFromFile(const char *filename, EncodedBuffer &buf)
{
FILE *in = openInputFile(filesDir, filename);
long length;
char *data;
if (!in) {
printf("fopen() failed to open %s: %s\n", filename, strerror(errno));
exit(-1);
}
if (fseek(in, 0, SEEK_END)) {
printf("fseek() failed: %s\n", strerror(errno));
exit(-1);
}
length = ftell(in);
if (length < 0) {
printf("ftell() failed: %s\n", strerror(errno));
exit(-1);
}
/* Allocate memory to store completely read message in it */
data = (char*)asn1Malloc(length);
rewind(in);
if ((size_t)length != fread(data, sizeof(char), (size_t)length, in)) {
printf("fread() failed\n");
}
fclose(in);
/* Store read message in output argument */
buf.grab_buffer(length, data);
return 0;
}
/*
* FUNCTION printHexString() prints data (octet string) as a sequence of
* hexadecimal digits 'XXXX...'H
*
* PARAMETERS
* length length of input data
* value pointer to input data
* indent indentation
*
*/
static void printHexString(unsigned int length, unsigned char *value, int indent)
{
unsigned int i, j,
max_pos = 74 - indent;
printf("'");
for (i = 0, j = 1; i < length; i++, j += 2) {
/* skip to next line when the current one is filled */
if (j >= max_pos) {
printf("'\n%*s'", indent, "");
j = 1;
}
printf("%02X", value[i]);
}
printf("'H");
}
/* Prints a BIT STRING as a sequence of hexadecimal digits */
#define printHexBitString(length, value, indent)\
printHexString((length + 7)/8, value, indent)
/***************************** MAIN section: ********************************/
/*****************************************************************************
* Printing functions below are intended to demonstrate how to access f1ap
* PDU components and to analyze their contents.
*****************************************************************************/
/*
* FUNCTION printProtocolIEs() prints ProtocolIE_Container data.
* ossPrintPDU() is called to print IEs that are not
* handled by this function.
*
* PARAMETERS
* ctl OssControl object
* ies pointer to ProtocolIE-Container data to print
* indent indentation
*
* RETURNS 0 on success, error code on failure
*/
static int printProtocolIEs(OssControl &ctl, OSS_F1AP_Reset::protocolIEs &ies,
int indent)
{
int err = 0;
printf("%*s%s includes the following IEs:\n", indent++, "",
"protocolIEs");
/* Print each IE */
int i = 1;
for (OssIndex idx = ies.first(); idx; idx = ies.next(idx), i++) {
printf("\n%*s#%d: id = %2u, criticality = %s\n", indent, "",
i, ies.at(idx)->get_id(), Criticalities[ies.at(idx)->get_criticality()]);
++indent;
/* Print TransactionID IE */
if (ies.at(idx)->get_id() == OSS_F1AP_id_TransactionID) {
printf("%*svalue %s: %ld\n", indent, "", "TransactionID",
(long)*ies.at(idx)->get_value().get_OSS_F1AP_TransactionID());
} else if (ies.at(idx)->get_id() == OSS_F1AP_id_ResetType) {
OSS_F1AP_ResetType *pResetType = ies.at(idx)->get_value().get_OSS_F1AP_ResetType();
printf("%*svalue %s:", indent, "", "ResetType");
if (pResetType->get_f1_Interface()) {
printf("%s : %d", "f1_Interface", *pResetType->get_f1_Interface());
} else if (pResetType->get_partOfF1_Interface()) {
printf("%s :", "partOfF1_Interface");
/* will not be used, no need to implement printing */
}
} else if(ies.at(idx)->get_id() == OSS_F1AP_id_Cause) {
OSS_F1AP_Cause *pcause = ies.at(idx)->get_value().get_OSS_F1AP_Cause();
/*
* Named values can be printed below instead of numbers for all
* Cause components
*/
printf("%*svalue %s: ", indent, "", "Cause");
if (pcause->get_radioNetwork()) {
printf("%s : %d", "radioNetwork", *pcause->get_radioNetwork());
} else if (pcause->get_transport()) {
printf("%s : %d", "transport", *pcause->get_transport());
} else if (pcause->get_protocol()) {
printf("%s : %d", "protocol", *pcause->get_protocol());
} else if (pcause->get_misc()) {
printf("%s : %d", "misc", *pcause->get_misc());
}
printf("\n");
} else {
printf("PDU is not decoded\n");
}
indent--;
}
return err;
}
/*
* FUNCTION printResetMsg() prints f1ap pdu which contains
* Reset message. The function is not intended to
* handle other types of messages.
*
* PARAMETERS
* ctl OssControl object
* pdu input f1ap PDU which data should be printed
*
* RETURNS 0 on success, error code on failure
*/
static int printResetMsg(OssControl &ctl, OSS_F1AP_F1AP_PDU *pdu)
{
/* Check the message type */
OSS_F1AP_InitiatingMessage *msg = pdu->get_initiatingMessage();
if (!msg) {
printf("### Unexpected type of message");
return -1;
}
OSS_F1AP_F1AP_ELEMENTARY_PROCEDURES_InitiatingMessage msg_value =
msg->get_value();
OSS_F1AP_Reset *reset_value = msg_value.get_OSS_F1AP_Reset();
printf("Reset message:\n\n");
if (!reset_value) {
printf("Incorrect message \n");
return -1;
}
return printProtocolIEs(ctl, reset_value->get_protocolIEs(), 0);
}
/*
* FUNCTION createSuccessResponse() creates f1ap successful outcome
* message for given HandoverRequired request.
*
* PARAMETERS
* ctl OssControl object
* req input message (request)
* resp pointer to the successful outcome message (response)
* created by the function
*
* RETURNS 0 on success, error code on failure
*/
static int createSuccessResponse(OssControl &ctl, OSS_F1AP_F1AP_PDU *req,
OSS_F1AP_F1AP_PDU &resp)
{
OSS_F1AP_InitiatingMessage *initMsg = req->get_initiatingMessage();
if (!initMsg) {
printf("Unexpected type of message");
return -1;
}
OSS_F1AP_Reset *reset_value = initMsg->get_value().get_OSS_F1AP_Reset();
OSS_F1AP_Reset::protocolIEs &reqies = reset_value->get_protocolIEs();
/*
* Create successful outcome message from initiating message. Copy
* some IEs from input to output.
*/
OSS_F1AP_SuccessfulOutcome outcome_msg;
outcome_msg.set_procedureCode(initMsg->get_procedureCode());
outcome_msg.set_criticality(OSS_F1AP_reject);
OSS_F1AP_F1AP_ELEMENTARY_PROCEDURES_SuccessfulOutcome ot_val;
OSS_F1AP_ResetAcknowledge f1apra;
OSS_F1AP_ResetAcknowledge::protocolIEs respies;
OssIndex resp_idx = respies.first();
for (OssIndex idx = reqies.first(); idx; idx = reqies.next(idx)) {
if (reqies.at(idx)->get_id() == OSS_F1AP_id_TransactionID) {
OSS_F1AP_ResetAcknowledge::protocolIEs::component val;
val.set_id(OSS_F1AP_id_TransactionID);
val.set_criticality(OSS_F1AP_reject);
OSS_F1AP_ResetAcknowledgeIEs_Value raies;
OSS_F1AP_TransactionID tid;
tid = *reqies.at(idx)->get_value().get_OSS_F1AP_TransactionID();
raies.set_OSS_F1AP_TransactionID(tid);
val.set_value(raies);
resp_idx = respies.insert_after(resp_idx, val);
}
}
f1apra.set_protocolIEs(respies);
ot_val.set_OSS_F1AP_ResetAcknowledge(f1apra);
outcome_msg.set_value(ot_val);
resp.set_successfulOutcome(outcome_msg);
return 0;
}
/*
* FUNCTION testf1ap() is used to test f1ap message, the input serialized
* pdu is deserialized and printed, then an outcome message
* is created, printed and encoded.
*
* PARAMETERS
* world OssControl object
* filename name of file containing serialized message
*
* RETURNS 0 on success, error code on failure
*/
static int testf1ap(OssControl &ctl, const char *filename)
{
EncodedBuffer encoded_data;
int err;
printf("### Reading serialized request message from file: %s ...\n", filename);
err = readEncodingFromFile(filename, encoded_data);
if (!err) {
OSS_F1AP_F1AP_PDU_PDU pdu;
printf("### Deserializing the message...\n");
pdu.decode(ctl, encoded_data);
printf("\n");
printf("### Printing the deserialized message:\n");
/* Print deserialized message */
pdu.print(ctl);
/* Parse and print input message */
OSS_F1AP_F1AP_PDU *decoded = pdu.get_data();
printf("### Printing the deserialized message by a handwritten code"
" demonstrating how to access data:\n");
if (0 == (err = printResetMsg(ctl, decoded))) {
OSS_F1AP_F1AP_PDU resp;
printf("\n### Creating response message... ");
err = createSuccessResponse(ctl, pdu.get_data(), resp);
if (!err) {
printf("OK.\n\n### Printing the created response message:\n");
OSS_F1AP_F1AP_PDU_PDU resp_pdu;
resp_pdu.set_data(resp);
resp_pdu.print(ctl);
printf("\n\n### Serializing the response message... \n");
/* Serialize outcome message */
EncodedBuffer msg;
resp_pdu.encode(ctl, msg);
printf("\n");
printf("### The serialized message in hex (%lu bytes):\n",
msg.get_data_size());
printHexString(msg.get_data_size(), (unsigned char*)msg.get_data(), 0);
printf("\n\n");
}
}
pdu.free_data(ctl);
}
return err;
}
/*
* Deserializes and prints input messages, creates and prints successful
* outcome messages
*/
int main(int argc, char *argv[])
{
int err = 0;
try {
_oss_f1ap_control_table_Control ctl;
/* Set flags */
ctl.setEncodingFlags(AUTOMATIC_ENCDEC);
ctl.setDecodingFlags(AUTOMATIC_ENCDEC);
/* Set debug mode */
ctl.setDebugFlags(PRINT_ERROR_MESSAGES | PRINT_DECODING_DETAILS |
PRINT_ENCODING_DETAILS);
filesDir = argc > 1 ? argv[1] : (char*)".";
testf1ap(ctl, "F1AP-PDU_Reset.per");
printf("### Testing successful.\n");
} catch (ASN1RuntimeException &exc) {
err = exc.get_code();
printf("An error occurred: code = %d.\n", err);
} catch (...) {
printf("An unexpected exception occurred.\n");
err = -1;
}
return err;
}
This is the expected output when running the sample:
Decoded F1AP message: ... Encoding response message... Encoding successful.
-- Excerpt from f1ap.asn 3GPP TS 38.473 V19.0.0 (2025-09)
-- **************************************************************
--
-- Elementary Procedure definitions
--
-- **************************************************************
F1AP-PDU-Descriptions {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-PDU-Descriptions (0)}
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-- **************************************************************
--
-- IE parameter types from other modules.
--
-- **************************************************************
IMPORTS
Criticality,
ProcedureCode
FROM F1AP-CommonDataTypes
Reset,
ResetAcknowledge,
F1SetupRequest,
F1SetupResponse,
F1SetupFailure,
GNBDUConfigurationUpdate,
GNBDUConfigurationUpdateAcknowledge,
GNBDUConfigurationUpdateFailure,
GNBCUConfigurationUpdate,
GNBCUConfigurationUpdateAcknowledge,
GNBCUConfigurationUpdateFailure,
UEContextSetupRequest,
UEContextSetupResponse,
UEContextSetupFailure,
UEContextReleaseCommand,
UEContextReleaseComplete,
UEContextModificationRequest,
UEContextModificationResponse,
UEContextModificationFailure,
UEContextModificationRequired,
UEContextModificationConfirm,
ErrorIndication,
UEContextReleaseRequest,
DLRRCMessageTransfer,
ULRRCMessageTransfer,
GNBDUResourceCoordinationRequest,
GNBDUResourceCoordinationResponse,
PrivateMessage,
UEInactivityNotification,
InitialULRRCMessageTransfer,
SystemInformationDeliveryCommand,
Paging,
Notify,
WriteReplaceWarningRequest,
WriteReplaceWarningResponse,
PWSCancelRequest,
PWSCancelResponse,
PWSRestartIndication,
PWSFailureIndication,
GNBDUStatusIndication,
RRCDeliveryReport,
UEContextModificationRefuse,
F1RemovalRequest,
F1RemovalResponse,
F1RemovalFailure,
NetworkAccessRateReduction,
TraceStart,
DeactivateTrace,
DUCURadioInformationTransfer,
CUDURadioInformationTransfer,
BAPMappingConfiguration,
BAPMappingConfigurationAcknowledge,
BAPMappingConfigurationFailure,
GNBDUResourceConfiguration,
GNBDUResourceConfigurationAcknowledge,
GNBDUResourceConfigurationFailure,
IABTNLAddressRequest,
IABTNLAddressResponse,
IABTNLAddressFailure,
IABUPConfigurationUpdateRequest,
IABUPConfigurationUpdateResponse,
IABUPConfigurationUpdateFailure,
ResourceStatusRequest,
ResourceStatusResponse,
ResourceStatusFailure,
ResourceStatusUpdate,
AccessAndMobilityIndication,
ReferenceTimeInformationReportingControl,
ReferenceTimeInformationReport,
AccessSuccess,
CellTrafficTrace,
PositioningMeasurementRequest,
PositioningMeasurementResponse,
PositioningMeasurementFailure,
PositioningAssistanceInformationControl,
PositioningAssistanceInformationFeedback,
PositioningMeasurementReport,
PositioningMeasurementAbort,
PositioningMeasurementFailureIndication,
PositioningMeasurementUpdate,
TRPInformationRequest,
TRPInformationResponse,
TRPInformationFailure,
PositioningInformationRequest,
PositioningInformationResponse,
PositioningInformationFailure,
PositioningActivationRequest,
PositioningActivationResponse,
PositioningActivationFailure,
PositioningDeactivation,
PositioningInformationUpdate,
E-CIDMeasurementInitiationRequest,
E-CIDMeasurementInitiationResponse,
E-CIDMeasurementInitiationFailure,
E-CIDMeasurementFailureIndication,
E-CIDMeasurementReport,
E-CIDMeasurementTerminationCommand,
BroadcastContextSetupRequest,
BroadcastContextSetupResponse,
BroadcastContextSetupFailure,
BroadcastContextReleaseCommand,
BroadcastContextReleaseComplete,
BroadcastContextReleaseRequest,
BroadcastContextModificationRequest,
BroadcastContextModificationResponse,
BroadcastContextModificationFailure,
MulticastGroupPaging,
MulticastContextSetupRequest,
MulticastContextSetupResponse,
MulticastContextSetupFailure,
MulticastContextReleaseCommand,
MulticastContextReleaseComplete,
MulticastContextReleaseRequest,
MulticastContextModificationRequest,
MulticastContextModificationResponse,
MulticastContextModificationFailure,
MulticastDistributionSetupRequest,
MulticastDistributionSetupResponse,
MulticastDistributionSetupFailure,
MulticastDistributionReleaseCommand,
MulticastDistributionReleaseComplete,
PDCMeasurementInitiationRequest,
PDCMeasurementInitiationResponse,
PDCMeasurementInitiationFailure,
PDCMeasurementReport,
PDCMeasurementTerminationCommand,
PDCMeasurementFailureIndication,
PRSConfigurationRequest,
PRSConfigurationResponse,
PRSConfigurationFailure,
MeasurementPreconfigurationRequired,
MeasurementPreconfigurationConfirm,
MeasurementPreconfigurationRefuse,
MeasurementActivation,
QoEInformationTransfer,
PosSystemInformationDeliveryCommand,
DUCUCellSwitchNotification,
CUDUCellSwitchNotification,
DUCUTAInformationTransfer,
CUDUTAInformationTransfer,
QoEInformationTransferControl,
RachIndication,
TimingSynchronisationStatusRequest,
TimingSynchronisationStatusResponse,
TimingSynchronisationStatusFailure,
TimingSynchronisationStatusReport,
MIABF1SetupTriggering,
MIABF1SetupOutcomeNotification,
MulticastContextNotificationIndication,
MulticastContextNotificationConfirm,
MulticastContextNotificationRefuse,
MulticastCommonConfigurationRequest,
MulticastCommonConfigurationResponse,
MulticastCommonConfigurationRefuse,
BroadcastTransportResourceRequest,
DUCUAccessAndMobilityIndication,
SRSInformationReservationNotification,
CUDUMobilityInitiationRequest,
CLI-Indication,
DUCUCSIRSCoordinationRequest,
DUCUCSIRSCoordinationResponse,
CUDUCSIRSCoordinationRequest,
CUDUCSIRSCoordinationResponse
FROM F1AP-PDU-Contents
id-Reset,
id-F1Setup,
id-gNBDUConfigurationUpdate,
id-gNBCUConfigurationUpdate,
id-UEContextSetup,
id-UEContextRelease,
id-UEContextModification,
id-UEContextModificationRequired,
id-DUCUAccessAndMobilityIndication,
id-ErrorIndication,
id-UEContextReleaseRequest,
id-DLRRCMessageTransfer,
id-ULRRCMessageTransfer,
id-GNBDUResourceCoordination,
id-privateMessage,
id-UEInactivityNotification,
id-InitialULRRCMessageTransfer,
id-SystemInformationDeliveryCommand,
id-Paging,
id-Notify,
id-WriteReplaceWarning,
id-PWSCancel,
id-PWSRestartIndication,
id-PWSFailureIndication,
id-GNBDUStatusIndication,
id-RRCDeliveryReport,
id-F1Removal,
id-NetworkAccessRateReduction,
id-TraceStart,
id-DeactivateTrace,
id-DUCURadioInformationTransfer,
id-CUDURadioInformationTransfer,
id-BAPMappingConfiguration,
id-GNBDUResourceConfiguration,
id-IABTNLAddressAllocation,
id-IABUPConfigurationUpdate,
id-resourceStatusReportingInitiation,
id-resourceStatusReporting,
id-accessAndMobilityIndication,
id-ReferenceTimeInformationReportingControl,
id-ReferenceTimeInformationReport,
id-accessSuccess,
id-cellTrafficTrace,
id-PositioningMeasurementExchange,
id-PositioningAssistanceInformationControl,
id-PositioningAssistanceInformationFeedback,
id-PositioningMeasurementReport,
id-PositioningMeasurementAbort,
id-PositioningMeasurementFailureIndication,
id-PositioningMeasurementUpdate,
id-TRPInformationExchange,
id-PositioningInformationExchange,
id-PositioningActivation,
id-PositioningDeactivation,
id-PositioningInformationUpdate,
id-E-CIDMeasurementInitiation,
id-E-CIDMeasurementFailureIndication,
id-E-CIDMeasurementReport,
id-E-CIDMeasurementTermination,
id-BroadcastContextSetup,
id-BroadcastContextRelease,
id-BroadcastContextReleaseRequest,
id-BroadcastContextModification,
id-MulticastGroupPaging,
id-MulticastContextSetup,
id-MulticastContextRelease,
id-MulticastContextReleaseRequest,
id-MulticastContextModification,
id-MulticastDistributionSetup,
id-MulticastDistributionRelease,
id-PDCMeasurementInitiation,
id-PDCMeasurementTerminationCommand,
id-PDCMeasurementFailureIndication,
id-PDCMeasurementReport,
id-pRSConfigurationExchange,
id-measurementPreconfiguration,
id-measurementActivation,
id-QoEInformationTransfer,
id-PosSystemInformationDeliveryCommand,
id-DUCUCellSwitchNotification,
id-CUDUCellSwitchNotification,
id-DUCUTAInformationTransfer,
id-CUDUTAInformationTransfer,
id-QoEInformationTransferControl,
id-RachIndication,
id-TimingSynchronisationStatus,
id-TimingSynchronisationStatusReport,
id-MIABF1SetupTriggering,
id-MIABF1SetupOutcomeNotification,
id-MulticastContextNotification,
id-MulticastCommonConfiguration,
id-BroadcastTransportResourceRequest,
id-SRSInformationReservationNotification,
id-CUDUMobilityInitiationRequest,
id-CLI-Indication,
id-DUCUCSIRSCoordination,
id-CUDUCSIRSCoordination
FROM F1AP-Constants
ProtocolIE-SingleContainer{},
F1AP-PROTOCOL-IES
FROM F1AP-Containers;
-- **************************************************************
--
-- Interface Elementary Procedure Class
--
-- **************************************************************
F1AP-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
--
-- **************************************************************
F1AP-PDU ::= CHOICE {
initiatingMessage InitiatingMessage,
successfulOutcome SuccessfulOutcome,
unsuccessfulOutcome UnsuccessfulOutcome,
choice-extension ProtocolIE-SingleContainer { { F1AP-PDU-ExtIEs} }
}
F1AP-PDU-ExtIEs F1AP-PROTOCOL-IES ::= { -- this extension is not used
...
}
InitiatingMessage ::= SEQUENCE {
procedureCode F1AP-ELEMENTARY-PROCEDURE.&procedureCode ({F1AP-ELEMENTARY-PROCEDURES}),
criticality F1AP-ELEMENTARY-PROCEDURE.&criticality ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
value F1AP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
SuccessfulOutcome ::= SEQUENCE {
procedureCode F1AP-ELEMENTARY-PROCEDURE.&procedureCode ({F1AP-ELEMENTARY-PROCEDURES}),
criticality F1AP-ELEMENTARY-PROCEDURE.&criticality ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
value F1AP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
UnsuccessfulOutcome ::= SEQUENCE {
procedureCode F1AP-ELEMENTARY-PROCEDURE.&procedureCode ({F1AP-ELEMENTARY-PROCEDURES}),
criticality F1AP-ELEMENTARY-PROCEDURE.&criticality ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
value F1AP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
-- **************************************************************
--
-- Interface Elementary Procedure List
--
-- **************************************************************
F1AP-ELEMENTARY-PROCEDURES F1AP-ELEMENTARY-PROCEDURE ::= {
F1AP-ELEMENTARY-PROCEDURES-CLASS-1 |
F1AP-ELEMENTARY-PROCEDURES-CLASS-2,
...
}
F1AP-ELEMENTARY-PROCEDURES-CLASS-1 F1AP-ELEMENTARY-PROCEDURE ::= {
reset |
f1Setup |
gNBDUConfigurationUpdate |
gNBCUConfigurationUpdate |
uEContextSetup |
uEContextRelease |
uEContextModification |
uEContextModificationRequired |
writeReplaceWarning |
pWSCancel |
gNBDUResourceCoordination |
f1Removal |
bAPMappingConfiguration |
gNBDUResourceConfiguration |
iABTNLAddressAllocation |
iABUPConfigurationUpdate |
resourceStatusReportingInitiation |
positioningMeasurementExchange |
tRPInformationExchange |
positioningInformationExchange |
positioningActivation |
e-CIDMeasurementInitiation |
broadcastContextSetup |
broadcastContextRelease |
broadcastContextModification |
multicastContextSetup |
multicastContextRelease |
multicastContextModification |
multicastDistributionSetup |
multicastDistributionRelease |
pDCMeasurementInitiation |
pRSConfigurationExchange |
measurementPreconfiguration |
timingSynchronisationStatus |
multicastContextNotification |
multicastCommonConfiguration |
cUDUCSIRSCoordination|
dUCUCSIRSCoordination,
...
}
F1AP-ELEMENTARY-PROCEDURES-CLASS-2 F1AP-ELEMENTARY-PROCEDURE ::= {
errorIndication |
uEContextReleaseRequest |
dLRRCMessageTransfer |
uLRRCMessageTransfer |
uEInactivityNotification |
privateMessage |
initialULRRCMessageTransfer |
systemInformationDelivery |
paging |
notify |
pWSRestartIndication |
pWSFailureIndication |
gNBDUStatusIndication |
rRCDeliveryReport |
networkAccessRateReduction |
traceStart |
deactivateTrace |
dUCURadioInformationTransfer |
cUDURadioInformationTransfer |
resourceStatusReporting |
accessAndMobilityIndication |
referenceTimeInformationReportingControl|
referenceTimeInformationReport |
accessSuccess |
cellTrafficTrace |
positioningAssistanceInformationControl |
positioningAssistanceInformationFeedback |
positioningMeasurementReport |
positioningMeasurementAbort |
positioningMeasurementFailureIndication |
positioningMeasurementUpdate |
positioningDeactivation |
e-CIDMeasurementFailureIndication |
e-CIDMeasurementReport |
e-CIDMeasurementTermination |
positioningInformationUpdate |
multicastGroupPaging |
broadcastContextReleaseRequest |
multicastContextReleaseRequest |
pDCMeasurementReport |
pDCMeasurementTerminationCommand |
pDCMeasurementFailureIndication |
measurementActivation |
qoEInformationTransfer |
posSystemInformationDelivery |
dUCUCellSwitchNotification |
cUDUCellSwitchNotification |
dUCUTAInformationTransfer |
cUDUTAInformationTransfer |
qoEInformationTransferControl |
rachIndication |
timingSynchronisationStatusReport |
mIABF1SetupTriggering |
mIABF1SetupOutcomeNotification |
broadcastTransportResourceRequest |
dUCUAccessAndMobilityIndication |
sRSInformationReservationNotification |
cUDUMobilityInitiation|
cLI-Indication,
...
}
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 F1AP 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.