CANfestival - an open source CANopen framework

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

objacces.c File Reference

objacces.c File Reference

Go to the source code of this file.

Functions

UNS8 accessDictionaryError (UNS16 index, UNS8 subIndex, UNS32 sizeDataDict, UNS32 sizeDataGiven, UNS32 code)
 Print MSG_WAR (s) if error to the access to the object dictionary occurs.
const indextablescanIndexOD (CO_Data *d, UNS16 wIndex, UNS32 *errorCode, ODCallback_t **Callback)
 Scan the index of object dictionary.

Detailed Description

Author:
Edouard TISSERANT and Francis DUPIN
Date:
Tue Jun 5 08:55:23 2007

Definition in file objacces.c.


Function Documentation

UNS8 accessDictionaryError ( UNS16  index,
UNS8  subIndex,
UNS32  sizeDataDict,
UNS32  sizeDataGiven,
UNS32  code 
)

Print MSG_WAR (s) if error to the access to the object dictionary occurs.

You must uncomment the lines in the file objaccess.c :
//define DEBUG_CAN
//define DEBUG_WAR_CONSOLE_ON
//define DEBUG_ERR_CONSOLE_ON

Beware that sometimes, we force the sizeDataDict or sizeDataGiven to 0, when we wants to use this function but we do not have the access to the right value. One example is getSDOerror(). So do not take attention to these variables if they are null.

Parameters:
index
subIndex
sizeDataDictSize of the data defined in the dictionary
sizeDataGivenSize data given by the user.
codeerror code to print. (SDO abort code. See file def.h)
Returns:

Definition at line 45 of file objacces.c.

const indextable* scanIndexOD ( CO_Data d,
UNS16  wIndex,
UNS32 *  errorCode,
ODCallback_t **  Callback 
)

Scan the index of object dictionary.

Used only by setODentry and getODentry.

Parameters:
*dPointer to a CAN object data structure
wIndex
*errorCode: OD_SUCCESSFUL if index foundor SDO abort code. (See file def.h)
**Callback
Returns:
NULL if index not found. Else : return the table part of the object dictionary.

Definition at line 265 of file objacces.c.