include/objacces.h
author lbessard
Thu, 28 Aug 2008 15:08:19 +0200
changeset 515 62b6520332e9
parent 469 f2b07ea215b5
child 528 0a30e161d63c
permissions -rw-r--r--
Some instance type test improved
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     1
/*
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     2
This file is part of CanFestival, a library implementing CanOpen Stack. 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     3
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     4
Copyright (C): Edouard TISSERANT and Francis DUPIN
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     5
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     6
See COPYING file for copyrights details.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     7
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     8
This library is free software; you can redistribute it and/or
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     9
modify it under the terms of the GNU Lesser General Public
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    10
License as published by the Free Software Foundation; either
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    11
version 2.1 of the License, or (at your option) any later version.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    12
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    13
This library is distributed in the hope that it will be useful,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    14
but WITHOUT ANY WARRANTY; without even the implied warranty of
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    16
Lesser General Public License for more details.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    17
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    18
You should have received a copy of the GNU Lesser General Public
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    19
License along with this library; if not, write to the Free Software
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    20
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    21
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    22
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    23
/** \file
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    24
 *  \brief Responsible for accessing the object dictionary.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    25
 *
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    26
 *  This file contains functions for accessing the object dictionary and
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    27
 *  variables that are contained by the object dictionary.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    28
 *  Accessing the object dictionary contains setting local variables
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    29
 *  as PDOs and accessing (read/write) all entries of the object dictionary
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    30
 *  \warning Only the basic entries of an object dictionary are included
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    31
 *           at the moment.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    32
 */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    33
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    34
#ifndef __objacces_h__
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    35
#define __objacces_h__
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    36
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    37
#include <applicfg.h>
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    38
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    39
typedef UNS32 (*valueRangeTest_t)(UNS8 typeValue, void *Value);
378
d2abf6c8c27b As requested long ago, added CoData* parameter to all this applications callback, let application designer use identical callback for multiple nodes, and reduce source code length.
etisserant
parents: 175
diff changeset
    40
typedef void (* storeODSubIndex_t)(CO_Data* d, UNS16 wIndex, UNS8 bSubindex);
d2abf6c8c27b As requested long ago, added CoData* parameter to all this applications callback, let application designer use identical callback for multiple nodes, and reduce source code length.
etisserant
parents: 175
diff changeset
    41
void _storeODSubIndex (CO_Data* d, UNS16 wIndex, UNS8 bSubindex);
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    42
71
95cd3376cc9f compilator compatitibility
frdupin
parents: 13
diff changeset
    43
/*
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    44
Print MSG_WAR (s) if error to the access to the object dictionary occurs.
71
95cd3376cc9f compilator compatitibility
frdupin
parents: 13
diff changeset
    45
You must uncomment the lines
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    46
//#define DEBUG_CAN
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    47
//#define DEBUG_WAR_CONSOLE_ON
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    48
//#define DEBUG_ERR_CONSOLE_ON
71
95cd3376cc9f compilator compatitibility
frdupin
parents: 13
diff changeset
    49
in the file objaccess.c
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    50
sizeDataDict : Size of the data defined in the dictionary
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    51
sizeDataGiven : Size data given by the user.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    52
code : error code to print. (SDO abort code. See file def.h)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    53
Beware that sometimes, we force the sizeDataDict or sizeDataGiven to 0, when we wants to use
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    54
this function but we do not have the access to the right value. One example is
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    55
getSDOerror(). So do not take attention to these variables if they are null.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    56
*/
75
debc68b124b7 compiler compatibility : accessDictionaryError contains nothing out of debogue mode
frdupin
parents: 71
diff changeset
    57
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    58
UNS8 accessDictionaryError(UNS16 index, UNS8 subIndex, 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    59
			   UNS8 sizeDataDict, UNS8 sizeDataGiven, UNS32 code);
75
debc68b124b7 compiler compatibility : accessDictionaryError contains nothing out of debogue mode
frdupin
parents: 71
diff changeset
    60
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    61
469
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
    62
/* _getODentry() Reads an entry from the object dictionary.\n
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
    63
 * 
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
    64
 *    use getODentry() macro to read from object and endianize
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
    65
 *    use readLocalDict() macro to read from object and not endianize   
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
    66
 *
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    67
 *  \code
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    68
 *  // Example usage:
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    69
 *  UNS8  *pbData;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    70
 *  UNS8 length;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    71
 *  UNS32 returnValue;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    72
 *
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    73
 *  returnValue = getODentry( (UNS16)0x100B, (UNS8)1, 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    74
 *  (void * *)&pbData, (UNS8 *)&length );
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    75
 *  if( returnValue != SUCCESSFUL )
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    76
 *  {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    77
 *      // error handling
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    78
 *  }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    79
 *  \endcode 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    80
 *  \param wIndex The index in the object dictionary where you want to read
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    81
 *                an entry
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    82
 *  \param bSubindex The subindex of the Index. e.g. mostly subindex 0 is
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    83
 *                   used to tell you how many valid entries you can find
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    84
 *                   in this index. Look at the canopen standard for further
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    85
 *                   information
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    86
 *  \param ppbData Pointer to the pointer which points to the variable where
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    87
 *                 the value of this object dictionary entry should be copied
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    88
 *  \param pdwSize This function writes the size of the copied value (in Byte)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    89
 *                 into this variable.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    90
 *  \param pDataType : The type of the data. See objdictdef.h
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    91
 *  \param CheckAccess if other than 0, do not read if the data is Write Only
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    92
 *                     [Not used today. Put always 0].
469
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
    93
 *  \param Endianize  when not 0, data is endianized into network byte order
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
    94
 *                    when 0, data is not endianized and copied in machine native
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
    95
 *                    endianness 
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    96
 *  \return OD_SUCCESSFUL or SDO abort code. (See file def.h)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    97
 */
469
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
    98
UNS32 _getODentry( CO_Data* d, 
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
    99
		  UNS16 wIndex,
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   100
		  UNS8 bSubindex,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   101
		  void * pDestData,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   102
		  UNS8 * pExpectedSize,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   103
		  UNS8 * pDataType,
469
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   104
		  UNS8 checkAccess,
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   105
		  UNS8 endianize);
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   106
469
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   107
#define getODentry( OD, wIndex, bSubindex, pDestData, pExpectedSize, \
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   108
		          pDataType,  checkAccess)                         \
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   109
       _getODentry( OD, wIndex, bSubindex, pDestData, pExpectedSize, \
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   110
		          pDataType,  checkAccess, 1)            
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   111
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   112
/*
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   113
 * readLocalDict() reads an entry from the object dictionary, but in 
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   114
 * contrast to getODentry(), readLocalDict() doesn't endianize entry and reads
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   115
 * entry in machine native endianness.
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   116
 */
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   117
#define readLocalDict( OD, wIndex, bSubindex, pDestData, pExpectedSize, \
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   118
		          pDataType,  checkAccess)                         \
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   119
       _getODentry( OD, wIndex, bSubindex, pDestData, pExpectedSize, \
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   120
		          pDataType,  checkAccess, 0)
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   121
71
95cd3376cc9f compilator compatitibility
frdupin
parents: 13
diff changeset
   122
/* By this function you can write an entry into the object dictionary\n
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   123
 *  \code
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   124
 *  // Example usage:
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   125
 *  UNS8 B;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   126
 *  B = 0xFF; // set transmission type
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   127
 *
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   128
 *  retcode = setODentry( (UNS16)0x1800, (UNS8)2, &B, sizeof(UNS8), 1 );
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   129
 *  \endocde
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   130
 *  \param wIndex The index in the object dictionary where you want to write
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   131
 *                an entry
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   132
 *  \param bSubindex The subindex of the Index. e.g. mostly subindex 0 is
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   133
 *                   used to tell you how many valid entries you can find
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   134
 *                   in this index. Look at the canopen standard for further
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   135
 *                   information
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   136
 *  \param pbData Pointer to the variable that holds the value that should
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   137
 *                 be copied into the object dictionary
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   138
 *  \param dwSize The size of the value (in Byte).
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   139
 *  \param CheckAccess if other than 0, do not read if the data is Read Only or Constant
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   140
 *  \return OD_SUCCESSFUL or SDO abort code. (See file def.h)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   141
 */
469
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   142
UNS32 _setODentry( CO_Data* d,
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   143
                   UNS16 wIndex,
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   144
                   UNS8 bSubindex,
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   145
                   void * pSourceData,
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   146
                   UNS8 * pExpectedSize,
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   147
                   UNS8 checkAccess,
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   148
                   UNS8 endianize);
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   149
469
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   150
/*
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   151
 * setODentry converts SourceData from network byte order to machine native 
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   152
 *            format, and writes that to OD.
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   153
 */
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   154
#define setODentry( d, wIndex, bSubindex, pSourceData, pExpectedSize, checkAccess) \
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   155
       _setODentry( d, wIndex, bSubindex, pSourceData, pExpectedSize, checkAccess, 1)
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   156
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   157
/*
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   158
 * writeLocalDict writes machine native SourceData to OD.
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   159
 */
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   160
#define writeLocalDict( d, wIndex, bSubindex, pSourceData, pExpectedSize, checkAccess) \
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   161
       _setODentry( d, wIndex, bSubindex, pSourceData, pExpectedSize, checkAccess, 0)
f2b07ea215b5 Applied edward's patch for OD acces macros (optimization) and boudaries check (safety).
etisserant
parents: 378
diff changeset
   162
175
e255529b6f7d Added writeLocalDict and readLocalDict, that have to be called from application instead of getODEntry and setODEntry. Fix potential endianization problem.
etisserant
parents: 161
diff changeset
   163
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   164
71
95cd3376cc9f compilator compatitibility
frdupin
parents: 13
diff changeset
   165
/* Scan the index of object dictionary. Used only by setODentry and getODentry.
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   166
 *  *errorCode :  OD_SUCCESSFUL if index foundor SDO abort code. (See file def.h)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   167
 *  Return NULL if index not found. Else : return the table part of the object dictionary.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   168
 */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   169
 const indextable * scanIndexOD (CO_Data* d, UNS16 wIndex, UNS32 *errorCode, ODCallback_t **Callback);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   170
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   171
UNS32 RegisterSetODentryCallBack(CO_Data* d, UNS16 wIndex, UNS8 bSubindex, ODCallback_t Callback);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   172
71
95cd3376cc9f compilator compatitibility
frdupin
parents: 13
diff changeset
   173
#endif /* __objacces_h__ */