include/dcf.h
author fbeaulier
Mon, 29 Aug 2011 17:44:49 +0200
changeset 666 9febdd6fdc71
parent 528 0a30e161d63c
child 669 50da44ebaf00
permissions -rw-r--r--
patch from Stefan Kratochwil <entwicklung@inovel.de> : canfestival-3-fm3_698.patch
Bug:
If an object dictionary entry was requested whose size exceeds
SDO_MAX_LENGTH_TRANSFERT, the memcpy() call at line 139 of objacces.c overwrites
the memory after *pDestData which causes stack corruption.
-> Bugfix:
The bug was corrected by size checking the requested data. An 'Out of
memory' error message will be generated if the requested data exceeds
SDO_MAX_LENGTH_TRANSFERT.

Additional changes:
Added dynamic buffer allocation for the SDO transfer. This feature can be used
if SDO_DYNAMIC_BUFFER_ALLOCATION is defined in config.h. The size of the
dynamically allocated buffer is controlled with
SDO_DYNAMIC_BUFFER_ALLOCATION_SIZE.
-> Note:
This change removes the detection of OD_LENGTH_DATA_INVALID errors!
178
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
     1
/*
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
     2
This file is part of CanFestival, a library implementing CanOpen Stack. 
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
     3
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
     4
Copyright (C): Edouard TISSERANT and Francis DUPIN
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
     5
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
     6
See COPYING file for copyrights details.
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
     7
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
     8
This library is free software; you can redistribute it and/or
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
     9
modify it under the terms of the GNU Lesser General Public
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
    10
License as published by the Free Software Foundation; either
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
    11
version 2.1 of the License, or (at your option) any later version.
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
    12
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
    13
This library is distributed in the hope that it will be useful,
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
    14
but WITHOUT ANY WARRANTY; without even the implied warranty of
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
    15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
    16
Lesser General Public License for more details.
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
    17
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
    18
You should have received a copy of the GNU Lesser General Public
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
    19
License along with this library; if not, write to the Free Software
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
    20
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
    21
*/
01d81faa3350 Add concise DCF support
greg
parents:
diff changeset
    22
528
0a30e161d63c Re-write doxygen tags in headers files to generate User API documentation
greg
parents: 349
diff changeset
    23
/** 
0a30e161d63c Re-write doxygen tags in headers files to generate User API documentation
greg
parents: 349
diff changeset
    24
 * @brief Send the consise dcf to node corresping to nodeId
0a30e161d63c Re-write doxygen tags in headers files to generate User API documentation
greg
parents: 349
diff changeset
    25
 * @param *d Pointer on a CAN object data structure
0a30e161d63c Re-write doxygen tags in headers files to generate User API documentation
greg
parents: 349
diff changeset
    26
 * @param nodeId Id of the slave node
0a30e161d63c Re-write doxygen tags in headers files to generate User API documentation
greg
parents: 349
diff changeset
    27
 * @return
0a30e161d63c Re-write doxygen tags in headers files to generate User API documentation
greg
parents: 349
diff changeset
    28
 */
349
1e6dd4ef46b9 fixed the DCF-LSS conflict
groke6
parents: 320
diff changeset
    29
UNS8 send_consise_dcf(CO_Data* d, UNS8 nodeId);