You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
2.0 KiB
C
80 lines
2.0 KiB
C
#ifndef __BAOHU_A_H_H_ICL__
|
|
#define __BAOHU_A_H_H_ICL__
|
|
|
|
#include "common.h"
|
|
|
|
// 设备信息定义
|
|
#define DEVIVE_NAME "CAC-SERVER"
|
|
#define VERSION "V1.00"
|
|
#define VERSION_DATE "2023-11-10"
|
|
#define MANUFACTURER "Global CAC"
|
|
|
|
extern SIO_PARAM_DEF SioParam[];
|
|
|
|
extern FUNCTION_CALL *FunCallPtr;
|
|
|
|
extern u_short MaxSerialPortNum;
|
|
extern u_short MaxNetPortNum;
|
|
extern u_short MaxPortNum;
|
|
|
|
extern void *pvconf_handle;
|
|
extern void *pvportconf_handle;
|
|
extern void *pvdataconf_handle;
|
|
extern char pvDataFileName[256];
|
|
|
|
extern char DeviceName[];
|
|
extern char Version[];
|
|
extern char VersionDate[];
|
|
extern char Manufacturer[];
|
|
extern char IniFilePath[256];
|
|
|
|
extern DAY_TIME DayTime;
|
|
|
|
void ByPassRecvData( int commid, u_char *buf, int len );
|
|
void WatchPortRecvData( void );
|
|
|
|
// 从 config.ini 或 portconfig.ini 读信息
|
|
u_long GetPrivateProString( char * section, char * entry, char * deflautstr, char * reslut,int len, char *inifile );
|
|
|
|
u_long atoul( u_char *buf );
|
|
|
|
int SetPntMsg( int port, int point, void *pntmsg, BYTE type, BYTE attr );
|
|
int GetPntMsg( int port, int point, void *pntmsg, BYTE type, BYTE attr );
|
|
int SetPorvPntMsg( int port, int point, void *pntmsg, BYTE type, BYTE attr );
|
|
int GetPorvPntMsg( int port, int point, void *pntmsg, BYTE type );
|
|
|
|
int CheckPollCmdBufEmpty( int port );
|
|
int PutPollCmdToBuf( int port, int type, WORD wait, char *buf, int len );
|
|
|
|
void PortMemeryMalloc( int port, int type );
|
|
|
|
void YkYtCommandProcess( int port, u_char *buf, int len );
|
|
|
|
|
|
// 读设备信息,检查芯片状态和读芯片类型和频率
|
|
void ReadPortConfigInfo( u_short netport );
|
|
|
|
#ifdef OS_WINDOWS
|
|
void DataDisp( HWND );
|
|
#endif
|
|
|
|
void CloseUdpSetSock( void );
|
|
void PageUp( void );
|
|
void PageDown( void );
|
|
void PageHome( void );
|
|
void PageEnd( void );
|
|
void LineUp( void );
|
|
void LineDown( void );
|
|
|
|
void OpenAllPort( void );
|
|
void CloseOnePort( int commid );
|
|
void CloseAllPort( void );
|
|
void PollAllSerialPort( void );
|
|
void PollAllNetPort( void );
|
|
|
|
void TimerProc( void );
|
|
void SystemRtuTime( void );
|
|
|
|
#endif
|
|
|