mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 14:20:09 +00:00
[5GC] Added BSF(Binding Support Function)
This commit is contained in:
parent
611986794b
commit
fe89f7cd11
293 changed files with 24988 additions and 1507 deletions
30
lib/sbi/openapi/model/priority_sharing_indicator.c
Normal file
30
lib/sbi/openapi/model/priority_sharing_indicator.c
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "priority_sharing_indicator.h"
|
||||
|
||||
char* OpenAPI_priority_sharing_indicator_ToString(OpenAPI_priority_sharing_indicator_e priority_sharing_indicator)
|
||||
{
|
||||
const char *priority_sharing_indicatorArray[] = { "NULL", "ENABLED", "DISABLED" };
|
||||
size_t sizeofArray = sizeof(priority_sharing_indicatorArray) / sizeof(priority_sharing_indicatorArray[0]);
|
||||
if (priority_sharing_indicator < sizeofArray)
|
||||
return (char *)priority_sharing_indicatorArray[priority_sharing_indicator];
|
||||
else
|
||||
return (char *)"Unknown";
|
||||
}
|
||||
|
||||
OpenAPI_priority_sharing_indicator_e OpenAPI_priority_sharing_indicator_FromString(char* priority_sharing_indicator)
|
||||
{
|
||||
int stringToReturn = 0;
|
||||
const char *priority_sharing_indicatorArray[] = { "NULL", "ENABLED", "DISABLED" };
|
||||
size_t sizeofArray = sizeof(priority_sharing_indicatorArray) / sizeof(priority_sharing_indicatorArray[0]);
|
||||
while (stringToReturn < sizeofArray) {
|
||||
if (strcmp(priority_sharing_indicator, priority_sharing_indicatorArray[stringToReturn]) == 0) {
|
||||
return stringToReturn;
|
||||
}
|
||||
stringToReturn++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue