William Kane / Generic

Dependents:   LaserioLib

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers abp_fusm.h Source File

abp_fusm.h

00001 /*******************************************************************************
00002 ********************************************************************************
00003 **                                                                            **
00004 ** ABP version 7.16.01 (2015-10-14)                                           **
00005 **                                                                            */
00006 /*******************************************************************************
00007 ********************************************************************************
00008 **
00009 ** File Name
00010 ** ---------
00011 **
00012 ** abp_fusm.h
00013 **
00014 ********************************************************************************
00015 ********************************************************************************
00016 **
00017 ** Description
00018 ** -----------
00019 **
00020 ** abp_fusm.h - Anybus-CC Functional Safety Objects Protocol Definitions.
00021 **
00022 ** This software component contains FUSM definitions used by Anybus-CC
00023 ** modules as well as applications designed to use Functional Safety.
00024 **
00025 ********************************************************************************
00026 ********************************************************************************
00027 **                                                                            **
00028 ** COPYRIGHT NOTIFICATION (c) 2012 HMS Industrial Networks AB                 **
00029 **                                                                            **
00030 ** This code is the property of HMS Industrial Networks AB.                   **
00031 ** The source code may not be reproduced, distributed, or used without        **
00032 ** permission. When used together with a product from HMS, this code can be   **
00033 ** modified, reproduced and distributed in binary form without any            **
00034 ** restrictions.                                                              **
00035 **                                                                            **
00036 ** THE CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. HMS DOES NOT    **
00037 ** WARRANT THAT THE FUNCTIONS OF THE CODE WILL MEET YOUR REQUIREMENTS, OR     **
00038 ** THAT THE OPERATION OF THE CODE WILL BE UNINTERRUPTED OR ERROR-FREE, OR     **
00039 ** THAT DEFECTS IN IT CAN BE CORRECTED.                                       **
00040 **                                                                            **
00041 ********************************************************************************
00042 ********************************************************************************
00043 */
00044 
00045 #ifndef ABP_FUSM_H
00046 #define ABP_FUSM_H
00047 
00048 
00049 /*------------------------------------------------------------------------------
00050 **
00051 ** The Functional Safety instance attributes.
00052 **
00053 **------------------------------------------------------------------------------
00054 */
00055 
00056 #define ABP_SAFE_IA_SAFETY_ENABLE         1
00057 #define ABP_SAFE_IA_BAUD_RATE             2
00058 #define ABP_SAFE_IA_IO_CONFIG             3
00059 #define ABP_SAFE_IA_CYCLE_TIME            4 /* ABCC40 */
00060 
00061 
00062 /*------------------------------------------------------------------------------
00063 **
00064 ** The data size of the Functional Safety instance attributes (in bytes).
00065 **
00066 **------------------------------------------------------------------------------
00067 */
00068 
00069 #define ABP_SAFE_IA_SAFETY_ENABLE_DS      ABP_BOOL_SIZEOF
00070 #define ABP_SAFE_IA_BAUD_RATE_DS          ABP_UINT32_SIZEOF
00071 #define ABP_SAFE_IA_CYCLE_TIME_DS         ABP_UINT8_SIZEOF
00072 
00073 
00074 /*------------------------------------------------------------------------------
00075 **
00076 ** The Functional Safety Module instance attributes.
00077 **
00078 **------------------------------------------------------------------------------
00079 */
00080 
00081 #define ABP_FUSM_IA_STATE                 1
00082 #define ABP_FUSM_IA_VENDOR_ID             2
00083 #define ABP_FUSM_IA_MODULE_ID             3
00084 #define ABP_FUSM_IA_FW_VERSION            4
00085 #define ABP_FUSM_IA_SERIAL_NUM            5
00086 #define ABP_FUSM_IA_DATA_OUT              6
00087 #define ABP_FUSM_IA_DATA_IN               7
00088 #define ABP_FUSM_IA_ERROR_CNTRS           8
00089 #define ABP_FUSM_IA_FATAL_EVENT           9
00090 #define ABP_FUSM_IA_EXCPT_INFO            10
00091 #define ABP_FUSM_IA_BL_VERSION            11
00092 
00093 
00094 /*------------------------------------------------------------------------------
00095 **
00096 ** The data size of the instance attributes (in bytes).
00097 **
00098 **------------------------------------------------------------------------------
00099 */
00100 
00101 #define ABP_FUSM_IA_STATE_DS              ABP_UINT8_SIZEOF
00102 #define ABP_FUSM_IA_VENDOR_ID_DS          ABP_UINT16_SIZEOF
00103 #define ABP_FUSM_IA_MODULE_ID_DS          ABP_UINT16_SIZEOF
00104 #define ABP_FUSM_IA_FW_VERSION_DS         ( 3 * ABP_UINT8_SIZEOF )
00105 #define ABP_FUSM_IA_SERIAL_NUM_DS         ABP_UINT32_SIZEOF
00106 #define ABP_FUSM_IA_ERROR_CNTRS_DS        ( 4 * ABP_UINT16_SIZEOF )
00107 #define ABP_FUSM_IA_EXCPT_INFO_DS         ABP_UINT8_SIZEOF
00108 #define ABP_FUSM_IA_BL_VERSION_DS         ( 2 * ABP_UINT8_SIZEOF )
00109 
00110 
00111 /*------------------------------------------------------------------------------
00112 **
00113 ** Object specific error codes
00114 **
00115 **------------------------------------------------------------------------------
00116 */
00117 
00118 #define ABP_FUSM_ERR_REJECT_BY_MODULE    0x01
00119 #define ABP_FUSM_ERR_MODULE_RSP_FAULTY   0x02
00120 
00121 #define ABP_FUSM_ERR_OBJ_SPEC_DS            2
00122 #define ABP_FUSM_ERR_REJECT_BY_MODULE_DS    4
00123 
00124 
00125 /*-----------------------------------------------------------------------
00126 **
00127 ** ABP_FUSM_IA_ERROR_CNTRS_IDX_...
00128 **
00129 ** Index for the different counters in the Error Counters attribute
00130 ** (array of UINT16)
00131 **
00132 **-----------------------------------------------------------------------
00133 */
00134 
00135 #define ABP_FUSM_IA_ERROR_CNTRS_IDX_ABCC_DR   0
00136 #define ABP_FUSM_IA_ERROR_CNTRS_IDX_ABCC_SE   1
00137 #define ABP_FUSM_IA_ERROR_CNTRS_IDX_SAFE_DR   2
00138 #define ABP_FUSM_IA_ERROR_CNTRS_IDX_SAFE_SE   3
00139 
00140 
00141 /*------------------------------------------------------------------------------
00142 **
00143 ** Values of the Exception Info attribute
00144 **
00145 **------------------------------------------------------------------------------
00146 */
00147 
00148 #define ABP_FUSM_EXCPT_INFO_NONE                0
00149 #define ABP_FUSM_EXCPT_INFO_BAUDRATE_NOT_SUPP   1
00150 #define ABP_FUSM_EXCPT_INFO_NO_START_MSG        2
00151 #define ABP_FUSM_EXCPT_INFO_UNEXP_MSG_LENGTH    3
00152 #define ABP_FUSM_EXCPT_INFO_UNEXP_CMD_IN_RSP    4
00153 #define ABP_FUSM_EXCPT_INFO_UNEXP_ERR_CODE      5
00154 #define ABP_FUSM_EXCPT_INFO_APPL_NOT_FOUND      6
00155 #define ABP_FUSM_EXCPT_INFO_INV_APPL_CRC        7
00156 #define ABP_FUSM_EXCPT_INFO_NO_FLASH_ACCESS     8
00157 #define ABP_FUSM_EXCPT_INFO_WRONG_UC_IN_RSP     9
00158 #define ABP_FUSM_EXCPT_INFO_BL_TIMEOUT          10
00159 #define ABP_FUSM_EXCPT_INFO_NW_SPEC_PRM_ERR     11
00160 #define ABP_FUSM_EXCPT_INFO_INV_CFG_STRING      12
00161 #define ABP_FUSM_EXCPT_INFO_UC_RSP_DIFFERS      13
00162 #define ABP_FUSM_EXCPT_INFO_INCOMPAT_MODULE     14
00163 #define ABP_FUSM_EXCPT_INFO_MAX_RETRANSMISSIONS 15
00164 #define ABP_FUSM_EXCPT_INFO_FW_FILE_ERROR       16
00165 #define ABP_FUSM_EXCPT_INFO_INV_CYCLE_TIME      17
00166 #define ABP_FUSM_EXCPT_INFO_INV_SPDU_IN_SIZE    18
00167 #define ABP_FUSM_EXCPT_INFO_INV_SPDU_OUT_SIZE   19
00168 #define ABP_FUSM_EXCPT_INFO_BAD_FORMAT_IN_SPDU  20
00169 #define ABP_FUSM_EXCPT_INFO_SAFE_MOD_INIT_FAIL  21
00170 
00171 
00172 /*------------------------------------------------------------------------------
00173 **
00174 ** The Anybus-CC Functional Safety object specific message commands.
00175 **
00176 **------------------------------------------------------------------------------
00177 */
00178 
00179 #define ABP_FUSM_CMD_ERROR_CONFIRMATION       0x10
00180 
00181 
00182 #endif  /* inclusion lock */
00183 
00184 /*******************************************************************************
00185 **
00186 ** end of abp_fusm.h
00187 **
00188 ********************************************************************************
00189 */