⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dtl.h

📁 AB_5000_PLC以太网通讯动态连接库
💻 H
📖 第 1 页 / 共 5 页
字号:
/* vi: set sw=8 ts=8:
 *
 * Copyright 1995 Rockwell Software Inc.
 *
 *  NAME
 *	dtl.h
 *
 *  DESCRIPTION
 *	This file is included by `C' programs which call routines in the
 *	Data Table Library.  It defines the DTL error codes, manifest
 *	constants such as DTL_FOREVER, and function prototypes for all the
 *	DTL routines.
 */
#ifndef __DTL
#define __DTL

#pragma pack(push,1)

/*------------------------------ defines -------------------------------*/

#define LIBPTR
#define LIBMEM		__stdcall
#define DTL_CALLBACK	__stdcall
#define DTL_RETVAL		int

#define	DTL_VERSION_ID	-1	/* print DTL version #	*/
#define	DTL_SUCCESS	 0	/* Operation Successful	*/
#define	DTL_PENDING	 1	/* I/O operation in progress */ 
#define	DTL_E_DEFBAD1	 2	/* Invalid DEFINE string */
#define	DTL_E_DEFBAD2	 3	/* Invalid Number of Elements to DEFINE */
#define	DTL_E_DEFBAD3	 4	/* Invalid Data Type */
#define	DTL_E_DEFBAD4	 5	/* Invalid Access Rights */
#define	DTL_E_DEFBAD5	 6	/* Invalid Module, Pushwheel, or Channel */
#define	DTL_E_DEFBAD6	 7	/* Invalid Remote Station Address */
#define	DTL_E_DEFBAD7	 8	/* Invalid PLC Processor Type */
#define	DTL_E_DEFBADN	 9	/* Invalid Number of DEFINE Parameters */ 
#define	DTL_E_DEFCONF	10	/* Conflicts in DEFINE parameter number 5 */
#define	DTL_E_FULL	11	/* DEFINE Table Full */ 
#define	DTL_E_DEFID	12	/* Loading DEFINE Table ID Conflict */ 
#define	DTL_E_DEFNOF	13	/* DEFINE Input File Error */ 
#define DTL_E_INVALID_DTSA_TYPE	14	/* Invalid DTSA atype member */
#define	DTL_E_R_ONLY	15	/* Data Item is Read Only */ 
#define	DTL_E_INVTYPE	16	/* Data is Invalid Type for Operation */ 
#define	DTL_E_NO_MEM	17	/* Not Enough Memory Available */ 
#define	DTL_E_TIME	18	/* I/O operation did not complete in time */ 
#define	DTL_E_NOINIT	19	/* Define Table Not Initialized */ 
#define	DTL_E_BADID	20	/* Define ID out of range */ 
#define DTL_E_NO_BUFFER 21	/* No buffer space available for I/O */
#define	DTL_E_NOSUPPORT	22	/* PLC Processor Type Not Supported */ 
#define	DTL_E_NOS_TMR	23	/* NOS Timer Error */ 
#define	DTL_E_FAIL	24	/* I/O completed with errors */ 
#define	DTL_E_BADPARAM	25	/* Bad parameter Value */ 
#define	DTL_E_NOPARAM	26	/* Expected parameter is missing */ 
#define	DTL_E_NOATMPT	27	/* I/O Operation Not Attempted */ 
#define DTL_E_NOS_MSG	29	/* NOS Message Packet Error */
#define	DTL_E_TOOBIG	31	/* Data Item is > Max Allowed */
#define	DTL_E_NODEF	32	/* No Such Data Item Defined */
#define	DTL_E_BAD_WAITID	33	/* Wait ID out of range */ 
#define	DTL_E_TOOMANYIO	34	/* Too many pending I/O requests */
#define	DTL_E_NOS_OE_INIT	35	/* NOS Initialization error */ 
#define	DTL_E_NOS_OET_INIT	37	/* NOS Initialization error */ 
#define	DTL_E_DFBADADR	38	/* Bad DEFINE Address */ 
#define	DTL_E_NOREINIT	39	/* DTL System already initialized */ 
#define	DTL_E_INPTOOLONG	40	/* Input string too long */ 
#define	DTL_E_CNVT	41	/* Data Conversion Error */ 
#define	DTL_E_GETIME	42	/* PLC-5/250 time invalid */
#define	DTL_E_SETIME	43	/* VMS error setting time */ 
#define	DTL_E_GETSYM	44	/* Error getting symbol expansion */ 
#define	DTL_E_APPBAD	45	/* Bad application address */
#define	DTL_E_BADNIID	46	/* Invalid Network Interface identifier */
#define	DTL_E_NORECONN	47	/* Network Interface already connected */
#define	DTL_E_IPBAD	48	/* Bad IP address */
#define	DTL_E_SYMBAD	49	/* Symbol expansion invalid */ 
#define	DTL_E_INVDEF	50	/* Invalid use of definition */
#define	DTL_E_UDEFBAD2	51	/* Invalid number of elements */ 
#define	DTL_E_UDEFBAD3	52	/* Invalid host data type keyword */ 
#define	DTL_E_UDEFBAD4	53	/* Invalid PLC data type */ 
#define	DTL_E_UDEFBAD5	54	/* Invalid Network Interface identifier */ 
#define	DTL_E_DEFBAD8	56	/* Invalid Network Interface identifier */
#define	DTL_E_NOTCONNECT	57	/* No connection to Network Interface */
#define	DTL_E_RECVPEND	58	/* Receive operation already pending */
#define	DTL_E_READCNVT	59	/* Conversion error for READ data */
#define	DTL_E_WRITECNVT	60	/* Conversion error for WRITE data */
#define	DTL_E_COMPARE	61	/* Data comparison failure */
#define	DTL_E_CANCELED	63	/* Operation was canceled */
#define	DTL_E_NORECV	64	/* RECEIVE operation is not pending */
#define	DTL_SESSION_LOST	65	/* Session to Network Interface was lost */
#define	DTL_SESSION_ESTAB	66	/* Session to Network Interface is established */
#define	DTL_E_SMALLNFDS	67	/* DTL_SET_FDS nfds parameter is too small */
#define	DTL_E_NOT_SUPPORTED	68	/* Operation not supported */
#define DTL_E_BAD_ADDRESS       69	/* Bad DTSA_TYPE Station Address */
#define DTL_E_BAD_CHANNEL       70	/* Bad DTSA_TYPE Communications Channel */
#define DTL_E_BAD_MODULE     	71	/* Bad DTSA_TYPE Module-type */
#define	DTL_E_NOBOTHREJECT	73	/* Cannot specify DTL_REJECT for both handlers */
#define	DTL_E_ADRSUPPORT	74	/* Address specified is not support by DTL function */
#define DTL_E_BAD_PUSHWHEEL     75	/* Bad DTSA_TYPE Pushwheel */
#define DTL_E_DISCONNECT	76	/* Operation cancelled by DTL_DISCONNECT */
#define DTL_E_MAXCONN		77	/* N.I. cannot support more connections */
#define DTL_E_MISMATCH		78	/* N.I. software revision incompatible */
#define DTL_E_DUPADR		79	/* Duplicate application address */
#define DTL_E_NOTOWNER		80	/* Application address in use by other user */
#define DTL_E_UNDEFINED		81	/* I/O was canceled by DTL_UNDEF */
#define DTL_E_NOTAPLC2		82	/* Access mode reserved for PLC-2s */
#define DTL_E_MEMFORMAT		84	/* Archive file format error */
#define DTL_E_DISK		90	/* Error accessing disk */
#define DTL_E_PLCMISMATCH	96	/* PLC types do not match */
#define DTL_E_VRNA_INIT		97	/* Internal error initializing VRNA.386 */
#define DTL_E_NOCOMPARE		101	/* Compare failed */
#define DTL_E_INVALID_MODE	102	/* PLC has invalid mode for attempted operation */
#define DTL_E_PLCFAULTED	103	/* PLC is faulted */

#define DTL_E_NOCMP		104	/* Compare Utility compare failed */
#define	DTL_I_CMP		105	/* Compare Utility compare success */
#define DTL_E_FAULTS		106	/* Get Faults Utility - found faults */
#define DTL_I_NOFAULTS		107	/* Get Faults Utility - found no faults */
#define DTL_I_RUN		108	/* Sense Mode Utility - run mode */
#define DTL_I_RRUN		109	/* Sense Mode Utility - remote run mode */
#define DTL_I_TEST		110	/* Sense Mode Utility - test mode */
#define DTL_I_RTEST		111	/* Sense Mode Utility - remote test mode */
#define DTL_I_PROGRAM		112	/* Sense Mode Utility - program  mode */
#define DTL_I_RPROGRAM		113	/* Sense Mode Utility - remote program mode */
#define	DTL_E_WM_QUIT		114	/* DLL detected WM_QUIT message */
#define	DTL_E_NOCOPY		115 	/* can't copy PLC image */
#define	DTL_E_COPYWARN		116 	/* can copy image, but with warnings */
#define DTL_E_MODNTCHG		117	/* PLC mode not changed to requested mode  */
#define DTL_E_BAD_DTSA_TYPE	118	/* Illegal DTSA_TYPE Address Type */
#define DTL_E_BAD_FILENAME	119	/* DTSA structure file name is NULL or zero */
#define DTL_E_BAD_FILELENGTH	120	/* DTSA_TYPE File Length is Zero */
#define DTL_E_BAD_FILETYPE	121	/* Invalid DTSA_TYPE File Type */
#define	DTL_E_NO_SERVER			122	/* Server is not loaded */
#define	DTL_E_SERVER_NOT_RUNNING	123	/* Server is not running */
#define DTL_E_BUFFER_TOO_SMALL	124	/* Reply buffer is too small */
#define DTL_E_BAD_MASK		125	/* Bit mask contains illegal bits */
#define DTL_E_NO_HANDLER	126	/* PCCC packet handler is NULL */
#define DTL_E_BAD_OPT		127	/* Invalid option parameter  */
#define DTL_E_BAD_BACKLOG	128	/* Invalid backlog value  */
#define DTL_E_NO_PROGRAM	129	/* Can't find subprogram to execute */
#define DTL_E_BAD_OPTNAME	130	/* Invalid option name parameter  */
#define DTL_E_BAD_OPTVAL	131	/* Invalid option value parameter  */
#define DTL_E_STOPPED		132	/* U/D/C operation terminated by user */
#define DTL_E_GETALL_ACTIVE     133     /* DTL_UNSOL_GETALL already active */
#define DTL_E_UDEFCONF          134     /* DTL_UNSOL_GETALL and DTL_UNSOL_DEF used simultaneously with same NI */
#define DTL_I_TCSN		135	/* Sense Mode Utility - test cont scan mode  */
#define DTL_I_TSSN		136	/* Sense Mode Utility - test sing scan mode  */
#define DTL_I_TSRG		137	/* Sense Mode Utility - test sing step mode  */
#define DTL_E_BAD_CIP_PATH	138	/* Uninterpretable path in DTSA */
#define DTL_E_BAD_CID		139	/* Invalid connection ID in DTSA */
#define DTL_E_BAD_SVC_CODE	140	/* Disallowed CIP service code */
#define DTL_E_BAD_IOI		141	/* Invalid CIP Internal Object Identifier */
#define DTL_E_MAX_SIZE		142	/* Data exceeds maximum size allowed */
#define DTL_E_MAX_CIP_CONN	143	/* No more CIP connections can be opened */
#define DTL_E_CONN_BUSY		144	/* Connection not ready to send */
#define DTL_E_CONN_LOST		145	/* Connection lost */
#define DTL_E_CTYPE		146	/* Invalid connection structure */
#define DTL_E_CIP_MODE		147	/* Invalid CIP mode */
#define DTL_E_CIP_TRIGGER	148	/* Invalid CIP trigger */
#define DTL_E_CIP_TRANSPORT	149	/* Invalid CIP transport */
#define DTL_E_CIP_TMO_MULT	150	/* Invalid CIP timeout multiplier */
#define DTL_E_CIP_CONN_TYPE	151	/* Invalid CIP network connection type */
#define DTL_E_CIP_CONN_PRI	152	/* Invalid CIP connection priority */
#define DTL_E_CIP_PKT_TYPE	153	/* Invalid CIP connection packet type */
#define DTL_E_CIP_PKT_SIZE	154	/* Invalid CIP connection max packet size */
#define DTL_E_DRIVER_ID_ILLEGAL	155 /* Driver ID was illegal. */
#define DTL_E_DRIVER_ID_INVALID	156 /* Driver ID was invalid. */
#define DTL_E_DRIVER_ID_INUSE	157 /* Driver ID is already in use. */
#define DTL_E_DRIVER_NAME_INVALID		158 /* Driver name is invalid. */
#define DTL_E_BROADCAST		159	/* Failed attempt to register/unregister broadcast unsolicited request. */
#define	DTL_E_PLC2MEMORY	160	/* Failed attempt to register/unregister plc2 memory unsolicited request. */
#define	DTL_E_VIRTUAL_LINK	161	/* Failed attempt to register/unregister virtual link unsolicited request. */
#define DTL_E_ADR_NOT_IN_USE	162	/* PLC-2 address not in use by this application. */
#define DTL_E_NODE_NOT_IN_USE	163	/* Virtual link node not in use by this application. */
#define	DTL_E_DEF_PW_REPEAT	164	/* DTL_C_DEFINE pushwheel parameter was specified more than once. */
#define	DTL_E_DEF_PW_RANGE	165	/* DTL_C_DEFINE pushwheel parameter was out of range. */
#define	DTL_E_DEF_MOD_REPEAT	166	/* DTL_C_DEFINE module parameter was specified more than once. */
#define	DTL_E_DEF_MOD_RANGE	167	/* DTL_C_DEFINE module parameter was out of range. */
#define	DTL_E_DEF_CH_REPEAT	168	/* DTL_C_DEFINE channel parameter was specified more than once. */
#define	DTL_E_DEF_CH_RANGE	169	/* DTL_C_DEFINE channel parameter was out of range. */
#define	DTL_E_DEF_EISTN_REPEAT	170	/* DTL_C_DEFINE EI station parameter was specified more than once. */
#define	DTL_E_DEF_EISTN_RANGE	171	/* DTL_C_DEFINE EI station parameter was out of range. */
#define	DTL_E_DEF_BRIDGE_REPEAT	172	/* DTL_C_DEFINE bridge parameter was specified more than once. */
#define	DTL_E_DEF_BRIDGE_RANGE	173	/* DTL_C_DEFINE bridge parameter was out of range. */
#define	DTL_E_DEF_LINK_REPEAT	174	/* DTL_C_DEFINE link parameter was specified more than once. */
#define	DTL_E_DEF_LINK_RANGE	175	/* DTL_C_DEFINE link parameter was out of range. */
#define	DTL_E_DEF_GW_REPEAT	176	/* DTL_C_DEFINE gateway parameter was specified more than once. */
#define	DTL_E_DEF_GW_RANGE	177	/* DTL_C_DEFINE gateway parameter was out of range. */
#define	DTL_E_DEF_KA_REPEAT	178	/* DTL_C_DEFINE ka flag parameter was specified more than once. */
#define	DTL_E_NO_RSLINX_INI			179	/* Can not find RSLinx in ini file */
#define	DTL_E_NO_WINLINX_INI		180 /* Can not find WinLinx in ini file */
#define	DTL_E_SENDING_TO_SERVER		181 /* Error sending message to server */
#define	DTL_E_NO_NAME_MAPPING		182 /* Specified hostname is not mapped to a station address. */
#define	DTL_E_CANT_CREATE_RSLINX	183	/* Unable to create RSLinx process */
#define	DTL_E_CANT_FIND_RSLINX		184	/* Unable to communicate with RSLinx process */
#define	DTL_E_MISSING_RSLINX_ACTIVATION	185	/* Unable to find activation key */
#define	DTL_E_MISSING_ACTIVATION	DTL_E_MISSING_RSLINX_ACTIVATION
#define DTL_E_NULL_POINTER			186 /* One or more pointers were NULL */
#define	DTL_E_INVALID_WHOACTIVE_TYPE	187 /* Who active struct type is invalid. */
#define	DTL_E_ILLEGAL_WHOACTIVE_TYPE	188 /* Who active struct type is illegal. */
#define DTL_E_BAD_WHOACTIVE_SIZE		189	/* Who active struct size is wrong for struct type. */
#define DTL_E_INVALID_WHOACTIVE_MFG		190	/* Who active manufacturer type is invalid. */
#define DTL_E_ILLEGAL_WHOACTIVE_MFG		191	/* Who active manufacturer type is illegal. */
#define	DTL_E_BAD_REQUESTID			192	/* Specified request id was bad. */
#define	DTL_E_CANT_CREATE_WINLINX		193	/* Unable to create WinLinx process. */
#define	DTL_E_CANT_FIND_WINLINX			194	/* Unable to communicate with WinLinx process. */
#define	DTL_E_MISSING_WINLINX_ACTIVATION	195	/* Unable to find activation key */
#define DTL_E_NO_CIP_SUPPORT	196	/* RSLinx CIP subsystem not found */
#define DTL_E_CIP_REG_TIMEOUT	197	/* No response to CIP registration */
#define DTL_E_CIP_REG_REJECT	198	/* Rejection of CIP registration */
#define DTL_E_CIP_BAD_REG_ID	199	/* Invalid registration ID */
#define DTL_E_MAX_CIP_SYMBOL	200	/* CIP Symbol exceeds max length allowed */
#define DTL_E_CIP_SYMBOL_FMT	201	/* CIP Symbol has invalid format */
#define DTL_E_CIP_BAD_TRANS_ID	202	/* Invalid transaction ID */
#define DTL_E_DDE_TOPIC_EXISTS	203	/* DDE Topic already exists. */
#define DTL_E_SOURCE			204	/* Failed attempt to register/unregister source unsolicited request. */
#define	DTL_E_DDE_TOPIC_EXISTS_WITH_DIFFERENT_NAME			205
#define	DTL_E_DDE_TOPIC_EXISTS_WITH_DIFFERENT_POLL_MODE		206
#define	DTL_E_DDE_TOPIC_EXISTS_WITH_DIFFERENT_POLL_RATE		207
#define	DTL_E_DDE_TOPIC_EXISTS_WITH_DIFFERENT_MFG_TYPE		208
#define	DTL_E_DDE_TOPIC_EXISTS_WITH_DIFFERENT_PROC_TYPE		209
#define	DTL_E_DDE_TOPIC_EXISTS_WITH_DIFFERENT_PROC_STA		210
#define	DTL_E_DDE_TOPIC_EXISTS_WITH_DIFFERENT_ROUTE			211
#define	DTL_E_DDE_TOPIC_EXISTS_WITH_DIFFERENT_DRIVER		212
#define	DTL_E_DDE_TOPIC_EXISTS_WITH_DIFFERENT_COMM_TIMEOUT	213
#define	DTL_E_WINLINX_VERSION_MISMATCH	214	/* Version does not match WinLinx version. */
#define	DTL_E_RSLINX_VERSION_MISMATCH	215	/* Version does not match RSLinx version. */
#define	DTL_E_WINLINX_CONNECTION_BROKEN	216	/* The connection to WinLinx server is broken. */
#define	DTL_E_RSLINX_CONNECTION_BROKEN	217	/* The connection to RSLinx server is broken. */
#define DTL_E_DUP_CIP_ADDRESS	218	/* CIP link address was already registered. */
#define DTL_E_DUP_CIP_SYMBOL	219	/* CIP symbol was already registered. */
#define DTL_E_CIP_LINK_ADDRESS	220	/* Invalid link address */
#define DTL_E_CIP_STATUS_CODE	221	/* Invalid return status code */
#define DTL_E_NO_IC_MAPPINGS	222	/* No INTERCHANGE compatibility mappings exist. */
#define	DTL_E_DDE_TOPIC_IS_ACTIVE	223
#define	DTL_E_DDE_TOPIC_NO_PROJECT	224
#define	DTL_E_RSHARMONY_INITIALIZE		225	/* Could not initialize RSHarmony sub-system. */
#define	DTL_E_NOT_SUPPORTED_SERVER		226	/* Operation not supported by server. */
#define	DTL_E_RSHARMONY_OPEN_PROJECT	227	/* Could not open RSHarmony project. */
#define	DTL_E_RSHARMONY_BIND_OBJECT		228	/* Could not bind to RSHarmony object. */
#define	DTL_E_RSHARMONY_INVOKE_METHOD	229	/* Could not invoke method on RSHarmony object. */
#define	DTL_E_RSHARMONY_GET_PROPERTY	230	/* Could not get property of RSHarmony object. */
#define	DTL_E_RSHARMONY_SET_PROPERTY	231	/* Could not set property of RSHarmony object. */
#define	DTL_E_IC_MAPPING_EXISTS			232 /* INTERCHANGE mapping exists for specified pushwheel. */

#define	DTL_E_INVALID_TARGET_TYPE	233 /* Target struct type is invalid. */
#define	DTL_E_ILLEGAL_TARGET_TYPE	234 /* Target struct type is illegal. */
#define DTL_E_INVALID_TARGET_SIZE	235	/* Target struct size is wrong for struct type. */

#define	DTL_E_DLL_SERVER_MISMATCH	236	/* DTL32.DLL version mismatch with Linx server. */

#define DTL_E_BAD_REPLY		237	/* Reply is too short or is incorrectly formatted */

#define	PCCCSTSBASE	0x100	/* pccc sts base offset	*/
#define PCCCSTS01	PCCCSTSBASE+1	/* Station cannot buffer command */
#define	PCCCSTS02	PCCCSTSBASE+2	/* Cannot guarantee delivery, link layer timed out or received a NAK. */
#define	PCCCSTS03	PCCCSTSBASE+3	/* Duplicate token holder detected by link layer. */
#define	PCCCSTS04	PCCCSTSBASE+4	/* Local port is disconnected. */
#define	PCCCSTS05	PCCCSTSBASE+5	/* Application layer timed out waiting for a response. */
#define	PCCCSTS06	PCCCSTSBASE+6	/* Duplicate node detected. */
#define	PCCCSTS07	PCCCSTSBASE+7	/* Station is off-line. */
#define	PCCCSTS08	PCCCSTSBASE+8	/* Hardware fault. */
#define	PCCCSTS10	PCCCSTSBASE+0x10	/* Illegal command or format, including an odd address. */
#define	PCCCSTS20	PCCCSTSBASE+0x20	/* Host has a problem and will not communicate. */
#define	PCCCSTS30	PCCCSTSBASE+0x30	/* Remote station host is not there, disconnected, or shutdown. */
#define	PCCCSTS40	PCCCSTSBASE+0x40	/* Host could not complete function due to hardware fault. */
#define	PCCCSTS50	PCCCSTSBASE+0x50	/* Addressing problem or memory protect rungs. */
#define	PCCCSTS60	PCCCSTSBASE+0x60	/* Function disallowed due to command protection selection. */
#define	PCCCSTS70	PCCCSTSBASE+0x70	/* Processor is in program mode. */
#define	PCCCSTS80	PCCCSTSBASE+0x80	/* Compatibility mode file missing or communication zone */
#define	PCCCSTS90	PCCCSTSBASE+0x90	/* Remote station cannot buffer command. */
#define PCCCSTSA0       PCCCSTSBASE+0xA0        /* No ACK received */
#define PCCCSTSA2       PCCCSTSBASE+0xA2        /* Network is dead */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -