;CVM脚本的内置函数配置文件
;以空格或TAB键分段,返回类型用<>括起来，分号之后为注释,参数只写类型
;ID	<返回值> 函数名(参数1,参数2);

;杂类--------------------------------------------
50  <long>   	RGB(int, int, int);
51	<void>		WinExec(char*); 执行外部程序

;数学计算----------------------------------------
100	<int>		abs(int);
101	<double>	acos(double);
102	<double>	asin(double);
103	<double>	atan(double);
104	<double> 	cos(double);
105	<double> 	exp(double);
106	<double> 	fabs(double);
107	<double> 	fmod(double,double);
108	<long>	 	labs(long);
109	<double> 	log(double);
110 <double> 	log10(double);
111	<double> 	pow(double,double);
112	<double> 	sin(double);
113	<double> 	tan(double);
114	<double> 	sqrt(double);
115	<double> 	ceil(double);
116	<double> 	floor(double);
117	<double> 	atof(char*);
118	<long>   	atol(char*);

;字符串处理--------------------------------------
150	<char*> 	strcat(char*, char*);
151	<int>   	strcmp(char*, char*);
152	<char*> 	strcpy(char*, char*);
153	<int>   	stricmp(char*, char*);
154	<int>   	strlen(char*);
155	<char*> 	strlwr(char*);
156	<int>   	strncmp(char*, char*, int);
157	<char*> 	strncpy(char*, char*, int);
158	<char*> 	strstr(char*, char*);
159	<char*> 	strtok(char*, char*);
160	<char*> 	strupr(char*);

;格式输出----------------------------------------
200	<int>   	sprintf(char*, char *, ...);不安全格式输出
201	<char*> 	itoa(int, char*, int);
202	<char*> 	ltoa(long, char*, int);
203	<char*> 	gcvt(double , int, char*);		
204	<int>		printf(char*, ...);
205	<int>   	snprintf(char*, int, char *, ...);安全格式输出

;时间函数----------------------------------------
250	<int64>  	time(); GMT时间
251	<int64>  	MakeTime(int, int,int, int, int, int); 
252	<bool>  	GmtTime(int64, int*, int*, int*, int*, int*, int*); 
253	<bool>  	LocalTime(int64, int*, int*, int*, int*, int*, int*);
254	<DWORD>		GetTickCount();
255	<void>		StartCounTime(); 计时结束
256	<double>	EndCounTime(); 计时结束,返回毫秒数

;图形函数----------------------------------------
1050 	<BOOL>		GetViewFlag(char*);
1051 	<BOOL>		SetViewFlag(char*, BOOL);
1052 	<void>		SetViewText(char*, char*);
1053	<bool>		GetCenterPoint(char*,double*,double*);
1054	<bool>		MoveTo(char*,double,double);

;画面函数----------------------------------------
1100 	<void>		OpenPic(char*);
1101 	<void>		OpenPopPic(char*,char*,int,int,int,int);
1102 	<void>		OpenTempletPic(char*,char*);
1103 	<void>		OpenTempletPopPic(char*,char*,char*,int,int,int,int);
1104	<void>		Exit();退出
1105    <void>      OpenBarPic(char*,int,int,int,int);
1106	<void>		GetScreenSize(int*,int*);
1107    <void>		CloseBarPic(char*);

;OCX控件-----------------------------------------
1200 	<bool>  	ocx_GetVal(char*, char*, ...);
1201 	<bool>  	ocx_SetVal(char*, char*, ...);
1202 	<bool>  	ocx_Invoke(char*, char*, ...);

1205 	<bool>  	pin_Invoke(char*, char*, ...);TOM插件接口


;数据处理----------------------------------------

1500 	<bool>  	dbr_GetDbVal(char*, ...); 参数为指针
1501 	<bool>  	dbr_GetLoaclVal(char*, ...); 参数为指针
1502    <int>		dbr_GetLoaclStr(char*,char*,int); 返回字节数
1503    <int>		dbr_GetLoaclBlob(char*,char*,int); 返回字节数

1504	<bool>		dbr_SetLoaclVal(char*,...); 参数为值
1505	<bool>		dbr_SetLoaclStr(char*,char*); 参数为0结束的字符串
1506	<bool>		dbr_SetLoaclBlob(char*,char*,int); 参数为指针和字节数
1507    <int>		dbr_GetDbStr(char*,char*,int); 返回字节数
1508    <int>		dbr_GetDbBlob(char*,char*,int); 返回字节数

1509 	<bool>  	dbr_GetObjVal(char*, ...); 参数为指针
1510    <int>		dbr_GetObjStr(char*,char*,int); 返回字节数
1511    <int>		dbr_GetObjBlob(char*,char*,int); 返回字节数

1512 	<bool>  	dbr_GetObjLoaclVal(char*, ...); 参数为指针
1513    <int>		dbr_GetObjLoaclStr(char*,char*,int); 返回字节数
1514    <int>		dbr_GetObjLoaclBlob(char*,char*,int); 返回字节数

1515	<bool>		dbr_SetObjLoaclVal(char*,...); 参数为值
1516	<bool>		dbr_SetObjLoaclStr(char*,char*); 参数为0结束的字符串
1517	<bool>		dbr_SetObjLoaclBlob(char*,char*,int); 参数为指针和字节数


;控件函数----------------------------------------

1600	<bool>		bt_GetCheck(char*); 取checkbox状态
1601	<void>		bt_SetCheck(char*,bool); 设置checkbox状态
1605	<int>		ed_GetText(char*,char*,int); 取编辑文字,返回取到的字节数
1606	<void>		ed_SetText(char*,char*); 设置编辑文字

1608    <int>       combo_AddString(char*,char*);添加字符串
1609    <void>		combo_DelAll(char*);删除所有
1610    <int>       combo_GetCurSel(char*);获取当前选择index
1611    <int>       combo_GetString(char*,int,char*,int);获取字符串
1612    <int>		combo_SelectString(char*,int,char*);查找并选择，返回>0成功，-1失败
1613    <int>		combo_GetEditText(char*,char*,int);获取编辑框文字，
1614	<void>		combo_SetEditText(char*,char*); 设置编辑文字

1680 	<void>  	EnableWindow(char*, bool);使能控件

;特殊控件----------------------------------------
;2001开头

;控制函数--------------------------------------

2102 <int> db_WriteRealVal(char*,...);
2103 <int> db_WriteRealStr(char*,char*);
2104 <int> db_WriteRealBlob(char*,char*,int);
2105 <int> db_WriteObjRealVal(char*,...);
2106 <int> db_WriteObjRealStr(char*,char*);
2107 <int> db_WriteObjRealBlob(char*,char*,int);
2108 <int> db_DeviceWriteVal(char*,...);写设备标签值
2109 <int> db_DeviceWriteStr(char*,char*);写设备标签字符串
2110 <int> db_DeviceWriteObj(char*,char*,int);写设备标签对象值
2111 <int> db_countvalue(char*,char*,int64,int64,double*,double*,int*);
2112 <int> db_countstatuschang(char*,int64,int64,int,int,int*,int*);
2113 <int> db_countvaltime(char*,char*,int64,int64,int64*,int*);
2114 <int> db_manualset(char*,...);人工置数
2115 <int> db_manualdel(char*);取消人工置数
;结束--------------------------------------------
