William Kane / Generic

Dependents:   LaserioLib

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers abp_pnio.h Source File

abp_pnio.h

00001 /*******************************************************************************
00002 ********************************************************************************
00003 **                                                                            **
00004 ** ABP version 7.16.01 (2015-10-14)                                           **
00005 **                                                                            */
00006 /*******************************************************************************
00007 ********************************************************************************
00008 **
00009 ** File Name
00010 ** ---------
00011 **
00012 ** abp_pnio.h
00013 **
00014 ********************************************************************************
00015 ********************************************************************************
00016 **
00017 ** Description
00018 ** -----------
00019 **
00020 ** abp_pnio.h - Anybus-CC Protocol Definitions for PROFINET Object.
00021 **
00022 ** This file contains network specific definitions used by the Anybus-CC
00023 ** PROFINET module as well as applications designed to use such module.
00024 **
00025 ********************************************************************************
00026 ********************************************************************************
00027 **                                                                            **
00028 ** COPYRIGHT NOTIFICATION (c) 2008 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_PNIO_H
00046 #define ABP_PNIO_H
00047 
00048 
00049 /*******************************************************************************
00050 **
00051 ** Anybus-CC PROFINET object constants.
00052 **
00053 ** Object revision: 1.
00054 **
00055 ********************************************************************************
00056 */
00057 
00058 /*------------------------------------------------------------------------------
00059 **
00060 ** The Anybus-CC PROFINET Object instance attributes.
00061 **
00062 **------------------------------------------------------------------------------
00063 */
00064 
00065 #define ABP_PNIO_IA_DEVICE_ID                   1
00066 #define ABP_PNIO_IA_VENDOR_ID                   2
00067 #define ABP_PNIO_IA_STATION_TYPE                3
00068 #define ABP_PNIO_IA_MAX_AR                      4
00069 /*
00070 ** Instance attributes 5-6 are reserved
00071 */
00072 #define ABP_PNIO_IA_RTM                         7
00073 #define ABP_PNIO_IA_IM_ORDER_ID                 8
00074 #define ABP_PNIO_IA_IM_SERIAL_NBR               9
00075 #define ABP_PNIO_IA_IM_HW_REV                   10
00076 #define ABP_PNIO_IA_IM_SW_REV                   11
00077 #define ABP_PNIO_IA_IM_REV_CNT                  12
00078 #define ABP_PNIO_IA_IM_PROFILE_ID               13
00079 #define ABP_PNIO_IA_IM_PROFILE_SPEC_TYPE        14
00080 #define ABP_PNIO_IA_IM_VER                      15
00081 #define ABP_PNIO_IA_IM_SUPPORTED                16
00082 #define ABP_PNIO_IA_PORT1_MAC_ADDRESS           17
00083 #define ABP_PNIO_IA_PORT2_MAC_ADDRESS           18
00084 #define ABP_PNIO_IA_SYSTEM_DESCRIPTION          19
00085 #define ABP_PNIO_IA_INTERFACE_DESCRIPTION       20
00086 #define ABP_PNIO_IA_MOD_ID_ASSIGN_MODE          21
00087 #define ABP_PNIO_IA_SYSTEM_CONTACT              22
00088 #define ABP_PNIO_IA_PROFIENERGY_FUNC            23
00089 
00090 /*------------------------------------------------------------------------------
00091 **
00092 ** The data size of the Anybus-CC PROFINET Object instance attributes (in
00093 ** bytes).
00094 **
00095 **------------------------------------------------------------------------------
00096 */
00097 
00098 #define ABP_PNIO_IA_DEVICE_ID_DS                   ABP_UINT16_SIZEOF
00099 #define ABP_PNIO_IA_VENDOR_ID_DS                   ABP_UINT16_SIZEOF
00100 #define ABP_PNIO_IA_STATION_TYPE_DS                ( 25 * ABP_UINT8_SIZEOF )
00101 #define ABP_PNIO_IA_MAX_AR_DS                      ABP_UINT32_SIZEOF
00102 #define ABP_PNIO_IA_RTM_DS                         ABP_UINT8_SIZEOF
00103 #define ABP_PNIO_IA_IM_ORDER_ID_DS                 ( 20 * ABP_UINT8_SIZEOF )
00104 #define ABP_PNIO_IA_IM_SERIAL_NBR_DS               ( 16 * ABP_UINT8_SIZEOF )
00105 #define ABP_PNIO_IA_IM_HW_REV_DS                   ABP_UINT16_SIZEOF
00106 #define ABP_PNIO_IA_IM_SW_REV_DS                   ( 4 * ABP_UINT8_SIZEOF )
00107 #define ABP_PNIO_IA_IM_REV_CNT_DS                  ABP_UINT16_SIZEOF
00108 #define ABP_PNIO_IA_IM_PROFILE_ID_DS               ABP_UINT16_SIZEOF
00109 #define ABP_PNIO_IA_IM_PROFILE_SPEC_TYPE_DS        ABP_UINT16_SIZEOF
00110 #define ABP_PNIO_IA_IM_VER_DS                      ( 2 * ABP_UINT8_SIZEOF )
00111 #define ABP_PNIO_IA_IM_SUPPORTED_DS                ABP_UINT16_SIZEOF
00112 #define ABP_PNIO_IA_PORT1_MAC_ADDRESS_DS           ( 6 * ABP_UINT8_SIZEOF )
00113 #define ABP_PNIO_IA_PORT2_MAC_ADDRESS_DS           ( 6 * ABP_UINT8_SIZEOF )
00114 #define ABP_PNIO_IA_SYSTEM_DESCRIPTION_DS          ( 255 * ABP_UINT8_SIZEOF )
00115 #define ABP_PNIO_IA_INTERFACE_DESCRIPTION_DS       ( 255 * ABP_UINT8_SIZEOF )
00116 #define ABP_PNIO_IA_MOD_ID_ASSIGN_MODE_DS          ( ABP_UINT8_SIZEOF )
00117 #define ABP_PNIO_IA_SYSTEM_CONTACT_DS              ( 255 * ABP_UINT8_SIZEOF )
00118 #define ABP_PNIO_IA_PROFIENERGY_FUNC_DS            ( ABP_UINT8_SIZEOF )
00119 
00120 /*------------------------------------------------------------------------------
00121 **
00122 ** The PROFINET IO object specific message commands.
00123 **
00124 **------------------------------------------------------------------------------
00125 */
00126 
00127 #define ABP_PNIO_CMD_GET_RECORD                    0x10
00128 #define ABP_PNIO_CMD_SET_RECORD                    0x11
00129 #define ABP_PNIO_CMD_GET_IM_RECORD                 0x12
00130 #define ABP_PNIO_CMD_SET_IM_RECORD                 0x13
00131 #define ABP_PNIO_CMD_AR_CHECK_IND                  0x14
00132 #define ABP_PNIO_CMD_CFG_MISMATCH_IND              0x15
00133 #define ABP_PNIO_CMD_AR_INFO_IND                   0x16
00134 #define ABP_PNIO_CMD_END_OF_PRM_IND                0x17
00135 #define ABP_PNIO_CMD_AR_ABORT_IND                  0x19
00136 #define ABP_PNIO_CMD_PLUG_SUB_FAILED               0x1A
00137 #define ABP_PNIO_CMD_EXPECTED_IDENT_IND            0x1B
00138 #define ABP_PNIO_CMD_SAVE_IP_SUITE                 0x1C
00139 #define ABP_PNIO_CMD_SAVE_STATION_NAME             0x1D
00140 
00141 /*------------------------------------------------------------------------------
00142 **
00143 ** The data size of the PROFINET Object specific message commands.
00144 **
00145 **------------------------------------------------------------------------------
00146 */
00147 
00148 #define ABP_PNIO_CMD_GET_RECORD_DS                 11
00149 #define ABP_PNIO_CMD_SET_RECORD_DS                 255
00150 #define ABP_PNIO_CMD_GET_IM_RECORD_DS              4
00151 #define ABP_PNIO_CMD_SET_IM_RECORD_DS              255
00152 #define ABP_PNIO_CMD_AR_CHECK_IND_DS               255
00153 #define ABP_PNIO_CMD_CFG_MISMATCH_IND_DS           16
00154 #define ABP_PNIO_CMD_AR_INFO_IND_DS                255
00155 #define ABP_PNIO_CMD_END_OF_PRM_IND_DS             8
00156 #define ABP_PNIO_CMD_AR_ABORT_IND_DS               2
00157 #define ABP_PNIO_CMD_PLUG_SUB_FAILED_DS            8
00158 #define ABP_PNIO_CMD_EXPECTED_IDENT_IND_DS         255
00159 
00160 /*------------------------------------------------------------------------------
00161 **
00162 ** Response codes for Expected_Ident_Ind
00163 **
00164 **------------------------------------------------------------------------------
00165 */
00166 
00167 #define ABP_PNIO_RSP_EXPECTED_IDENT_IND_CONT   0
00168 #define ABP_PNIO_RSP_EXPECTED_IDENT_IND_BLOCK  1
00169 
00170 /*------------------------------------------------------------------------------
00171 **
00172 ** PROFINET IO specific exception information codes.
00173 **
00174 **------------------------------------------------------------------------------
00175 */
00176 
00177 #define ABP_PNIO_NW_EXCPT_ILLEGAL_VALUE         1
00178 #define ABP_PNIO_NW_EXCPT_WRONG_DATA_SIZE       2
00179 #define ABP_PNIO_NW_EXCPT_ILLEGAL_RSP           3
00180 #define ABP_PNIO_NW_EXCPT_MISSING_MAC_ADDRESS   4
00181 #define ABP_PNIO_NW_EXCPT_CMD_TIMEOUT           5
00182 
00183 #endif  /* inclusion lock */
00184 
00185 /*******************************************************************************
00186 **
00187 ** end of abp_pnio.h
00188 **
00189 ********************************************************************************
00190 */