📄 grs_warning_module.h
字号:
#ifndef __grs_warning_module_h__
#define __grs_warning_module_h__
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <time.h>
#include <sys/types.h>
#include <unistd.h>
#ifdef __cplusplus //__cplusplus
extern "C" {
#endif
/*Logfile path:
/var/local/sms_warning.log for sms,
/var/local/mail_warning.log for email.
*/
/*The structure's values depend on the GSM device
com_device the device name of the GSM moderm,you can find it in the /dev/ directory!
baud_rate the moderm's baud rate,such as 115200,38400,19200 etc.
databits 8 or 7 it depends on your GSM moderm
parity odd ,Even or None parity ,
n,N none parity checking
o,O odd checking
e,E even checking
s,S Space checking
stopbits 1 or 2
*/
typedef struct com_attr{
char com_device[32];
int baud_rate;
int databits;
char parity;
int stopbits;
}com_attr_t;
/*all function if successful, return value ==0,else -1 */
int send_sms(const char* smsc, const char* phone, const char* msg,const com_attr_t * ca);
int send_email(const char* server, const char * name, const char * passwd,
const char* from, const char * to, const char * cc,
const char * subject, const char * context);
#ifdef __cplusplus
}
#endif //__cplusplus
#endif // __grs_warning_module_h__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -