📄 fms_user.h
字号:
/* ------------------------------------------------------------------------------------------------- */
/* FMS-service: Abort ------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------------- */
typedef struct tagABORT_REQ
{
unsigned char bCommunicationRef;
unsigned char bReserved1;
unsigned short bReserved2;
unsigned char bReserved3;
unsigned char bReserved4;
unsigned char bReserved5;
unsigned char bService;
uint8 bReasonCode;
unsigned char bAbortDetailLen;
octet abAbortDetail[16];
} ABORT_REQ;
typedef struct tagABORT_IND
{
unsigned char bCommunicationRef;
unsigned char bReserved1;
unsigned short bReserved2;
unsigned char bReserved3;
unsigned char bReserved4;
unsigned char bReserved5;
unsigned char bService;
unsigned char bInvokeId;
myboolean bLocallyGenerated;
uint8 bAbortIdentifier;
uint8 bReasonCode;
unsigned char bAbortDetailLen;
octet abAbortDetail[16];
} ABORT_IND;
typedef struct tagMSG_ABORT
{
unsigned char rx;
unsigned char tx;
unsigned char ln;
unsigned char nr;
unsigned char a;
unsigned char f;
unsigned char b;
unsigned char e;
union {
ABORT_REQ Req;
ABORT_IND Ind;
RCS_TELEGRAMHEADER_10 User;
} Msg;
} MSG_ABORT;
/* ------------------------------------------------------------------------------------------------- */
/* FMS-service: Reject ----------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------------------------------- */
typedef struct tagREJECT_IND
{
unsigned char bCommunicationRef;
unsigned char bReserved1;
unsigned short bReserved2;
unsigned char bReserved3;
unsigned char bReserved4;
unsigned char bReserved5;
unsigned char bService;
myboolean bDetectedHere;
int8 chOriginalInvokeId;
uint8 bRejectPduType;
int8 chRejectCode;
} REJECT_IND;
typedef struct tagMSG_REJECT
{
unsigned char rx;
unsigned char tx;
unsigned char ln;
unsigned char nr;
unsigned char a;
unsigned char f;
unsigned char b;
unsigned char e;
union {
REJECT_IND Ind;
RCS_TELEGRAMHEADER_10 User;
} Msg;
} MSG_REJECT;
/* ------------------------------------------------------------------------------------------------- */
/* ALI-command: SetVfdStatus ----------------------------------------------------------------------- */
/* ------------------------------------------------------------------------------------------------- */
typedef struct tagMSG_SET_VFD_STATUS
{
unsigned char rx;
unsigned char tx;
unsigned char ln;
unsigned char nr;
unsigned char a;
unsigned char f;
unsigned char b;
unsigned char e;
uint8 bLogicalStatus;
uint8 bPhysicalStatus;
uint8 bLocalDetailNum;
bits abLocalDetail[3];
} MSG_SET_VFD_STATUS;
/* Receiver and Sender of the message -------------------------------------------------------------- */
/* Used at Msg.rx and Msg.tx ----------------------------------------------------------------------- */
/* ------------------------------------------------------------------------------------------------- */
#define ALI 1
#define USER 16
/* Command codes ----------------------------------------------------------------------------------- */
/* Used at Msg.b and Msg.a ------------------------------------------------------------------------- */
/* Use TASK_B_11 at Msg.b and Msg.a for all PROFIBUS services from file RCS_USER.H ----------------- */
#define ALI_B_SET_VFD_STATUS 0x40
#define ALI_B_GET_VFD_STATUS 0x41 /* old - use MSG_STATUS */
#define ALI_B_GET_OD_ENTRY 0x42 /* old - use MSG_GET_OD */
#define ALI_B_GET_ERROR_BUFFER 0x43 /* only for internal use */
#define ALI_B_GET_KBL_STATUS 0x44 /* only for internal use */
/* Service codes ----------------------------------------------------------------------------------- */
/* Used at Msg.***.bService ------------------------------------------------------------------------ */
#define PB_OFFSET 0x80
#define STATUS_SERVICE 0x80
#define IDENTIFY_SERVICE 0x81
#define READ_SERVICE 0x82
#define WRITE_SERVICE 0x83
#define GET_OD_SERVICE 0x84
#define INFO_REPORT_SERVICE 0x9F
#define EVENT_NOTIFICATION_SERVICE 0xA1
#define ABORT_SERVICE 0xA5
#define SDA_ALR_FUNCTION 0xB0
#define SDN_ALR_FUNCTION 0xB1
/* Access types ------------------------------------------------------------------------------------ */
/* Used at Msg.***.bAccess ------------------------------------------------------------------------- */
#define ACCESS_INDEX 0 /* Read/Write Zugriff ueber Index */
#define ACCESS_NAME 1 /* Read/Write Zugriff ueber Name */
#define ACCESS_GETOV_INDEX 1 /* GetOv-Request mit Index */
#define ACCESS_GETOV_NAME 2 /* GetOv-Request mit Name */
#define ACCESS_GETOV_STARTINDEX 7 /* GetOv-Request mit Startindex */
/* Object codes ------------------------------------------------------------------------------------ */
/* Used at bOjectCode in PDU_OC_*** ---------------------------------------------------------------- */
#define OC_OV_HEAD 0
#define OC_EVENT 4
#define OC_DATA_TYPE 5
#define OC_SIMPLE_VARIABLE 7
#define OC_ARRAY 8
/* Data types -------------------------------------------------------------------------------------- */
/* Used at usDataTypeIndex at Msg.***.bDataType and PDU_OC_*** ------------------------------------- */
#define DT_NULL 0
#define DT_BOOLEAN 1
#define DT_INT8 2
#define DT_INT16 3
#define DT_INT32 4
#define DT_UINT8 5
#define DT_UINT16 6
#define DT_UINT32 7
#define DT_FLOAT 8
#define DT_OC_STRING 10
/* Data type length -------------------------------------------------------------------------------- */
/* Used at bLength in PDU_OC_*** ------------------------------------------------------------------- */
#define DT_LEN_NULL 0
#define DT_LEN_BOOLEAN 1
#define DT_LEN_INT8 1
#define DT_LEN_UINT8 1
#define DT_LEN_INT16 2
#define DT_LEN_UINT16 2
#define DT_LEN_INT32 4
#define DT_LEN_UINT32 4
#define DT_LEN_FLOAT 4
/* Logical status definitionen --------------------------------------------------------------------- */
/* Used at bLogicalStatus at STATUS_CON ------------------------------------------------------------ */
#define VFD_STATE_CHANGES_ALLOWED 0 /* Everything ok */
#define VFD_LIMITED_SERVICES_PERMITTED 2 /* Only initiate & abort permitted */
#define VFD_OD_LOADING_NON_INTERACTING 4 /* No Initiate-Put-OD */
#define VFD_OD_LOADING_INTERACTING 5 /* Initiate forbidden */
/* Physical status definitionen -------------------------------------------------------------------- */
/* Used at bPhysicalStatus in STATUS_CON ----------------------------------------------------------- */
#define VFD_OPERATIONAL 0
#define VFD_PARTIALLY_OPERATIONAL 1
#define VFD_INOPERABLE 2
#define VFD_NEEDS_COMMISIONING 3
#define VFD_WAIT_ALI_INIT 4
#define VFD_APP_NOT_AVAILABLE 0
#define VFD_APP_AVAILABLE 1
/* ALI Error numbers ------------------------------------------------------------------------------- */
/* Used at Msg.f in all answers -------------------------------------------------------------------- */
#define ALI_OK 0x00 /* No error */
/* 1..9 reserved */
/*---------------------------------------------------------------------------------------------------*/
/* Resend the command - may be it will work now. */
/*---------------------------------------------------------------------------------------------------*/
#define ALI_ABORT_ERR 0x42 /* Conncetion has been aborted */
/* FMS had send Abort */
#define ALI_TEMPORARY_ERR 0x42 /* Temporaery error - send once more */
/*---------------------------------------------------------------------------------------------------*/
/* Send an Abort and the the command once more. */
/* May be a pending command - which normaly could only happend in case of an error in the user */
/* application or driver. */
/*---------------------------------------------------------------------------------------------------*/
#define ALI_REJECT_PAR_SRV 0x43 /* Recv. Rejectcode: REJ_MAX_SERVICE_OVERFLOW */
/* Too many parallel services => CBL.SCC */
#define ALI_INVOKE_ID_ERR 0x44 /* Invoke id in use for running service */
#define ALI_REJECT_PDU_LENGTH 0x45 /* Recv. Rejectcode: REJ_PDU_SIZE */
/* Telegram data len > KBL: PDU_Length */
#define ALI_REJECT_SRV_NOT_SUPP 0x46 /* Recv. Rejectcode: */
/* REJ_FEATURE_NOT_SUPPORTED_CL */
/* REJ_FEATURE_NOT_SUPPORTED_CO */
/* Service not supportet=> CBL Client Bits */
/* Check: conf.srv on BRTC/MULT connection !? */
#define ALI_REJECT_OTHER 0x47 /* */
#define ALI_CON_RR 0x48 /* */
#define ALI_CON_NA 0x49 /* */
#define ALI_CLOSED_FMS_SERVICE 0x4A /* */
#define ALI_FDL_PAR_SRV 0x50 /* Parallel service at FDL defined */
#define ALI_FDL_ABORT 0x55 /* Abort received from user at FDL defined */
#define ALI_REJECT_INVOKE_ID_EXIST 0x56 /* Rejectcode: REJ_INVOKE_ID_EXIST eingegangen */
#define ALI_FDL_ERR 0x60 /* FDL error received */
/* The error number is between 0x61 and 0x7F */
/* For error number from FDL 0x01 and 0x1F */
/* For other numbers it is 0x60 */
/* Without RR=0x02, NA=0x11 which have own */
/* error numbers, because downward compatibility*/
/* See FDL error numbers */
#define ALI_INITIATE_ERR 0x80 /* Connection could not be established */
/* Don't change this number, because this is */
/* the upper limit of the array of FDL_ERROR */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -