Skip to content
Snippets Groups Projects

NAS Service Request enc/dec implementation

Merged Guido Casati requested to merge nr-ue-nas-service-request into develop
1 unresolved thread
2 files
+ 51
67
Compare changes
  • Side-by-side
  • Inline
Files
2
  • 35c44d0f
    Refactor TLVDecoder macros · 35c44d0f
    Guido Casati authored
    * ideally the result of these macros shall be relevant
      only in unit tests, in order to validate enc/dec NAS functions
    * use a local print macro
    * remove dependency from LOG module
    * simplified the code
    * cleanup TLVDecoder.c (kept it for LTE dependencies)
@@ -23,28 +23,4 @@
#include <stdlib.h>
#include <string.h>
#include "TLVDecoder.h"
int errorCodeDecoder = 0;
static const char* const errorCodeStringDecoder[] = {
"No error",
"Buffer NULL",
"Buffer too short",
"Unexpected IEI",
"Mandatory field not present",
"Wrong message type",
"EXT value doesn't match",
"Protocol not supported",
};
void tlv_decode_perror(void)
{
if (errorCodeDecoder >= 0)
// No error or TLV_DECODE_ERR_OK
return;
printf("TLV decoder error: (%d, %s)\n", errorCodeDecoder, errorCodeStringDecoder[errorCodeDecoder * -1]);
}
Loading