mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 22:30:09 +00:00
arch: DB schema Changes (#796)
- New function : NSSF - New feature : SMF selection
This commit is contained in:
parent
c6bfbed922
commit
9af4268bab
691 changed files with 40727 additions and 18985 deletions
30
lib/sbi/openapi/model/reporting_trigger.c
Normal file
30
lib/sbi/openapi/model/reporting_trigger.c
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "reporting_trigger.h"
|
||||
|
||||
char* OpenAPI_reporting_trigger_ToString(OpenAPI_reporting_trigger_e reporting_trigger)
|
||||
{
|
||||
const char *reporting_triggerArray[] = { "NULL", "PERIODICAL", "EVENT_A2", "EVENT_A2_PERIODIC", "ALL_RRM_EVENT_TRIGGERS" };
|
||||
size_t sizeofArray = sizeof(reporting_triggerArray) / sizeof(reporting_triggerArray[0]);
|
||||
if (reporting_trigger < sizeofArray)
|
||||
return (char *)reporting_triggerArray[reporting_trigger];
|
||||
else
|
||||
return (char *)"Unknown";
|
||||
}
|
||||
|
||||
OpenAPI_reporting_trigger_e OpenAPI_reporting_trigger_FromString(char* reporting_trigger)
|
||||
{
|
||||
int stringToReturn = 0;
|
||||
const char *reporting_triggerArray[] = { "NULL", "PERIODICAL", "EVENT_A2", "EVENT_A2_PERIODIC", "ALL_RRM_EVENT_TRIGGERS" };
|
||||
size_t sizeofArray = sizeof(reporting_triggerArray) / sizeof(reporting_triggerArray[0]);
|
||||
while (stringToReturn < sizeofArray) {
|
||||
if (strcmp(reporting_trigger, reporting_triggerArray[stringToReturn]) == 0) {
|
||||
return stringToReturn;
|
||||
}
|
||||
stringToReturn++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue