Mercury API - load save configuration implementation. More...
#include <string.h>
#include <stdio.h>
#include <inttypes.h>
#include <ctype.h>
#include <stdlib.h>
#include <libgen.h>
#include "tm_reader.h"
#include "tmr_utils.h"
#include "serial_reader_imp.h"
Go to the source code of this file.
Classes | |
struct | properties |
Defines | |
#define | CONFIG_MAX_BUFFER_LEN 1500 |
#define | CONFIG_MAX_PARAMETERS_LEN 100 |
Typedefs | |
typedef enum paramOption | paramOption |
typedef struct properties | properties |
Enumerations | |
enum | paramOption { PARAM_OPTION_GET = 0x00, PARAM_OPTION_SET = 0x01 } |
Functions | |
static TMR_Status | getSetOneParam (struct TMR_Reader *reader, const char *paramName, TMR_String *string, paramOption option) |
static TMR_Status | isParamWritable (TMR_Param key) |
static int | listid (const char *list[], int listlen, const char *name) |
const char * | listname (const char *list[], int listlen, unsigned int id) |
static TMR_Status | loadConfiguration (struct TMR_Reader *reader, char *filePath, properties *dict, uint8_t noOfEntries, bool isRollBack) |
static void | logErrorMessage (struct TMR_Reader *reader, char *errorString) |
static int | parseEpc (const char *arg, TMR_TagData *tag, int *nchars) |
static int | parseFilter (const char *arg, TMR_TagFilter **filterp, int *nchars) |
static int | parsePortValueList (const char *arg, TMR_PortValueList *list, int *nchars) |
static int | parseReadPlan (const char *arg, TMR_ReadPlan *plan, int *nchars) |
static int | parseStats (char *string, TMR_Reader_StatsFlag *stats) |
static int | parseTagop (const char *arg, TMR_TagOp **tagopp, int *nchars) |
static int | parseU32List (const char *arg, TMR_uint32List *list, int *nchars) |
static int | parseU8List (const char *arg, TMR_uint8List *list, int *nchars) |
static void | printFilter (TMR_String *string, TMR_TagFilter *filter) |
static void | printPortValueList (TMR_String *string, TMR_PortValueList *list) |
static void | printReaderStats (const char *string, TMR_Reader_StatsFlag *stats) |
static void | printReadPlan (const char *string, TMR_ReadPlan *plan, int *nchars) |
static void | printTagop (TMR_String *string, TMR_TagOp *tagop) |
static void | printU32List (TMR_String *string, TMR_uint32List *list) |
static void | printU8List (TMR_String *string, TMR_uint8List *list) |
static TMR_Status | readLine (FILE *fp, char *buffer) |
static TMR_Region | regionID (const char *name) |
static const char * | regionName (TMR_Region region) |
static TMR_Status | rollBackConfigData (struct TMR_Reader *reader, char *filePath) |
static bool | strcasecmpcount (const char *a, const char *b, int *matches) |
TMR_Status | TMR_loadConfig (struct TMR_Reader *reader, char *filePath) |
TMR_Status | TMR_saveConfig (struct TMR_Reader *reader, char *filePath) |
Variables | |
static const char * | bankNames [] = {"Reserved", "EPC", "TID", "User"} |
static const char * | gen2LinkFrequencyNames [] = {"LINK250KHZ", "LINK300KHZ", "LINK320KHZ", "LINK40KHZ", "LINK640KHZ"} |
static const char * | gen2ProtocolExtensionNames [] = {"TMR_GEN2_PROTOCOLEXTENSION_LICENSE_NONE", "TMR_GEN2_PROTOCOLEXTENSION_LICENSE_IAV_DENATRAN"} |
static const char * | hexChars = "0123456789abcdefABCDEF" |
static const char * | powerModes [] = {"FULL", "MINSAVE", "MEDSAVE", "MAXSAVE", "SLEEP"} |
static const char * | protocolNames [] |
static const char * | regions [] |
static const char * | selectOptionNames [] = {"EQ", "NE", "GT", "LT"} |
static const char * | sessionNames [] = {"S0", "S1", "S2", "S3"} |
static const char * | tagEncodingNames [] = {"FM0", "M2", "M4", "M8"} |
static const char * | tagopNames [] = {NULL, "ReadData"} |
static const char * | targetNames [] = {"A", "B", "AB", "BA"} |
static const char * | tariNames [] = {"TARI_25US", "TARI_12_5US", "TARI_6_25US"} |
Mercury API - load save configuration implementation.
Definition in file tmr_loadsave_configuration.c.
#define CONFIG_MAX_BUFFER_LEN 1500 |
Definition at line 47 of file tmr_loadsave_configuration.c.
#define CONFIG_MAX_PARAMETERS_LEN 100 |
Definition at line 48 of file tmr_loadsave_configuration.c.
typedef enum paramOption paramOption |
typedef struct properties properties |
enum paramOption |
Definition at line 56 of file tmr_loadsave_configuration.c.
static TMR_Status getSetOneParam | ( | struct TMR_Reader * | reader, |
const char * | paramName, | ||
TMR_String * | string, | ||
paramOption | option | ||
) | [static] |
Definition at line 1297 of file tmr_loadsave_configuration.c.
static TMR_Status isParamWritable | ( | TMR_Param | key | ) | [static] |
Definition at line 252 of file tmr_loadsave_configuration.c.
static int listid | ( | const char * | list[], |
int | listlen, | ||
const char * | name | ||
) | [static] |
const char* listname | ( | const char * | list[], |
int | listlen, | ||
unsigned int | id | ||
) |
Definition at line 172 of file tmr_loadsave_configuration.c.
static TMR_Status loadConfiguration | ( | struct TMR_Reader * | reader, |
char * | filePath, | ||
properties * | dict, | ||
uint8_t | noOfEntries, | ||
bool | isRollBack | ||
) | [static] |
Definition at line 2213 of file tmr_loadsave_configuration.c.
static void logErrorMessage | ( | struct TMR_Reader * | reader, |
char * | errorString | ||
) | [static] |
Definition at line 104 of file tmr_loadsave_configuration.c.
static int parseEpc | ( | const char * | arg, |
TMR_TagData * | tag, | ||
int * | nchars | ||
) | [static] |
static int parseFilter | ( | const char * | arg, |
TMR_TagFilter ** | filterp, | ||
int * | nchars | ||
) | [static] |
static int parsePortValueList | ( | const char * | arg, |
TMR_PortValueList * | list, | ||
int * | nchars | ||
) | [static] |
Definition at line 772 of file tmr_loadsave_configuration.c.
static int parseReadPlan | ( | const char * | arg, |
TMR_ReadPlan * | plan, | ||
int * | nchars | ||
) | [static] |
static int parseStats | ( | char * | string, |
TMR_Reader_StatsFlag * | stats | ||
) | [static] |
Definition at line 933 of file tmr_loadsave_configuration.c.
static int parseTagop | ( | const char * | arg, |
TMR_TagOp ** | tagopp, | ||
int * | nchars | ||
) | [static] |
static int parseU32List | ( | const char * | arg, |
TMR_uint32List * | list, | ||
int * | nchars | ||
) | [static] |
static int parseU8List | ( | const char * | arg, |
TMR_uint8List * | list, | ||
int * | nchars | ||
) | [static] |
static void printFilter | ( | TMR_String * | string, |
TMR_TagFilter * | filter | ||
) | [static] |
Definition at line 874 of file tmr_loadsave_configuration.c.
static void printPortValueList | ( | TMR_String * | string, |
TMR_PortValueList * | list | ||
) | [static] |
Definition at line 854 of file tmr_loadsave_configuration.c.
static void printReaderStats | ( | const char * | string, |
TMR_Reader_StatsFlag * | stats | ||
) | [static] |
Definition at line 1243 of file tmr_loadsave_configuration.c.
static void printReadPlan | ( | const char * | string, |
TMR_ReadPlan * | plan, | ||
int * | nchars | ||
) | [static] |
Definition at line 1197 of file tmr_loadsave_configuration.c.
static void printTagop | ( | TMR_String * | string, |
TMR_TagOp * | tagop | ||
) | [static] |
Definition at line 906 of file tmr_loadsave_configuration.c.
static void printU32List | ( | TMR_String * | string, |
TMR_uint32List * | list | ||
) | [static] |
Definition at line 835 of file tmr_loadsave_configuration.c.
static void printU8List | ( | TMR_String * | string, |
TMR_uint8List * | list | ||
) | [static] |
Definition at line 816 of file tmr_loadsave_configuration.c.
static TMR_Status readLine | ( | FILE * | fp, |
char * | buffer | ||
) | [static] |
Definition at line 203 of file tmr_loadsave_configuration.c.
static TMR_Region regionID | ( | const char * | name | ) | [static] |
Definition at line 190 of file tmr_loadsave_configuration.c.
static const char * regionName | ( | TMR_Region | region | ) | [static] |
Definition at line 181 of file tmr_loadsave_configuration.c.
static TMR_Status rollBackConfigData | ( | struct TMR_Reader * | reader, |
char * | filePath | ||
) | [static] |
Definition at line 2124 of file tmr_loadsave_configuration.c.
static bool strcasecmpcount | ( | const char * | a, |
const char * | b, | ||
int * | matches | ||
) | [static] |
Definition at line 119 of file tmr_loadsave_configuration.c.
Definition at line 76 of file tmr_loadsave_configuration.c.
const char* gen2LinkFrequencyNames[] = {"LINK250KHZ", "LINK300KHZ", "LINK320KHZ", "LINK40KHZ", "LINK640KHZ"} [static] |
Definition at line 72 of file tmr_loadsave_configuration.c.
const char* gen2ProtocolExtensionNames[] = {"TMR_GEN2_PROTOCOLEXTENSION_LICENSE_NONE", "TMR_GEN2_PROTOCOLEXTENSION_LICENSE_IAV_DENATRAN"} [static] |
Definition at line 73 of file tmr_loadsave_configuration.c.
const char* hexChars = "0123456789abcdefABCDEF" [static] |
Definition at line 63 of file tmr_loadsave_configuration.c.
const char* powerModes[] = {"FULL", "MINSAVE", "MEDSAVE", "MAXSAVE", "SLEEP"} [static] |
Definition at line 67 of file tmr_loadsave_configuration.c.
const char* protocolNames[] [static] |
{NULL, NULL, NULL, "ISO180006B", NULL, "GEN2", "ISO180006B_UCODE", "IPX64", "IPX256"}
Definition at line 74 of file tmr_loadsave_configuration.c.
const char* regions[] [static] |
{"UNSPEC", "NA", "EU", "KR", "IN", "JP", "PRC", "EU2", "EU3", "KR2", "PRC2", "AU", "NZ", "NA2", "NA3", "IS"}
Definition at line 65 of file tmr_loadsave_configuration.c.
const char* selectOptionNames[] = {"EQ", "NE", "GT", "LT"} [static] |
Definition at line 64 of file tmr_loadsave_configuration.c.
const char* sessionNames[] = {"S0", "S1", "S2", "S3"} [static] |
Definition at line 69 of file tmr_loadsave_configuration.c.
const char* tagEncodingNames[] = {"FM0", "M2", "M4", "M8"} [static] |
Definition at line 68 of file tmr_loadsave_configuration.c.
const char* tagopNames[] = {NULL, "ReadData"} [static] |
Definition at line 77 of file tmr_loadsave_configuration.c.
const char* targetNames[] = {"A", "B", "AB", "BA"} [static] |
Definition at line 70 of file tmr_loadsave_configuration.c.
const char* tariNames[] = {"TARI_25US", "TARI_12_5US", "TARI_6_25US"} [static] |
Definition at line 71 of file tmr_loadsave_configuration.c.