Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
abp_fsi.h
00001 /******************************************************************************* 00002 ******************************************************************************** 00003 ** ** 00004 ** ABP version 7.16.01 (2015-10-14) ** 00005 ** */ 00006 /******************************************************************************* 00007 ******************************************************************************** 00008 ** 00009 ** File Name 00010 ** --------- 00011 ** 00012 ** abp_fsi.h 00013 ** 00014 ******************************************************************************** 00015 ******************************************************************************** 00016 ** 00017 ** Description 00018 ** ----------- 00019 ** 00020 ** ABP - Anybus-CC File System Interface Object Protocol Definitions. 00021 ** 00022 ** This software component contains FSI definitions used by Anybus-CC 00023 ** modules as well as applications designed to use such modules. 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_FSI_H 00046 #define ABP_FSI_H 00047 00048 00049 /******************************************************************************* 00050 ** 00051 ** File System Interface object constants. 00052 ** 00053 ** Object revision: 1. 00054 ** 00055 ******************************************************************************** 00056 */ 00057 00058 /*------------------------------------------------------------------------------ 00059 ** 00060 ** The File System Interface object specific object attributes. 00061 ** 00062 **------------------------------------------------------------------------------ 00063 */ 00064 00065 #define ABP_FSI_OA_MAX_INST 11 /* Max number of instances */ 00066 #define ABP_FSI_OA_DISABLE_VFS 12 /* Disables VFS */ 00067 #define ABP_FSI_OA_TOTAL_DISC_SIZE 13 /* Total size for discs */ 00068 #define ABP_FSI_OA_FREE_DISC_SIZE 14 /* Free size for discs */ 00069 #define ABP_FSI_OA_DISC_CRC 15 /* CRC of disc content */ 00070 00071 00072 /*------------------------------------------------------------------------------ 00073 ** 00074 ** The data size of the Anybus-CC File System Interface object specific 00075 ** attributes (in bytes). 00076 ** 00077 **------------------------------------------------------------------------------ 00078 */ 00079 00080 #define ABP_FSI_OA_MAX_INST_DS ABP_UINT16_SIZEOF 00081 #define ABP_FSI_OA_DISABLE_VFS_DS ABP_BOOL_SIZEOF 00082 #define ABP_FSI_OA_TOTAL_DISC_SIZE_DS ABP_UINT32_SIZEOF 00083 #define ABP_FSI_OA_FREE_DISC_SIZE_DS ABP_UINT32_SIZEOF 00084 #define ABP_FSI_OA_DISC_CRC_SIZE_DS ABP_UINT32_SIZEOF 00085 00086 00087 /*------------------------------------------------------------------------------ 00088 ** 00089 ** The File System Interface instance attributes. 00090 ** 00091 **------------------------------------------------------------------------------ 00092 */ 00093 00094 #define ABP_FSI_IA_TYPE 1 /* Instance type */ 00095 #define ABP_FSI_IA_FILE_SIZE 2 /* File size */ 00096 #define ABP_FSI_IA_PATH 3 /* Current instance path */ 00097 00098 00099 /*------------------------------------------------------------------------------ 00100 ** 00101 ** The data size of the Anybus-CC File System Interface object instance 00102 ** attributes (in bytes). 00103 ** 00104 **------------------------------------------------------------------------------ 00105 */ 00106 00107 #define ABP_FSI_IA_TYPE_DS ABP_UINT8_SIZEOF 00108 #define ABP_FSI_IA_FILE_SIZE_DS ABP_UINT32_SIZEOF 00109 00110 00111 /*------------------------------------------------------------------------------ 00112 ** 00113 ** The File System Interface object specific message commands. 00114 ** 00115 **------------------------------------------------------------------------------ 00116 */ 00117 00118 #define ABP_FSI_CMD_FILE_OPEN 0x10 00119 #define ABP_FSI_CMD_FILE_CLOSE 0x11 00120 #define ABP_FSI_CMD_FILE_DELETE 0x12 00121 #define ABP_FSI_CMD_FILE_COPY 0x13 00122 #define ABP_FSI_CMD_FILE_RENAME 0x14 00123 #define ABP_FSI_CMD_FILE_READ 0x15 00124 #define ABP_FSI_CMD_FILE_WRITE 0x16 00125 #define ABP_FSI_CMD_DIRECTORY_OPEN 0x20 00126 #define ABP_FSI_CMD_DIRECTORY_CLOSE 0x21 00127 #define ABP_FSI_CMD_DIRECTORY_DELETE 0x22 00128 #define ABP_FSI_CMD_DIRECTORY_READ 0x23 00129 #define ABP_FSI_CMD_DIRECTORY_CREATE 0x24 00130 #define ABP_FSI_CMD_DIRECTORY_CHANGE 0x25 00131 #define ABP_FSI_CMD_FORMAT_DISC 0x30 00132 00133 00134 /*------------------------------------------------------------------------------ 00135 ** 00136 ** Max number of characters in the path. 00137 ** 00138 **------------------------------------------------------------------------------ 00139 */ 00140 00141 #define ABP_FSI_MAX_PATH_LENGTH 126 00142 00143 00144 /*------------------------------------------------------------------------------ 00145 ** 00146 ** Instance types. 00147 ** 00148 **------------------------------------------------------------------------------ 00149 */ 00150 00151 #define ABP_FSI_TYPE_NONE 0 /* Instance holds nothing */ 00152 #define ABP_FSI_TYPE_FILE 1 /* Instance holds a file */ 00153 #define ABP_FSI_TYPE_DIRECTORY 2 /* Instance holds a directory */ 00154 00155 00156 /*------------------------------------------------------------------------------ 00157 ** 00158 ** File open command modes. 00159 ** 00160 **------------------------------------------------------------------------------ 00161 */ 00162 00163 #define ABP_FSI_FILE_OPEN_READ_MODE 0x00 00164 #define ABP_FSI_FILE_OPEN_WRITE_MODE 0x01 00165 #define ABP_FSI_FILE_OPEN_APPEND_MODE 0x02 00166 00167 00168 /*------------------------------------------------------------------------------ 00169 ** 00170 ** Directory read object flags. 00171 ** 00172 **------------------------------------------------------------------------------ 00173 */ 00174 00175 #define ABP_FSI_DIRECTORY_READ_DIRECTORY 0x01 00176 #define ABP_FSI_DIRECTORY_READ_READ_ONLY 0x02 00177 #define ABP_FSI_DIRECTORY_READ_HIDDEN 0x04 00178 #define ABP_FSI_DIRECTORY_READ_SYSTEM 0x08 00179 00180 00181 /*------------------------------------------------------------------------------ 00182 ** 00183 ** File System Interface object specific error codes. 00184 ** 00185 **------------------------------------------------------------------------------ 00186 */ 00187 00188 #define ABP_FSI_ERR_FILE_OPEN_FAILED 1 00189 #define ABP_FSI_ERR_FILE_CLOSE_FAILED 2 00190 #define ABP_FSI_ERR_FILE_DELETE_FAILED 3 00191 #define ABP_FSI_ERR_DIRECTORY_OPEN_FAILED 4 00192 #define ABP_FSI_ERR_DIRECTORY_CLOSE_FAILED 5 00193 #define ABP_FSI_ERR_DIRECTORY_CREATE_FAILED 6 00194 #define ABP_FSI_ERR_DIRECTORY_DELETE_FAILED 7 00195 #define ABP_FSI_ERR_DIRECTORY_CHANGE_FAILED 8 00196 #define ABP_FSI_ERR_FILE_COPY_OPEN_READ_FAILED 9 00197 #define ABP_FSI_ERR_FILE_COPY_OPEN_WRITE_FAILED 10 00198 #define ABP_FSI_ERR_FILE_COPY_WRITE_FAILED 11 00199 #define ABP_FSI_ERR_FILE_RENAME_FAILED 12 00200 00201 00202 #endif /* inclusion lock */ 00203 00204 /******************************************************************************* 00205 ** 00206 ** End of abp_fsi.h 00207 ** 00208 ******************************************************************************** 00209 */
Generated on Tue Jul 12 2022 15:51:57 by
