/*
  function block interface
  name: dpsgdiag
*/

typedef long  T_BOO;
typedef long  T_ANA;
typedef float T_REAL;
typedef long  T_TMR;
typedef char  *T_MSG;

typedef struct {
   /* CALL   */ T_ANA  _slave_no;
   /* CALL   */ T_ANA  _mode;
   /* CALL   */ T_ANA  _ext_msg_lenght;
} str_arg;

#define SLAVE_NO         (arg->_slave_no)
#define MODE             (arg->_mode)
#define EXT_MSG_LENGHT   (arg->_ext_msg_lenght)

#define FBLPNO_ERROR            0
#define FBLPNO_NB_REMAIN_DIAGS  1
#define FBLPNO_STATUS1          2
#define FBLPNO_STATUS2          3
#define FBLPNO_STATUS3          4
#define FBLPNO_MASTER_ADDR      5
#define FBLPNO_PNO_SLAVEID      6
#define FBLPNO_EXT_BYTE         7
#define FBLPNO_NB_EXT_DIAGS     8
#define FBLPNO_EXT_BYTE1        9
#define FBLPNO_EXT_BYTE2        10
#define FBLPNO_EXT_BYTE3        11
#define FBLPNO_EXT_BYTE4        12
#define FBLPNO_EXT_BYTE5        13
#define FBLPNO_EXT_BYTE6        14
#define FBLPNO_EXT_BYTE7        15
#define FBLPNO_EXT_BYTE8        16
#define FBLPNO_EXT_MSG          17
