#ifndef EXTERNINTERFACE_H
|
#define EXTERNINTERFACE_H
|
|
//这个类用在做SCPI命令的语法分析,会将词法匹配的结果返回给SCPI库
|
#ifdef __cplusplus
|
extern "C"
|
{
|
#endif
|
typedef struct
|
{
|
int is_required;
|
int is_variable;
|
int is_nested;
|
int variableSize;
|
char** options;
|
int options_count;
|
} CSegment;
|
|
typedef struct
|
{
|
CSegment* segments;
|
int segments_count;
|
} CPatternResult;
|
|
static CPatternResult *GetInstance();
|
|
int match_segments_global(const char* input, int pattern_index);
|
void parse_pattern_global(const char* pattern);
|
int get_pattern_count();
|
void clear_global_patterns();
|
|
|
#ifdef __cplusplus
|
}
|
#endif
|
|
#endif // EXTERNINTERFACE_H
|