LTKCPP-- LLRP Toolkit C Plus Plus Library
Macros | Functions | Variables
xml2llrp.cpp File Reference

Converts a directory of LTK-XML message files to LLRP Binary. More...

#include <stdio.h>
#include "ltkcpp.h"
#include "Impinj/impinj_ltkcpp.h"
#include "Impinj/impinjinternal_ltkcpp.h"
#include "dirent.h"
#include "sys/stat.h"
#include "libxml/parser.h"

Go to the source code of this file.

Macros

#define MAX_PATH_LEN   (256)
 

Functions

void convertFile (char *ifile, char *ofile)
 
void convertDirEntry (char *idir, char *odir, struct dirent *ep)
 
int main (int ac, char *av[])
 

Variables

CTypeRegistrypTypeRegistry
 
unsigned char errMsgBinary [18]
 
char pathSeparator = '/'
 

Detailed Description

Converts a directory of LTK-XML message files to LLRP Binary.

This is diagnostic 01 for the LLRP Tool Kit for C++ (LTKCPP).

xml2llrp reads all the .xml files from a directory passed on the command line and coverts them all to .bin LLRP files in the specified output directory. For each input frame:

This program can be tested using tools like valgrind (please see http://en.wikipedia.org/wiki/Valgrind) that detect memory leaks.

Definition in file xml2llrp.cpp.

Function Documentation

void convertFile ( char *  ifile,
char *  ofile 
)

Converts a file in LTK-XML format to a file in LLRP Binary format and writes to the output file string. ifile – a string containing the path and file name of the input LTK-XML file ofile – a string containing the path and file name of the output LLRP Binary file

Returns
– nothing

Definition at line 77 of file xml2llrp.cpp.

References LLRP::enrollImpinjTypesIntoRegistry(), LLRP::CErrorDetails::m_eResultCode, LLRP::CTypeDescriptor::m_pName, LLRP::CFieldDescriptor::m_pName, LLRP::CErrorDetails::m_pRefField, LLRP::CErrorDetails::m_pRefType, LLRP::CErrorDetails::m_pWhatStr, main(), and LLRP::RC_OK.

Variable Documentation

unsigned char errMsgBinary[18]
Initial value:
= {0x04, 0x64, 0x00, 0x00,
0x00, 0x12, 0x00, 0x00,
0x00, 0x00, 0x01, 0x1F,
0x00, 0x08, 0x00, 0x00,
0x00, 0x00}

Definition at line 56 of file xml2llrp.cpp.