#include <stdio.h>#include <stdarg.h>#include <time.h>#include "ltkc_platform.h"#include "ltkc_base.h"#include "ltkc_xmltext.h"
Go to the source code of this file.
Classes | |
| struct | NamespaceList |
Defines | |
| #define | MAX_NS 10u |
Typedefs | |
| typedef struct NamespaceList | tNamespaceList |
Functions | |
| static void | appendCloseTag (LLRP_tSXMLTextEncoderStream *pEncoderStream, const char *pName) |
| static void | appendFormat (LLRP_tSXMLTextEncoderStream *pEncoderStream, char *pFmtStr,...) |
| static void | appendOpenTag (LLRP_tSXMLTextEncoderStream *pEncoderStream, const char *pName) |
| static void | appendPrefixedTagName (LLRP_tSXMLTextEncoderStream *pEncoderStream, const char *pName) |
| static int | discoverNamespaces (const LLRP_tSElement *pElement, void *pArg) |
| static void | encodeElement (LLRP_tSEncoder *pBaseEncoder, const LLRP_tSElement *pElement) |
| static void | encoderDestruct (LLRP_tSEncoder *pBaseEncoder) |
| static void | indent (LLRP_tSXMLTextEncoderStream *pEncoderStream, int adjust) |
| LLRP_tResultCode | LLRP_toXMLString (const LLRP_tSElement *pElement, char *pBuffer, int nBuffer) |
| Format an element as XML text. | |
| LLRP_tSXMLTextEncoder * | LLRP_XMLTextEncoder_construct (unsigned char *pBuffer, unsigned int nBuffer) |
| static void | nestSubParameter (LLRP_tSXMLTextEncoderStream *pEncoderStream, const LLRP_tSParameter *pParameter) |
| static void | put_bytesToEnd (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_bytesToEnd_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_e1 (LLRP_tSEncoderStream *pBaseEncoderStream, const int Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_e16 (LLRP_tSEncoderStream *pBaseEncoderStream, const int Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_e2 (LLRP_tSEncoderStream *pBaseEncoderStream, const int Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_e32 (LLRP_tSEncoderStream *pBaseEncoderStream, const int Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_e8 (LLRP_tSEncoderStream *pBaseEncoderStream, const int Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_e8v (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_u8v_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_enum (LLRP_tSEncoderStream *pBaseEncoderStream, int eValue, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_reserved (LLRP_tSEncoderStream *pBaseEncoderStream, unsigned int nBits) |
| static void | put_s16 (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_s16_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_s16v (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_s16v_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_s32 (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_s32_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_s32v (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_s32v_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_s64 (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_s64_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_s64v (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_s64v_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_s8 (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_s8_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_s8v (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_s8v_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_u1 (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_u1_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_u16 (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_u16_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_u16v (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_u16v_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_u1v (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_u1v_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_u2 (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_u2_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_u32 (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_u32_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_u32v (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_u32v_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_u64 (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_u64_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_u64v (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_u64v_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_u8 (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_u8_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_u8v (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_u8v_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_u96 (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_u96_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | put_utf8v (LLRP_tSEncoderStream *pBaseEncoderStream, const llrp_utf8v_t Value, const LLRP_tSFieldDescriptor *pFieldDescriptor) |
| static void | putElement (LLRP_tSXMLTextEncoderStream *pEncoderStream, const LLRP_tSElement *pElement) |
| static void | putOptionalSubParameter (LLRP_tSEncoderStream *pBaseEncoderStream, const LLRP_tSParameter *pParameter, const LLRP_tSTypeDescriptor *pRefType) |
| static void | putOptionalSubParameterList (LLRP_tSEncoderStream *pBaseEncoderStream, const LLRP_tSParameter *pParameterList, const LLRP_tSTypeDescriptor *pRefType) |
| static void | putRequiredSubParameter (LLRP_tSEncoderStream *pBaseEncoderStream, const LLRP_tSParameter *pParameter, const LLRP_tSTypeDescriptor *pRefType) |
| static void | putRequiredSubParameterList (LLRP_tSEncoderStream *pBaseEncoderStream, const LLRP_tSParameter *pParameterList, const LLRP_tSTypeDescriptor *pRefType) |
| static void | streamConstruct_nested (LLRP_tSXMLTextEncoderStream *pEncoderStream, LLRP_tSXMLTextEncoderStream *pEnclosingEncoderStream) |
| static void | streamConstruct_outermost (LLRP_tSXMLTextEncoderStream *pEncoderStream, LLRP_tSXMLTextEncoder *pEncoder) |
Variables | |
| static LLRP_tSEncoderOps | s_XMLTextEncoderOps |
| static LLRP_tSEncoderStreamOps | s_XMLTextEncoderStreamOps |
| #define MAX_NS 10u |
Definition at line 309 of file ltkc_xmltextencode.c.
| typedef struct NamespaceList tNamespaceList |
Definition at line 315 of file ltkc_xmltextencode.c.
| static void appendCloseTag | ( | LLRP_tSXMLTextEncoderStream * | pEncoderStream, |
| const char * | pName | ||
| ) | [static] |
Definition at line 1444 of file ltkc_xmltextencode.c.
| static void appendFormat | ( | LLRP_tSXMLTextEncoderStream * | pEncoderStream, |
| char * | pFmtStr, | ||
| ... | |||
| ) | [static] |
Definition at line 1473 of file ltkc_xmltextencode.c.
| static void appendOpenTag | ( | LLRP_tSXMLTextEncoderStream * | pEncoderStream, |
| const char * | pName | ||
| ) | [static] |
Definition at line 1433 of file ltkc_xmltextencode.c.
| static void appendPrefixedTagName | ( | LLRP_tSXMLTextEncoderStream * | pEncoderStream, |
| const char * | pName | ||
| ) | [static] |
Definition at line 1454 of file ltkc_xmltextencode.c.
| static int discoverNamespaces | ( | const LLRP_tSElement * | pElement, |
| void * | pArg | ||
| ) | [static] |
Definition at line 1370 of file ltkc_xmltextencode.c.
| static void encodeElement | ( | LLRP_tSEncoder * | pBaseEncoder, |
| const LLRP_tSElement * | pElement | ||
| ) | [static] |
Definition at line 408 of file ltkc_xmltextencode.c.
| static void encoderDestruct | ( | LLRP_tSEncoder * | pBaseEncoder | ) | [static] |
Definition at line 398 of file ltkc_xmltextencode.c.
| static void indent | ( | LLRP_tSXMLTextEncoderStream * | pEncoderStream, |
| int | adjust | ||
| ) | [static] |
Definition at line 1419 of file ltkc_xmltextencode.c.
| LLRP_tResultCode LLRP_toXMLString | ( | const LLRP_tSElement * | pElement, |
| char * | pBuffer, | ||
| int | nBuffer | ||
| ) |
Format an element as XML text.
Basic steps
| [in] | pElement | Pointer to message/parameter to format |
Definition at line 1524 of file ltkc_xmltextencode.c.
| LLRP_tSXMLTextEncoder* LLRP_XMLTextEncoder_construct | ( | unsigned char * | pBuffer, |
| unsigned int | nBuffer | ||
| ) |
Definition at line 374 of file ltkc_xmltextencode.c.
| static void nestSubParameter | ( | LLRP_tSXMLTextEncoderStream * | pEncoderStream, |
| const LLRP_tSParameter * | pParameter | ||
| ) | [static] |
Definition at line 1401 of file ltkc_xmltextencode.c.
| static void put_bytesToEnd | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_bytesToEnd_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 1113 of file ltkc_xmltextencode.c.
| static void put_e1 | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const int | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 1132 of file ltkc_xmltextencode.c.
| static void put_e16 | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const int | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 1159 of file ltkc_xmltextencode.c.
| static void put_e2 | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const int | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 1141 of file ltkc_xmltextencode.c.
| static void put_e32 | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const int | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 1168 of file ltkc_xmltextencode.c.
| static void put_e8 | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const int | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 1150 of file ltkc_xmltextencode.c.
| static void put_e8v | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_u8v_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 1177 of file ltkc_xmltextencode.c.
| static void put_enum | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| int | eValue, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 1224 of file ltkc_xmltextencode.c.
| static void put_reserved | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| unsigned int | nBits | ||
| ) | [static] |
Definition at line 1260 of file ltkc_xmltextencode.c.
| static void put_s16 | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_s16_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 649 of file ltkc_xmltextencode.c.
| static void put_s16v | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_s16v_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 709 of file ltkc_xmltextencode.c.
| static void put_s32 | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_s32_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 769 of file ltkc_xmltextencode.c.
| static void put_s32v | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_s32v_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 829 of file ltkc_xmltextencode.c.
| static void put_s64 | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_s64_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 902 of file ltkc_xmltextencode.c.
| static void put_s64v | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_s64v_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 962 of file ltkc_xmltextencode.c.
| static void put_s8 | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_s8_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 529 of file ltkc_xmltextencode.c.
| static void put_s8v | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_s8v_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 589 of file ltkc_xmltextencode.c.
| static void put_u1 | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_u1_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 996 of file ltkc_xmltextencode.c.
| static void put_u16 | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_u16_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 623 of file ltkc_xmltextencode.c.
| static void put_u16v | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_u16v_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 675 of file ltkc_xmltextencode.c.
| static void put_u1v | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_u1v_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 1022 of file ltkc_xmltextencode.c.
| static void put_u2 | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_u2_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 1047 of file ltkc_xmltextencode.c.
| static void put_u32 | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_u32_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 743 of file ltkc_xmltextencode.c.
| static void put_u32v | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_u32v_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 795 of file ltkc_xmltextencode.c.
| static void put_u64 | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_u64_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 863 of file ltkc_xmltextencode.c.
| static void put_u64v | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_u64v_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 928 of file ltkc_xmltextencode.c.
| static void put_u8 | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_u8_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 503 of file ltkc_xmltextencode.c.
| static void put_u8v | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_u8v_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 555 of file ltkc_xmltextencode.c.
| static void put_u96 | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_u96_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 1062 of file ltkc_xmltextencode.c.
| static void put_utf8v | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const llrp_utf8v_t | Value, | ||
| const LLRP_tSFieldDescriptor * | pFieldDescriptor | ||
| ) | [static] |
Definition at line 1081 of file ltkc_xmltextencode.c.
| static void putElement | ( | LLRP_tSXMLTextEncoderStream * | pEncoderStream, |
| const LLRP_tSElement * | pElement | ||
| ) | [static] |
Definition at line 1309 of file ltkc_xmltextencode.c.
| static void putOptionalSubParameter | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const LLRP_tSParameter * | pParameter, | ||
| const LLRP_tSTypeDescriptor * | pRefType | ||
| ) | [static] |
Definition at line 446 of file ltkc_xmltextencode.c.
| static void putOptionalSubParameterList | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const LLRP_tSParameter * | pParameterList, | ||
| const LLRP_tSTypeDescriptor * | pRefType | ||
| ) | [static] |
Definition at line 484 of file ltkc_xmltextencode.c.
| static void putRequiredSubParameter | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const LLRP_tSParameter * | pParameter, | ||
| const LLRP_tSTypeDescriptor * | pRefType | ||
| ) | [static] |
Definition at line 427 of file ltkc_xmltextencode.c.
| static void putRequiredSubParameterList | ( | LLRP_tSEncoderStream * | pBaseEncoderStream, |
| const LLRP_tSParameter * | pParameterList, | ||
| const LLRP_tSTypeDescriptor * | pRefType | ||
| ) | [static] |
Definition at line 458 of file ltkc_xmltextencode.c.
| static void streamConstruct_nested | ( | LLRP_tSXMLTextEncoderStream * | pEncoderStream, |
| LLRP_tSXMLTextEncoderStream * | pEnclosingEncoderStream | ||
| ) | [static] |
Definition at line 1288 of file ltkc_xmltextencode.c.
| static void streamConstruct_outermost | ( | LLRP_tSXMLTextEncoderStream * | pEncoderStream, |
| LLRP_tSXMLTextEncoder * | pEncoder | ||
| ) | [static] |
Definition at line 1272 of file ltkc_xmltextencode.c.
LLRP_tSEncoderOps s_XMLTextEncoderOps [static] |
{
.pfDestruct = encoderDestruct,
.pfEncodeElement = encodeElement,
}
Definition at line 321 of file ltkc_xmltextencode.c.
Definition at line 328 of file ltkc_xmltextencode.c.