mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 22:30:09 +00:00
[Release-17] Upgrade SBI to v17.x.0
This commit is contained in:
parent
969c116e77
commit
4d44b1843e
1687 changed files with 121604 additions and 9310 deletions
30
lib/sbi/openapi/model/uc_purpose.c
Normal file
30
lib/sbi/openapi/model/uc_purpose.c
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "uc_purpose.h"
|
||||
|
||||
char* OpenAPI_uc_purpose_ToString(OpenAPI_uc_purpose_e uc_purpose)
|
||||
{
|
||||
const char *uc_purposeArray[] = { "NULL", "ANALYTICS", "MODEL_TRAINING", "NW_CAP_EXPOSURE", "EDGEAPP_UE_LOCATION" };
|
||||
size_t sizeofArray = sizeof(uc_purposeArray) / sizeof(uc_purposeArray[0]);
|
||||
if (uc_purpose < sizeofArray)
|
||||
return (char *)uc_purposeArray[uc_purpose];
|
||||
else
|
||||
return (char *)"Unknown";
|
||||
}
|
||||
|
||||
OpenAPI_uc_purpose_e OpenAPI_uc_purpose_FromString(char* uc_purpose)
|
||||
{
|
||||
int stringToReturn = 0;
|
||||
const char *uc_purposeArray[] = { "NULL", "ANALYTICS", "MODEL_TRAINING", "NW_CAP_EXPOSURE", "EDGEAPP_UE_LOCATION" };
|
||||
size_t sizeofArray = sizeof(uc_purposeArray) / sizeof(uc_purposeArray[0]);
|
||||
while (stringToReturn < sizeofArray) {
|
||||
if (strcmp(uc_purpose, uc_purposeArray[stringToReturn]) == 0) {
|
||||
return stringToReturn;
|
||||
}
|
||||
stringToReturn++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue