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

📄 fms_user.h

📁 PROFIBUS-dp PROGRAMS 主从站源程序
💻 H
📖 第 1 页 / 共 4 页
字号:
  } Msg;
} MSG_WRITE;



/* ------------------------------------------------------------------------------------------------- */
/* FMS-service: GetOD ------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------------- */

typedef struct tagGET_OD_REQ
{
  unsigned char  bCommunicationRef;
  unsigned char  bAccessSpec;
  unsigned short usObjectIdx;
  unsigned char  bReserved1;
  unsigned char  bReserved2;
  unsigned char  bReserved3;
  unsigned char  bService;
} GET_OD_REQ;


typedef struct tagGET_OD_CON
{
  unsigned char  bCommunicationRef;
  uint8          bAccessSpec;
  uint16         usObjectIdx;
  unsigned char  bReserved1;
  unsigned char  bReserved2;
  unsigned char  bReserved3;
  unsigned char  bService;
  myboolean      bMore;
  uint8          bDescriptionNum;
  octet          abDescription[245];
} GET_OD_CON;


typedef  struct tagMSG_GET_OD
{
  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 {
    GET_OD_REQ                Req;
    GET_OD_CON                Con;
    ERROR_TYPE                Err;
    RCS_TELEGRAMHEADERDATA_10 User;
  } Msg;
} MSG_GET_OD;


/* The following structures appeares at abDescripton[] as much as spesified   */
/* at bDescriptonNum                                                          */

typedef struct tagPDU_OC_OV_HEAD   /* Objectcode: OC_OV_HEAD */
{
  unsigned char   bLen;
  uint16          usObjectIdx;
  myboolean       chRomRamFlag;
  uint8           bNameLength;
  myboolean       chAccessProtectionSupported;
  int16           sVersionOd;
  void           *ulLocalAddressOd;
  int16           sStOdLength;
  void           *ulLocalAddressStOd;
  uint16          usFirstIndexSOd;
  int16           sSOdLength;
  void           *ulLocalAddressSOd;
  uint16          usFirstIndexDvOd;
  int16           sDvOdLength;
  void           *ulLocalAddressDvOd;
  uint16          usFirstIndexDpOd;
  int16           sDpOdLength;
  void           *ulLocalAddressDpOd;
} PDU_OC_OV_HEAD;

typedef struct tagPDU_OC_OV_HEAD_SHORT
{
  unsigned char   bLen;
  uint16          usObjectIdx;
  myboolean       chRomRamFlag;
  uint8           bNameLength;
  myboolean       chAccessProtectionSupported;
  int16           sVersionOd;
  int16           sStOdLength;
  uint16          usFirstIndexSOd;
  int16           sSOdLength;
  uint16          usFirstIndexDvOd;
  int16           sDvOdLength;
  uint16          usFirstIndexDpOd;
  int16           sDpOdLength;
} PDU_OC_OV_HEAD_SHORT;

typedef struct tagPDU_OC_ST_OV   /* Objectcode: OC_DATA_TYPE */
{
  unsigned char   bLen;
  uint16          usObjectIdx;
  uint8           bObjectCode;
  visible         abName[NAME_LENGTH+1];
} PDU_OC_ST_OV;

typedef struct tagPDU_OC_ST_OV_SHORT
{
  unsigned char   bLen;
  uint16          usObjectIdx;
  uint8           bObjectCode;
} PDU_OC_ST_OV_SHORT;

typedef struct tagPDU_OC_SIMPLE_VAR_LONG   /* Objectcode: OC_SIMPLE_VARIABLE */
{
  uint8           bPassword;
  uint8           bAccessGroups;
  uint16          usAccessRights;
  uint32          ulLocalAddress;
  visible         abVariableName[NAME_LENGTH+1];
  unsigned char   bExtensionLen;
} PDU_OC_SIMPLE_VAR_LONG;

typedef struct tagPDU_OC_SIMPLE_VAR
{
  unsigned char   bLen;
  uint16          usObjectIdx;
  uint8           bObjectCode;
  uint16          usDataTypeIndex;
  uint8           bLength;
  PDU_OC_SIMPLE_VAR_LONG l;
} PDU_OC_SIMPLE_VAR;

typedef struct tagPDU_OC_ARRAY_LONG   /* Objectcode: OC_ARRAY */
{
  uint8           bPassword;
  uint8           bAccessGroups;
  uint16          usAccessRights;
  uint32          ulLocalAddress;
  visible         abVariableName[NAME_LENGTH+1];
  unsigned char   bExtensionLen;
} PDU_OC_ARRAY_LONG;

typedef struct tagPDU_OC_ARRAY
{
  unsigned char   bLen;
  uint16          usObjectIdx;
  uint8           bObjectCode;
  uint16          usDataTypeIndex;
  uint8           bLength;
  uint8           bElementNum;
  PDU_OC_ARRAY_LONG l;
} PDU_OC_ARRAY;

typedef struct tagPDU_OC_EVENT_LONG   /* Objectcode: OC_EVENT */
{
  uint8           bPassword;
  uint8           bAccessGroups;
  uint16          usAccessRights;
  myboolean       chEnabled;                     
  visible         abEventName[NAME_LENGTH+1];
  unsigned char   bExtensionLen;
} PDU_OC_EVENT_LONG;

typedef struct tagPDU_OC_EVENT
{
  unsigned char   bLen;
  uint16          usObjectIdx;
  uint8           bObjectCode;
  uint16          usIndexEventData;
  uint8           bLength;
  PDU_OC_EVENT_LONG l;
} PDU_OC_EVENT;
                                 
                                     

/* ------------------------------------------------------------------------------------------------- */
/* FMS-service: InformationReport ------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------------- */

typedef struct tagINFORMATION_REPORT_REQ
{
  unsigned char  bCommunicationRef;
  unsigned char  bAccess;
  unsigned short usObjectIdx;
  unsigned char  bSubObjectIdx;
  unsigned char  bDataCnt;
  unsigned char  bDataType;
  unsigned char  bService;
  octet          abData[247];
} INFORMATION_REPORT_REQ;

typedef INFORMATION_REPORT_REQ INFORMATION_REPORT_IND;


typedef  struct tagMSG_INFORMATION_REPORT
{
  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 {
    INFORMATION_REPORT_REQ      Req;
    INFORMATION_REPORT_IND      Ind;
    RCS_TELEGRAMHEADERDATA_10   User;
  } Msg;
} MSG_INFORMATION_REPORT;



/* ------------------------------------------------------------------------------------------------- */
/* FMS-service: EventNotification ------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------------- */

typedef struct tagEVENT_NOTIFICATION_REQ
{
  unsigned char  bCommunicationRef;
  unsigned char  bAccess;
  unsigned short usObjectIdx;
  unsigned char  bReserved1;
  unsigned char  bDataCnt;
  unsigned char  bDataType;
  unsigned char  bService;
  octet          abData[247];
} EVENT_NOTIFICATION_REQ;

typedef EVENT_NOTIFICATION_REQ EVENT_NOTIFICATION_IND;


typedef  struct tagMSG_EVENT_NOTIFICATION
{
  unsigned char rx;
  unsigned char tx;
  unsigned char ln;
  unsigned char nr;  /* = Event Number */
  unsigned char a;
  unsigned char f;
  unsigned char b;
  unsigned char e;
  union {
    EVENT_NOTIFICATION_REQ      Req;
    EVENT_NOTIFICATION_IND      Ind;
    ERROR_TYPE                  Err;
    RCS_TELEGRAMHEADERDATA_10   User;
  } Msg;
} MSG_EVENT_NOTIFICATION;



/* ------------------------------------------------------------------------------------------------- */
/* FMS-service: Initiate --------------------------------------------------------------------------- */
/* Only as an indication in case of an error, because the request is done automatically with every - */
/* first PROFIBUS service on a not established communiation connection ----------------------------- */
/* ------------------------------------------------------------------------------------------------- */

typedef struct tagINITIATE_ERR
{
  unsigned char  bCommunicationRef;
  unsigned char  bAccess;
  unsigned short usObjectIdx;
  unsigned char  bSubObjectIdx;
  unsigned char  bDataCnt;
  unsigned char  bDataType;
  unsigned char  bService;
  uint8          bErrorCode;
} INITIATE_ERR;


typedef struct tagMSG_INITIATE
{
  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 {
    INITIATE_ERR          Err;
  } Msg;
} MSG_INITIATE;

⌨️ 快捷键说明

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