include/objacces.h File Reference

Responsible for accessing the object dictionary. More...

#include <applicfg.h>

Include dependency graph for objacces.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define getODentry(OD, wIndex, bSubindex, pDestData, pExpectedSize, pDataType,checkAccess)
 getODentry() to read from object and endianize
#define readLocalDict(OD, wIndex, bSubindex, pDestData, pExpectedSize, pDataType,checkAccess)
 readLocalDict() reads an entry from the object dictionary, but in contrast to getODentry(), readLocalDict() doesn't endianize entry and reads entry in machine native endianness.
#define setODentry(d, wIndex, bSubindex, pSourceData, pExpectedSize, checkAccess)
 setODentry converts SourceData from network byte order to machine native format, and writes that to OD.
#define writeLocalDict(d, wIndex, bSubindex, pSourceData, pExpectedSize, checkAccess)   _setODentry( d, wIndex, bSubindex, pSourceData, pExpectedSize, checkAccess, 0)
 Writes machine native SourceData to OD.

Functions

UNS8 accessDictionaryError (UNS16 index, UNS8 subIndex, UNS8 sizeDataDict, UNS8 sizeDataGiven, UNS32 code)
 Print MSG_WAR (s) if error to the access to the object dictionary occurs.
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.


Detailed Description

Responsible for accessing the object dictionary.

This file contains functions for accessing the object dictionary and variables that are contained by the object dictionary. Accessing the object dictionary contains setting local variables as PDOs and accessing (read/write) all entries of the object dictionary

Warning:
Only the basic entries of an object dictionary are included at the moment.

Definition in file objacces.h.


Function Documentation

UNS8 accessDictionaryError ( UNS16  index,
UNS8  subIndex,
UNS8  sizeDataDict,
UNS8  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 
sizeDataDict Size of the data defined in the dictionary
sizeDataGiven Size data given by the user.
code error code to print. (SDO abort code. See file def.h)
Returns:

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:
*d Pointer 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 263 of file objacces.c.

References struct_CO_Data::scanIndexOD.

Referenced by PDOInit().


Generated on Wed Feb 4 12:17:16 2009 for CanFestival by  doxygen 1.5.6