include/objacces.h
changeset 71 95cd3376cc9f
parent 13 0e43acff2c96
child 75 debc68b124b7
equal deleted inserted replaced
70:f36f09f08b62 71:95cd3376cc9f
    40 
    40 
    41 #include "data.h"
    41 #include "data.h"
    42 
    42 
    43 
    43 
    44 
    44 
    45 /**
    45 /*
    46 Print MSG_WAR (s) if error to the access to the object dictionary occurs.
    46 Print MSG_WAR (s) if error to the access to the object dictionary occurs.
    47 You must uncomment the lines*/ 
    47 You must uncomment the lines
    48 //#define DEBUG_CAN
    48 //#define DEBUG_CAN
    49 //#define DEBUG_WAR_CONSOLE_ON
    49 //#define DEBUG_WAR_CONSOLE_ON
    50 //#define DEBUG_ERR_CONSOLE_ON
    50 //#define DEBUG_ERR_CONSOLE_ON
    51 /*in the file objaccess.c
    51 in the file objaccess.c
    52 sizeDataDict : Size of the data defined in the dictionary
    52 sizeDataDict : Size of the data defined in the dictionary
    53 sizeDataGiven : Size data given by the user.
    53 sizeDataGiven : Size data given by the user.
    54 code : error code to print. (SDO abort code. See file def.h)
    54 code : error code to print. (SDO abort code. See file def.h)
    55 Beware that sometimes, we force the sizeDataDict or sizeDataGiven to 0, when we wants to use
    55 Beware that sometimes, we force the sizeDataDict or sizeDataGiven to 0, when we wants to use
    56 this function but we do not have the access to the right value. One example is
    56 this function but we do not have the access to the right value. One example is
    58 */
    58 */
    59 #ifdef DEBUG_WAR_CONSOLE_ON
    59 #ifdef DEBUG_WAR_CONSOLE_ON
    60 UNS8 accessDictionaryError(UNS16 index, UNS8 subIndex, 
    60 UNS8 accessDictionaryError(UNS16 index, UNS8 subIndex, 
    61 			   UNS8 sizeDataDict, UNS8 sizeDataGiven, UNS32 code);
    61 			   UNS8 sizeDataDict, UNS8 sizeDataGiven, UNS32 code);
    62 #else
    62 #else
    63 #define accessDictionaryError(...) 
    63 /*#define accessDictionaryError(...) */
    64 #endif
    64 #endif
    65 
    65 
    66 /** Reads an entry from the object dictionary.\n
    66 /* Reads an entry from the object dictionary.\n
    67  *  \code
    67  *  \code
    68  *  // Example usage:
    68  *  // Example usage:
    69  *  UNS8  *pbData;
    69  *  UNS8  *pbData;
    70  *  UNS8 length;
    70  *  UNS8 length;
    71  *  UNS32 returnValue;
    71  *  UNS32 returnValue;
    99 		  UNS8 * pExpectedSize,
    99 		  UNS8 * pExpectedSize,
   100 		  UNS8 * pDataType,
   100 		  UNS8 * pDataType,
   101 		  UNS8 checkAccess);
   101 		  UNS8 checkAccess);
   102 
   102 
   103 
   103 
   104 /** By this function you can write an entry into the object dictionary\n
   104 /* By this function you can write an entry into the object dictionary\n
   105  *  \code
   105  *  \code
   106  *  // Example usage:
   106  *  // Example usage:
   107  *  UNS8 B;
   107  *  UNS8 B;
   108  *  B = 0xFF; // set transmission type
   108  *  B = 0xFF; // set transmission type
   109  *
   109  *
   127 		  void * pSourceData, 
   127 		  void * pSourceData, 
   128 		  UNS8 * pExpectedSize, 
   128 		  UNS8 * pExpectedSize, 
   129 		  UNS8 checkAccess);
   129 		  UNS8 checkAccess);
   130 
   130 
   131 
   131 
   132 /** Scan the index of object dictionary. Used only by setODentry and getODentry.
   132 /* Scan the index of object dictionary. Used only by setODentry and getODentry.
   133  *  *errorCode :  OD_SUCCESSFUL if index foundor SDO abort code. (See file def.h)
   133  *  *errorCode :  OD_SUCCESSFUL if index foundor SDO abort code. (See file def.h)
   134  *  Return NULL if index not found. Else : return the table part of the object dictionary.
   134  *  Return NULL if index not found. Else : return the table part of the object dictionary.
   135  */
   135  */
   136  const indextable * scanIndexOD (CO_Data* d, UNS16 wIndex, UNS32 *errorCode, ODCallback_t **Callback);
   136  const indextable * scanIndexOD (CO_Data* d, UNS16 wIndex, UNS32 *errorCode, ODCallback_t **Callback);
   137 
   137 
   138 UNS32 RegisterSetODentryCallBack(CO_Data* d, UNS16 wIndex, UNS8 bSubindex, ODCallback_t Callback);
   138 UNS32 RegisterSetODentryCallBack(CO_Data* d, UNS16 wIndex, UNS8 bSubindex, ODCallback_t Callback);
   139 
   139 
   140 #endif // __objacces_h__
   140 #endif /* __objacces_h__ */