#include "caerr.h"
#include <stdio.h>
/* copied from access.cpp */
const char * ca_message_text []
=
{
"Normal successful completion",
"Maximum simultaneous IOC connections exceeded",
"Unknown internet host",
"Unknown internet service",
"Unable to allocate a new socket",
"Unable to connect to internet host or service",
"Unable to allocate additional dynamic memory",
"Unknown IO channel",
"Record field specified inappropriate for channel specified",
"The requested data transfer is greater than available memory or EPICS_CA_MAX_ARRAY_BYTES",
"User specified timeout on IO operation expired",
"Sorry, that feature is planned but not supported at this time",
"The supplied string is unusually large",
"The request was ignored because the specified channel is disconnected",
"The data type specifed is invalid",
"Remote Channel not found",
"Unable to locate all user specified channels",
"Channel Access Internal Failure",
"The requested local DB operation failed",
"Channel read request failed",
"Channel write request failed",
"Channel subscription request failed",
"Invalid element count requested",
"Invalid string",
"Virtual circuit disconnect",
"Identical process variable names on multiple servers",
"Request inappropriate within subscription (monitor) update callback",
"Database value get for that channel failed during channel search",
"Unable to initialize without the vxWorks VX_FP_TASK task option set",
"Event queue overflow has prevented first pass event after event add",
"Bad event subscription (monitor) identifier",
"Remote channel has new network address",
"New or resumed network connection",
"Specified task isnt a member of a CA context",
"Attempt to use defunct CA feature failed",
"The supplied string is empty",
"Unable to spawn the CA repeater thread- auto reconnect will fail",
"No channel id match for search reply- search reply ignored",
"Reseting dead connection- will try to reconnect",
"Server (IOC) has fallen behind or is not responding- still waiting",
"No internet interface with broadcast available",
"Invalid event selection mask",
"IO operations have completed",
"IO operations are in progress",
"Invalid synchronous group identifier",
"Put callback timed out",
"Read access denied",
"Write access denied",
"Requested feature is no longer supported",
"Empty PV search address list",
"No reasonable data conversion between client and server types",
"Invalid channel identifier",
"Invalid function pointer",
"Thread is already attached to a client context",
"Not supported by attached service",
"User destroyed channel",
"Invalid channel priority",
"Preemptive callback not enabled - additional threads may not join context",
"Client's protocol revision does not support transfers exceeding 16k bytes",
"Virtual circuit connection sequence aborted",
"Virtual circuit unresponsive"
};
#define gen(name,val) printf("class %s(caError):\n __doc__=_caErrorMsg[%d]\n __errcode__=%d\n\nErrCode2Class[%3$d]=%1$s\n\n",name,CA_EXTRACT_MSG_NO(val),val);
main(void){
long i=0;
printf("from ca import _ca\n");
printf("class caError(_ca.error):\n");
printf(" \"\"\" EPICS ca.py Errors\"\"\"\n pass\n\n");
printf("__caErrorMsg=(\n");
for(i=0;i<sizeof(ca_message_text)/sizeof(char *); i++){
printf("\"%s\",\n",ca_message_text[i]);
}
printf(")\n");
printf("_caErrorMsg=map(intern,__caErrorMsg)\n\n");
printf("ErrCode2Class={}\n");
printf("class PyCa_NoCallback(caError):\n __doc__=\"Null callback routine\"\n");
printf("CA_M_MSG_NO = 0x0000FFF8\n");
printf("CA_M_SEVERITY = 0x00000007\n");
printf("CA_M_LEVEL = 0x00000003\n");
printf("CA_M_SUCCESS = 0x00000001\n");
printf("CA_M_ERROR = 0x00000002\n");
printf("CA_M_SEVERE = 0x00000004\n");
printf("CA_S_MSG_NO= 0x0D\n");
printf("CA_S_SEVERITY=0x03\n");
printf("CA_V_MSG_NO= 0x03\n");
printf("CA_V_SEVERITY= 0x00\n");
printf("CA_V_SUCCESS= 0x00\n\n");
printf("def CA_EXTRACT_MSG_NO(code): return ( ( (code) & CA_M_MSG_NO ) >> CA_V_MSG_NO )\n");
printf("def CA_EXTRACT_SEVERITY(code): return ( ( (code) & CA_M_SEVERITY ) >> CA_V_SEVERITY) \n" );
printf("def CA_EXTRACT_SUCCESS(code): ( ( (code) & CA_M_SUCCESS ) >> CA_V_SUCCESS )\n\n");
gen("ECA_NORMAL",ECA_NORMAL);
gen("ECA_MAXIOC",ECA_MAXIOC);
gen("ECA_UKNHOST",ECA_UKNHOST);
gen("ECA_UKNSERV",ECA_UKNSERV);
gen("ECA_SOCK",ECA_SOCK);
gen("ECA_CONN",ECA_CONN);
gen("ECA_ALLOCMEM",ECA_ALLOCMEM);
gen("ECA_UKNCHAN",ECA_UKNCHAN);
gen("ECA_UKNFIELD",ECA_UKNFIELD);
gen("ECA_TOLARGE",ECA_TOLARGE);
gen("ECA_TIMEOUT",ECA_TIMEOUT);
gen("ECA_NOSUPPORT",ECA_NOSUPPORT);
gen("ECA_STRTOBIG",ECA_STRTOBIG);
gen("ECA_DISCONNCHID",ECA_DISCONNCHID);
gen("ECA_BADTYPE",ECA_BADTYPE);
gen("ECA_CHIDNOTFND",ECA_CHIDNOTFND);
gen("ECA_CHIDRETRY",ECA_CHIDRETRY);
gen("ECA_INTERNAL",ECA_INTERNAL);
gen("ECA_DBLCLFAIL",ECA_DBLCLFAIL);
gen("ECA_GETFAIL",ECA_GETFAIL);
gen("ECA_PUTFAIL",ECA_PUTFAIL);
gen("ECA_ADDFAIL",ECA_ADDFAIL);
gen("ECA_BADCOUNT",ECA_BADCOUNT);
gen("ECA_BADSTR",ECA_BADSTR);
gen("ECA_DISCONN",ECA_DISCONN);
gen("ECA_DBLCHNL",ECA_DBLCHNL);
gen("ECA_EVDISALLOW",ECA_EVDISALLOW);
gen("ECA_BUILDGET",ECA_BUILDGET);
gen("ECA_NEEDSFP",ECA_NEEDSFP);
gen("ECA_OVEVFAIL",ECA_OVEVFAIL);
gen("ECA_BADMONID",ECA_BADMONID);
gen("ECA_NEWADDR",ECA_NEWADDR);
gen("ECA_NEWCONN",ECA_NEWCONN);
gen("ECA_NOCACTX",ECA_NOCACTX);
gen("ECA_DEFUNCT",ECA_DEFUNCT);
gen("ECA_EMPTYSTR",ECA_EMPTYSTR);
gen("ECA_NOREPEATER",ECA_NOREPEATER);
gen("ECA_NOCHANMSG",ECA_NOCHANMSG);
gen("ECA_DLCKREST",ECA_DLCKREST);
gen("ECA_SERVBEHIND",ECA_SERVBEHIND);
gen("ECA_NOCAST",ECA_NOCAST);
gen("ECA_BADMASK",ECA_BADMASK);
gen("ECA_IODONE",ECA_IODONE);
gen("ECA_IOINPROGRESS",ECA_IOINPROGRESS);
gen("ECA_BADSYNCGRP",ECA_BADSYNCGRP);
gen("ECA_PUTCBINPROG",ECA_PUTCBINPROG);
gen("ECA_NORDACCESS",ECA_NORDACCESS);
gen("ECA_NOWTACCESS",ECA_NOWTACCESS);
gen("ECA_ANACHRONISM",ECA_ANACHRONISM);
gen("ECA_NOSEARCHADDR",ECA_NOSEARCHADDR);
gen("ECA_NOCONVERT",ECA_NOCONVERT);
gen("ECA_BADCHID",ECA_BADCHID);
gen("ECA_BADFUNCPTR",ECA_BADFUNCPTR);
gen("ECA_ISATTACHED",ECA_ISATTACHED);
gen("ECA_UNAVAILINSERV",ECA_UNAVAILINSERV);
gen("ECA_CHANDESTROY",ECA_CHANDESTROY);
gen("ECA_BADPRIORITY",ECA_BADPRIORITY);
gen("ECA_NOTTHREADED",ECA_NOTTHREADED);
gen("ECA_16KARRAYCLIENT", ECA_16KARRAYCLIENT) ;
gen("ECA_CONNSEQTMO",ECA_CONNSEQTMO);
gen("ECA_UNRESPTMO",ECA_UNRESPTMO);
}
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共80个文件
py:65个
db:4个
cpp:2个
资源分类:Python库 所属语言:Python 资源全名:PythonCA-1.22.3.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
PythonCA-1.22.3.tar.gz (80个子文件)
PythonCA-1.22.3
MANIFEST.in 433B
PKG-INFO 583B
foo.py 97B
WFmemleakCheck.py 1KB
EPICS_config_Darwin.pyc 1KB
EPICS_config.py 614B
Numeric.py 31B
gen_caerrpy.c 7KB
_ca_fnal.py 1KB
EPICS_config_Win32.py 29B
caerr.py 2KB
test
excas.substitutions 529B
WFmemleakCheck.py 2KB
excasw.db 277B
testPythonCA.py 955B
testTemplate.py 393B
st.cmd 255B
test.db 1KB
excas.db 2KB
randomTest.py 842B
sample
TkRandom.py 4KB
TkSample1.1.py 4KB
caBadSampleChannels.py 6KB
CaSimple_usingQueue.py 4KB
tamura.py 2KB
WxSimple2.py 3KB
WxSample1.py 4KB
ezca.py 771B
tamura2.py 3KB
caBadSample2.py 1KB
ex_tk4.py 3KB
simplecb2.py 1KB
WxSimple.py 3KB
TkSample2.py 3KB
QtSample1.py 4KB
caBadSampleThreadLock.py 2KB
TkRandom2.py 3KB
TkTest.py 233B
fakeca.py 1KB
WxRandom.py 4KB
caBadSample3.py 736B
WxMinimal.py 2KB
CaSimple.py 8KB
thread_testC.py 4KB
TkMinimal.py 2KB
__init__.py 0B
thread_test.py 4KB
epicsQt.py 950B
DummySimple.py 4KB
fd_register_example.py 785B
simplecb.py 832B
thread_test2.py 4KB
thread_test3.py 4KB
ex_tk4n.py 3KB
thread_test2C.py 4KB
WxSample2.py 5KB
fd_reg_test.py 973B
caAlarmSeverity.py 1KB
t5ca.py 1KB
TkSample1.py 4KB
TkSample3.py 3KB
TkSimple2.py 2KB
_ca_kek.py 16KB
test.db 828B
caError.py 10KB
cas
cas.py 6KB
xca.py 8KB
printfn.py 269B
README 520B
EPICS_config_Linux.py 435B
setup.cfg 28B
CaChannel.py 24KB
generate_caError.py 291B
doc
InstallationMemo.html 2KB
setup.py 6KB
_ca314.cpp 65KB
cadefs.py 4KB
ca.py 2KB
EPICS_config_Darwin.py 1KB
_conv_helper.cpp 15KB
共 80 条
- 1
资源评论
- 朱文贞2022-05-13用户下载后在一定时间内未进行评价,系统默认好评。
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功