mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 22:30:09 +00:00
Add only one 5GC scenario (call-flow)
This commit is contained in:
parent
20008b6a13
commit
dbee687a75
1415 changed files with 86635 additions and 5877 deletions
30
lib/sbi/openapi/model/status_change.c
Normal file
30
lib/sbi/openapi/model/status_change.c
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "status_change.h"
|
||||
|
||||
char* OpenAPI_status_change_ToString(OpenAPI_status_change_e status_change)
|
||||
{
|
||||
const char *status_changeArray[] = { "NULL", "AMF_UNAVAILABLE", "AMF_AVAILABLE" };
|
||||
size_t sizeofArray = sizeof(status_changeArray) / sizeof(status_changeArray[0]);
|
||||
if (status_change < sizeofArray)
|
||||
return (char *)status_changeArray[status_change];
|
||||
else
|
||||
return (char *)"Unknown";
|
||||
}
|
||||
|
||||
OpenAPI_status_change_e OpenAPI_status_change_FromString(char* status_change)
|
||||
{
|
||||
int stringToReturn = 0;
|
||||
const char *status_changeArray[] = { "NULL", "AMF_UNAVAILABLE", "AMF_AVAILABLE" };
|
||||
size_t sizeofArray = sizeof(status_changeArray) / sizeof(status_changeArray[0]);
|
||||
while (stringToReturn < sizeofArray) {
|
||||
if (strcmp(status_change, status_changeArray[stringToReturn]) == 0) {
|
||||
return stringToReturn;
|
||||
}
|
||||
stringToReturn++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue