mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-03 05:40: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/flow_usage.c
Normal file
30
lib/sbi/openapi/model/flow_usage.c
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "flow_usage.h"
|
||||
|
||||
char* OpenAPI_flow_usage_ToString(OpenAPI_flow_usage_e flow_usage)
|
||||
{
|
||||
const char *flow_usageArray[] = { "NULL", "NO_INFO", "RTCP", "AF_SIGNALLING" };
|
||||
size_t sizeofArray = sizeof(flow_usageArray) / sizeof(flow_usageArray[0]);
|
||||
if (flow_usage < sizeofArray)
|
||||
return (char *)flow_usageArray[flow_usage];
|
||||
else
|
||||
return (char *)"Unknown";
|
||||
}
|
||||
|
||||
OpenAPI_flow_usage_e OpenAPI_flow_usage_FromString(char* flow_usage)
|
||||
{
|
||||
int stringToReturn = 0;
|
||||
const char *flow_usageArray[] = { "NULL", "NO_INFO", "RTCP", "AF_SIGNALLING" };
|
||||
size_t sizeofArray = sizeof(flow_usageArray) / sizeof(flow_usageArray[0]);
|
||||
while (stringToReturn < sizeofArray) {
|
||||
if (strcmp(flow_usage, flow_usageArray[stringToReturn]) == 0) {
|
||||
return stringToReturn;
|
||||
}
|
||||
stringToReturn++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue