天嵌二次封装库使用手册  V2.1.2
lib_gsm_module_setting.h
浏览该文件的文档.
1 
7 #ifndef LINUX_LIBV2_SOURCE_GSM_LIB_GSM_MODULE_SETTING_H_
8 #define LINUX_LIBV2_SOURCE_GSM_LIB_GSM_MODULE_SETTING_H_
9 
10 #include <stdint.h>
11 #include <stdio.h>
12 #include <stdlib.h>
13 #include <string.h>
14 
15 typedef struct COMMAND_NODE
16 {
17  char *command;
18  char *pattern;
19  struct COMMAND_NODE *next;
20  struct COMMAND_NODE *prev;
21 } CommandNode;
22 typedef struct
23 {
24  int count;
27 } CommandList;
28 typedef struct
29 {
36 } CommandGroup;
37 typedef struct MODULE_SETTING_NODE
38 {
39  char vid[5];
40  char pid[5];
41  int nodeNET;
42  int nodeMODEM;
43  int nodeAT;
48 typedef struct
49 {
50  int count;
54 #ifdef __cplusplus
55 extern "C"
56 {
57 #endif
58  CommandNode *CreateCommandNode(const char *const command, const char *const pattern);
59  void FreeCommandNode(CommandNode *const node);
60 
61  void CommandListPushFront(CommandList *const list, CommandNode *const node);
62  void CommandListPushBack(CommandList *const list, CommandNode *const node);
63  void CommandListPopBack(CommandList *const list);
64  void CommandListPopFront(CommandList *const list);
65  CommandNode *GetCommandNode(const CommandList *const list, int index);
66  int InsertCommandNode(CommandList *const list, int index, CommandNode *const insertNode);
67  int RemoveCommandNode(CommandList *const list, int index);
68  void FreeCommandList(CommandList *const list);
69 
70  ModuleSettingNode *CreateModuleSettingNode(const char *const vid, const char *const pid,
71  int nodeNET, int nodeMODEM, int nodeAT);
72  void FreeModuleSettingNode(ModuleSettingNode *const node);
73 
74  void ModuleSettingListPushFront(ModuleSettingList *const list, ModuleSettingNode *const moduleSettingNode);
75  void ModuleSettingListPushBack(ModuleSettingList *const list, ModuleSettingNode *const moduleSettingNode);
78  ModuleSettingNode *GetModuleSettingNode(const ModuleSettingList *const list, int index);
79  int InsertModuleSettingNode(ModuleSettingList *const list, int index, ModuleSettingNode *const moduleSettingNode);
80  int RemoveModuleSettingNode(ModuleSettingList *const list, int index);
81  void FreeModuleSettingList(ModuleSettingList *const list);
82 
85  int SaveGSMConfig(const ModuleSettingList *const list);
86 #ifdef __cplusplus
87 }
88 #endif
89 #endif // LINUX_LIBV2_SOURCE_GSM_LIB_GSM_MODULE_SETTING_H_
int SaveGSMConfig(const ModuleSettingList *const list)
void CommandListPushFront(CommandList *const list, CommandNode *const node)
ModuleSettingNode * tail
int RemoveModuleSettingNode(ModuleSettingList *const list, int index)
struct COMMAND_NODE * prev
struct COMMAND_NODE CommandNode
void CommandListPushBack(CommandList *const list, CommandNode *const node)
void ModuleSettingListPopBack(ModuleSettingList *const list)
CommandNode * checkConnect
int InsertModuleSettingNode(ModuleSettingList *const list, int index, ModuleSettingNode *const moduleSettingNode)
CommandNode * CreateCommandNode(const char *const command, const char *const pattern)
void FreeCommandList(CommandList *const list)
ModuleSettingList * CreateDefaultModuleSettingList()
void ModuleSettingListPopFront(ModuleSettingList *const list)
struct MODULE_SETTING_NODE * next
CommandNode * head
CommandNode * changeDriver
void ModuleSettingListPushFront(ModuleSettingList *const list, ModuleSettingNode *const moduleSettingNode)
ModuleSettingList * GetGSMConfig()
struct COMMAND_NODE * next
void FreeModuleSettingList(ModuleSettingList *const list)
CommandNode * restart
CommandNode * disconnect
ModuleSettingNode * CreateModuleSettingNode(const char *const vid, const char *const pid, int nodeNET, int nodeMODEM, int nodeAT)
void CommandListPopBack(CommandList *const list)
CommandNode * GetCommandNode(const CommandList *const list, int index)
ModuleSettingNode * GetModuleSettingNode(const ModuleSettingList *const list, int index)
struct MODULE_SETTING_NODE ModuleSettingNode
CommandNode * getDriver
struct MODULE_SETTING_NODE * prev
ModuleSettingNode * head
void ModuleSettingListPushBack(ModuleSettingList *const list, ModuleSettingNode *const moduleSettingNode)
CommandNode * tail
void FreeCommandNode(CommandNode *const node)
int InsertCommandNode(CommandList *const list, int index, CommandNode *const insertNode)
void FreeModuleSettingNode(ModuleSettingNode *const node)
void CommandListPopFront(CommandList *const list)
int RemoveCommandNode(CommandList *const list, int index)