nancy.liao
2025-05-26 77a92c3204b95eaf2870605718b9099ab6ece56a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#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;
    char* commandData;
 
} CPatternResult;
 
 
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();
void clearCurrentGroup();
void setCurrentIndex(int index);
 
char* currentPattern();
 
#ifdef __cplusplus
}
#endif
 
#endif // EXTERNINTERFACE_H