?? pb_err.h
字號:
/*****************************************************************************/
/* */
/* SOFTING AG */
/* Richard-Reitzner-Allee 6 */
/* D-85540 Haar */
/* Phone: (++49)-(0)89-45656-0 */
/* Fax: (++49)-(0)89-45656-399 */
/* */
/* Copyright (C) SOFTING AG 1995-2007 */
/* All Rights Reserved */
/* */
/*****************************************************************************/
/*****************************************************************************/
/* PROFIBUS ABORT-, REJECT-, EVENT- and ERROR DEFINES and -TYPES */
/* */
/* Filename : PB_ERR.H */
/* Version : 5.41.0.00.release */
/* Date : 30-June-2005 */
/* Author : SOFTING AG */
/* */
/* Description : This file contains the ABORT, REJECT, EVENT and ERROR */
/* types and defines and the according reason codes. */
/* */
/*****************************************************************************/
#ifndef __PB_ERR__
#define __PB_ERR__
#pragma warning (disable : 4103) /* used #pragma pack to change alignment */
#ifdef WIN32
#pragma pack(push,2)
#else
#pragma pack(2)
#endif
#pragma warning (default : 4103)
/*****************************************************************************/
/************* ABORT REASON CODES *********************/
/*****************************************************************************/
/* --- USER abort reasons -------------------------------------------------- */
#define USR_ABT_RC1 0 /* disconnected by user */
#define USR_ABT_RC2 1 /* version object dictionary incompatible */
#define USR_ABT_RC3 2 /* password error */
#define USR_ABT_RC4 3 /* profile number incompatible */
#define USR_ABT_RC5 4 /* limited services permitted */
#define USR_ABT_RC6 5 /* OD loading interacting (OD is beeing loaded)*/
/* --- FMS abort reasons --------------------------------------------------- */
#define FMS_ABT_RC1 0 /* FMS-CRL error (CRL entry invalid) */
#define FMS_ABT_RC2 1 /* user error (protocol violation by user) */
#define FMS_ABT_RC3 2 /* FMS-PDU error (invalid FMS PDU received) */
#define FMS_ABT_RC4 3 /* connection state conflict LLI */
#define FMS_ABT_RC5 4 /* LLI error */
#define FMS_ABT_RC6 5 /* PDU size exceeds maximum PDU size */
#define FMS_ABT_RC7 6 /* feature not supported */
#define FMS_ABT_RC8 7 /* invoke id error in service response */
#define FMS_ABT_RC9 8 /* max services overflow */
#define FMS_ABT_RC10 9 /* connection state conflict FMS (Initiate.req) */
#define FMS_ABT_RC11 10 /* service error (res != ind or con != req) */
#define FMS_ABT_RC12 11 /* invoke id error in service request */
#define FMS_ABT_RC13 12 /* FMS is disabled */
/* --- FM7 abort reasons -------------------------------------------------- */
#define FM7_ABT_RC1 0 /* FM7-CRL error */
#define FM7_ABT_RC2 1 /* user error */
#define FM7_ABT_RC3 2 /* FM7-PDU error */
#define FM7_ABT_RC4 3 /* connection state conflict LLI */
#define FM7_ABT_RC5 4 /* LLI error */
#define FM7_ABT_RC6 5 /* PDU size */
#define FM7_ABT_RC7 6 /* feature not supported */
#define FM7_ABT_RC8 7 /* response error */
#define FM7_ABT_RC9 8 /* max services overflow */
#define FM7_ABT_RC10 9 /* connection state conflict FM7 */
#define FM7_ABT_RC11 10 /* service error */
#if (PB_VER < 500)
#define FMA_ABT_RC1 FM7_ABT_RC1
#define FMA_ABT_RC2 FM7_ABT_RC2
#define FMA_ABT_RC3 FM7_ABT_RC3
#define FMA_ABT_RC4 FM7_ABT_RC4
#define FMA_ABT_RC5 FM7_ABT_RC5
#define FMA_ABT_RC6 FM7_ABT_RC6
#define FMA_ABT_RC7 FM7_ABT_RC7
#define FMA_ABT_RC8 FM7_ABT_RC8
#define FMA_ABT_RC9 FM7_ABT_RC9
#define FMA_ABT_RC10 FM7_ABT_RC10
#define FMA_ABT_RC11 FM7_ABT_RC11
#endif
/* --- LLI abort reasons --------------------------------------------------- */
#define LLI_ABT_RC1 0 /* LLI context check neg., remote context in AD */
#define LLI_ABT_RC2 1 /* invalid LLI PDU during associate or abort */
#define LLI_ABT_RC3 2 /* invalid LLI PDU during data transfer phase */
#define LLI_ABT_RC4 3 /* unknown or invalid LLI PDU received */
#define LLI_ABT_RC5 4 /* DTA_ACK_PDU received and SAC = 0 */
#define LLI_ABT_RC6 5 /* max no of parallel services exceeded (by PDU)*/
#define LLI_ABT_RC7 6 /* unkown invoke id */
#define LLI_ABT_RC8 7 /* priority error */
#define LLI_ABT_RC9 8 /* local error at remote station */
#define LLI_ABT_RC10 9 /* timer 1 expired (associate) */
#define LLI_ABT_RC11 10 /* timer 3 expired (supervision of connection) */
#define LLI_ABT_RC12 11 /* receive timer expired */
#define LLI_ABT_RC13 12 /* error while activating LSAP (state in AD) */
#define LLI_ABT_RC14 13 /* illegal FDL prim. during ASS or ABT (see AD) */
#define LLI_ABT_RC15 14 /* illegal FDL prim. in data transfer (see AD) */
#define LLI_ABT_RC16 15 /* unkown FDL primitive */
#define LLI_ABT_RC17 16 /* unkown LLI primitive */
#define LLI_ABT_RC18 17 /* illegal LLI prim. during ASS or ABT (see AD) */
#define LLI_ABT_RC19 18 /* illegal LLI prim. in data transfer (see AD) */
#define LLI_ABT_RC20 19 /* invalid CRL entry */
#define LLI_ABT_RC21 20 /* conflict during associate */
#define LLI_ABT_RC22 21 /* procedural error on cyclic connection */
#define LLI_ABT_RC23 22 /* max no of parallel services exceeded (by FMS)*/
#define LLI_ABT_RC24 23 /* CRL beeing loaded, LLI disabled */
#define LLI_ABT_RC25 24 /* confirm / indication mode error */
#define LLI_ABT_RC26 25 /* illegal FM1/2 primitive received */
#define LLI_ABT_RC27 26 /* illegal FMS service on cyclic connection */
#define LLI_ABT_RC28 27 /* FMS PDU too large on cyclic connection */
#define LLI_ABT_RC29 28 /* resource error during associate */
#define LLI_ABT_RC30 29 /* resource error in data transfer phase */
#define LLI_ABT_RC31 30 /* resource error during abort */
#define LLI_ABT_RC32 31 /* LLI state error */
#define LLI_ABT_RC33 32 /* timer error */
#define LLI_ABT_RC34 33 /* resource transfer to FDL failed */
/* --- LLI abort details --------------------------------------------------- */
#define LLI_ABT_AD1 0 /* error in the loading of the update buffer */
#define LLI_ABT_AD2 1 /* error in the activating of a poll list entry */
#define LLI_ABT_AD3 2 /* error in the deactivating of apoll list entry*/
#define LLI_ABT_AD4 3 /* transmit error (SDA.con) */
#define LLI_ABT_AD5 4 /* transmit error (CSRD.con) */
#define LLI_ABT_AD6 5 /* transmit error (SRD.con) */
#define LLI_ABT_AD7 6 /* receive error (CSRD.con) */
/* --- FDL abort reasons --------------------------------------------------- */
#define FDL_ABT_UE 1 /* remote user interface error */
#define FDL_ABT_RR 2 /* no remote resources available */
#define FDL_ABT_RS 3 /* service not activated at remote sap */
#define FDL_ABT_RA 4 /* no access to remote sap */
#define FDL_ABT_RDL 12 /* no resource for send response data low */
#define FDL_ABT_RDH 13 /* no resource for send response data high */
#define FDL_ABT_LS 16 /* service not activated at local sap */
#define FDL_ABT_NA 17 /* no reaction from remote station */
#define FDL_ABT_DS 18 /* disconnected station (NLT) */
#define FDL_ABT_NO 19 /* FDL servcice not OK */
#define FDL_ABT_LR 20 /* no local resources available */
#define FDL_ABT_IV 21 /* invalid request parameters */
/*****************************************************************************/
/************* DP/V1 ABORT INSTANCES AND REASON CODES *********************/
/*****************************************************************************/
#define DP_ABORT_SUBNET_NO 0 /* abort: subnet */
#define DP_ABORT_SUBNET_LOCAL 1
#define DP_ABORT_SUBNET_REMOTE 2
#define DP_ABORT_REASON_MASK 0x3F /* abort: instance+reason */
#define DP_ABORT_INSTANCE_MASK 0xC0
#define DP_ABORT_INSTANCE_FDL 0x00 /* abort: instance */
#define DP_ABORT_INSTANCE_DDLM 0x40
#define DP_ABORT_INSTANCE_USER 0x80
/*abort: fdl-reason as defined in draft */
#define DP_ABORT_FDL_UE (DP_ABORT_INSTANCE_FDL|0x01)
#define DP_ABORT_FDL_RR (DP_ABORT_INSTANCE_FDL|0x02)
#define DP_ABORT_FDL_RS (DP_ABORT_INSTANCE_FDL|0x03)
#define DP_ABORT_FDL_NR (DP_ABORT_INSTANCE_FDL|0x09)
#define DP_ABORT_FDL_DH (DP_ABORT_INSTANCE_FDL|0x0A)
#define DP_ABORT_FDL_RDL (DP_ABORT_INSTANCE_FDL|0x0C)
#define DP_ABORT_FDL_RDH (DP_ABORT_INSTANCE_FDL|0x0D)
/* abort: fdl-reason locally softing specific */
#define DP_ABORT_FDL_LS (DP_ABORT_INSTANCE_FDL|0x10)
#define DP_ABORT_FDL_NA (DP_ABORT_INSTANCE_FDL|0x11)
#define DP_ABORT_FDL_DS (DP_ABORT_INSTANCE_FDL|0x12)
#define DP_ABORT_FDL_NO (DP_ABORT_INSTANCE_FDL|0x13)
#define DP_ABORT_FDL_LR (DP_ABORT_INSTANCE_FDL|0x14)
#define DP_ABORT_FDL_IV (DP_ABORT_INSTANCE_FDL|0x15)
/* abort: ddlm-reason as defined in draft */
#define DP_ABORT_DDLM_ABT_SE (DP_ABORT_INSTANCE_DDLM|0x01)
#define DP_ABORT_DDLM_ABT_FE (DP_ABORT_INSTANCE_DDLM|0x02)
#define DP_ABORT_DDLM_ABT_TO (DP_ABORT_INSTANCE_DDLM|0x03)
#define DP_ABORT_DDLM_ABT_RE (DP_ABORT_INSTANCE_DDLM|0x04)
#define DP_ABORT_DDLM_ABT_IV (DP_ABORT_INSTANCE_DDLM|0x05)
#define DP_ABORT_DDLM_ABT_STO (DP_ABORT_INSTANCE_DDLM|0x06)
#define DP_ABORT_DDLM_ABT_IA (DP_ABORT_INSTANCE_DDLM|0x07)
#define DP_ABORT_DDLM_ABT_OC (DP_ABORT_INSTANCE_DDLM|0x08)
/*****************************************************************************/
/************* REJECT PDU TYPES and REASON CODES *********************/
/*****************************************************************************/
/* --- PDU types ----------------------------------------------------------- */
#define CONFIRMED_REQUEST_PDU 1
#define CONFIRMED_RESPONSE_PDU 2
#define UNCONFIRMED_PDU 3
#define UNKNOWN_PDU_TYPE 4
/* --- reason codes -------------------------------------------------------- */
#define REJ_RC0 0 /* other than RC1 to RC6 */
#define REJ_RC1 1 /* invoke id exists already */
#define REJ_RC2 2 /* max services overflow (max. SCC exceeded) */
#define REJ_RC3 3 /* feature not supported - connection oriented */
#define REJ_RC4 4 /* feature not supported - connectionless */
#define REJ_RC5 5 /* PDU size exceeds maximum PDU size allowed */
#define REJ_RC6 6 /* user error on connectionless relation */
/*****************************************************************************/
/************* FMS ERROR CLASSES and ERROR CODES *********************/
/*****************************************************************************/
/* The error class is encoded in the high byte of the 16-bit-result, */
/* the error code in the low byte. */
#define E_FMS_INIT 0x0000
#define E_FMS_INIT_OTHER 0x0000
#define E_FMS_INIT_MAX_PDU_SIZE_INSUFF 0x0001
#define E_FMS_INIT_FEAT_NOT_SUPPORTED 0x0002
#define E_FMS_INIT_OD_VERSION_INCOMP 0x0003
#define E_FMS_INIT_USER_DENIED 0x0004
#define E_FMS_INIT_PASSWORD_ERROR 0x0005
#define E_FMS_INIT_PROFILE_NUMB_INCOMP 0x0006
#define E_FMS_VFD_STATE_OTHER 0x0100
#define E_FMS_APPLICATION_OTHER 0x0200
#define E_FMS_APPLICATION_UNREACHABLE 0x0201
#define E_FMS_DEF_OTHER 0x0300
#define E_FMS_DEF_OBJ_UNDEF 0x0301
#define E_FMS_DEF_OBJ_ATTR_INCONSIST 0x0302
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -