examples/AppliMaster_HCS12/objdict.c
author dejoigny
Wed, 17 May 2006 20:40:17 +0200
changeset 12 1d3b9ad366c8
parent 0 4472ee7c6c3e
permissions -rwxr-xr-x
CANOPEN_BIG_ENDIAN :
fonctionne pour SDO et PDO.
SDO segment?s test?s en upload et download. Semble ok.
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
#include <stddef.h>
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    24
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    25
#include <applicfg.h>
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    26
#include "def.h"
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    27
#include "can.h"
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    28
#include "objdictdef.h"
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    29
#include "pdo.h"
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    30
#include "sdo.h"
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    31
#include "sync.h"
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    32
#include "lifegrd.h"
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    33
#include "nmtSlave.h"
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    34
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    35
/**************************************************************************/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    36
/* Declaration of the mapped variables                                    */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    37
/**************************************************************************/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    38
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    39
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    40
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    41
/*// Copy and uncomment this code to your main file
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    42
extern UNS32 canopenErrNB_node5;		// Mapped at index 0x6000, subindex 0x00
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    43
extern UNS32 canopenErrVAL_node5;		// Mapped at index 0x6001, subindex 0x00
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    44
extern UNS8 second;		// Mapped at index 0x6002, subindex 0x01
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    45
extern UNS8 minutes;		// Mapped at index 0x6002, subindex 0x02
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    46
extern UNS8 hour;		// Mapped at index 0x6002, subindex 0x03
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    47
extern UNS8 day;		// Mapped at index 0x6002, subindex 0x04
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    48
extern UNS32 canopenErrNB;		// Mapped at index 0x6003, subindex 0x01
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    49
extern UNS32 canopenErrVAL;		// Mapped at index 0x6003, subindex 0x02
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    50
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    51
// END copy to main file
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    52
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    53
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    54
UNS32 canopenErrNB_node5;		// Mapped at index 0x6000, subindex 0x00
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    55
UNS32 canopenErrVAL_node5;		// Mapped at index 0x6001, subindex 0x00
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    56
UNS8 second;		// Mapped at index 0x6002, subindex 0x01
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    57
UNS8 minutes;		// Mapped at index 0x6002, subindex 0x02
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    58
UNS8 hour;		// Mapped at index 0x6002, subindex 0x03
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    59
UNS8 day;		// Mapped at index 0x6002, subindex 0x04
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    60
UNS32 canopenErrNB;		// Mapped at index 0x6003, subindex 0x01
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    61
UNS32 canopenErrVAL;		// Mapped at index 0x6003, subindex 0x02
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    62
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    63
/**************************************************************************/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    64
/* Declaration of the value range types                                   */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    65
/**************************************************************************/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    66
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    67
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    68
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    69
UNS32 valueRangeTest (UNS8 typeValue, UNS32 unsValue, REAL32 realValue)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    70
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    71
  return 0;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    72
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    73
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    74
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    75
/**************************************************************************/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    76
/* The node id                                                            */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    77
/**************************************************************************/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    78
/* Computed by strNode */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    79
/* node_id default value. 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    80
   This default value is deprecated.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    81
   You should always overwrite this by using the function setNodeId(UNS8 nodeId) in your C code.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    82
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    83
#define NODE_ID 0x01
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    84
UNS8 bDeviceNodeId = NODE_ID;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    85
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    86
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    87
//*****************************************************************************/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    88
/* Computed by strStartDico */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    89
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    90
/* Array of message processing information */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    91
/* Should not be modified */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    92
volatile const proceed_info proceed_infos[] = {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    93
  {NMT,		"NMT",	        NULL},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    94
  {SYNC,        "SYNC",         proceedSYNC},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    95
  {TIME_STAMP,	"TStmp",	NULL},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    96
  {PDO1tx,	"PDO1t",        proceedPDO},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    97
  {PDO1rx,	"PDO1r",	proceedPDO},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    98
  {PDO2tx,	"PDO2t",	proceedPDO},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    99
  {PDO2rx,	"PDO2r",	proceedPDO},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   100
  {PDO3tx,	"PDO3t",	proceedPDO},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   101
  {PDO3rx,	"PDO3r",	proceedPDO},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   102
  {PDO4tx,	"PDO4t",	proceedPDO},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   103
  {PDO4rx,	"PDO4r",	proceedPDO},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   104
  {SDOtx,	"SDOt",	        proceedSDO},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   105
  {SDOrx,	"SDOr",         proceedSDO},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   106
  {0xD,		"Unkw",	        NULL},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   107
  {NODE_GUARD,	"NGrd",         proceedNMTerror},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   108
  {0xF,		"Unkw",	        NULL}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   109
};
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   110
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   111
  // Macros definition
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   112
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   113
/* Beware : 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   114
index                 *must* be writen 4 numbers in hexa
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   115
sub_index             *must* be writen 2 numbers in hexa
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   116
size_variable_in_UNS8 *must* be writen 2 numbers in hexa
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   117
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   118
#define PDO_MAP(index, sub_index, size_variable_in_bits)\
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   119
0x ## index ## sub_index ## size_variable_in_bits
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   120
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   121
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   122
//
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   123
//                       OBJECT DICTIONARY
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   124
//                   
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   125
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   126
// Make your change, depending of your application
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   127
 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   128
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   129
/* index 0x1000 :   Device type. 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   130
                    You have to change the value below, so
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   131
                    it fits your canopen-slave-module */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   132
 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   133
                    /* Not used, so, should not be modified */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   134
                    
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   135
                    UNS32 obj1000 = 0;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   136
                    subindex Index1000[] =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   137
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   138
                      { RO, uint32, sizeof(UNS32), (void*)&obj1000 }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   139
                    };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   140
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   141
/* index 0x1001 :   Error register. 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   142
                    Change the entries to fit your application 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   143
                    Not used, so, should not be modified */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   144
                    /*const*/ UNS8 obj1001 = 0x0;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   145
                    /*const*/ subindex Index1001[] =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   146
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   147
                      { RO, uint8, sizeof(UNS8), (void*)&obj1001 }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   148
                    };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   149
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   150
/* index 0x1005 :   COB_ID SYNC */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   151
                    /* Should not be modified */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   152
                    UNS32 obj1005 = 0x00000080; // bit 30 = 1 : device can generate a SYNC message
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   153
                                                // Beware, it is over written when the node 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   154
                                                // enters in reset mode
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   155
                                                // See initResetMode() in init.c
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   156
                    /*const*/ subindex Index1005[] =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   157
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   158
                      { RW, uint32, sizeof(UNS32), (void*)&obj1005 }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   159
                    };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   160
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   161
/* index 0x1006 :   SYNC period */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   162
                    // For producing the SYNC signal every n micro-seconds.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   163
                    // Put O to not producing SYNC
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   164
                    /*const*/ UNS32 obj1006 = 0x0; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   165
                                         // Default 0 to not produce SYNC //
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   166
                                         // Beware, it is over written when the 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   167
                                         // node enters in reset mode.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   168
                                         // See initResetMode() in init.c
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   169
                    /*const*/ subindex Index1006[] =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   170
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   171
                      { RW, uint32, sizeof(UNS32), (void*)&obj1006 }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   172
                    };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   173
 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   174
/* index 0x1007 :   Synchronous Window Length
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   175
                    Seems to be needed by DS401 to generate the SYNC signal ! */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   176
                    /*const*/ UNS32 obj1007 = 0x0; /* Default 0 */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   177
                    /*const*/ subindex Index1007[] =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   178
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   179
                      { RW, uint32, sizeof(UNS32), (void*)&obj1007 }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   180
                    };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   181
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   182
/* index 0x1008 :   Manufacturer device name */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   183
                    UNS8 obj1008[] = "Appli_Master_HC12"; /* Default 0 */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   184
                    subindex Index1008[] =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   185
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   186
                      { RO, uint32, sizeof(obj1008), (void*)&obj1008 }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   187
                    };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   188
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   189
/* index 0x1009 :   Manufacturer hardware version */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   190
                    UNS8 obj1009[] = __DATE__; /* Default 0 */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   191
                    subindex Index1009[] =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   192
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   193
                      { RO, uint32, sizeof(obj1009), (void*)&obj1009 }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   194
                    };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   195
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   196
/* index 0x100A :   Manufacturer software version */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   197
                    UNS8 obj100A[] = __TIME__; /* Default 0 */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   198
                    subindex Index100A[] =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   199
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   200
                      { RO, uint32, sizeof(obj100A), (void*)&obj100A}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   201
                    };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   202
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   203
/* index 0x1016 :   HeartBeat consumers 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   204
                    The nodes which can send a heartbeat */ 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   205
                    static  UNS32 obj1016[] = {// Consumer time for each node 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   206
                    0x00000000}; // Format 0x00NNTTTT (N=Node T=time in ms)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   207
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   208
                    static  UNS8 obj1016_cnt = 1; // 1 nodes could send me
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   209
                                                  // their heartbeat.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   210
                    subindex Index1016[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   211
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   212
                      { RO, uint8, sizeof(UNS8), (void*)&obj1016_cnt },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   213
                      { RW, uint32, sizeof(UNS32), (void*)&obj1016[0] }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   214
                    }; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   215
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   216
/* index 0x1017 :   Heartbeat producer                    
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   217
                    Every HBProducerTime, the node sends its heartbeat */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   218
                    static UNS16 obj1017 = 0; //HBProducerTime in ms. If 0 : not activated 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   219
                                                     // Beware, it is over written when the 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   220
                                                     // node enters in reset mode.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   221
                                                     // See initResetMode() in init.c
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   222
                    subindex Index1017[] =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   223
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   224
	              { RW, uint16, sizeof(UNS16), &obj1017 }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   225
                    };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   226
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   227
/* index 0x1018 :   Identity object */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   228
                    /** index 1018: identify object. Adjust the entries for your node/company
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   229
                    */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   230
                    /* Values can be modified */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   231
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   232
                    s_identity obj1018 =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   233
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   234
                      4,       // number of supported entries
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   235
                      0,  // Vendor-ID (given by the can-cia)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   236
                      0,  // Product Code
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   237
                      0,  // Revision number
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   238
                      0  // serial number
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   239
                    };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   240
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   241
                    subindex Index1018[] =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   242
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   243
                      { RO, uint8,  sizeof(UNS8),  (void*)&obj1018.count },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   244
                      { RO, uint32, sizeof(UNS32), (void*)&obj1018.vendor_id},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   245
                      { RO, uint32, sizeof(UNS32), (void*)&obj1018.product_code},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   246
                      { RO, uint32, sizeof(UNS32), (void*)&obj1018.revision_number},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   247
                      { RO, uint32, sizeof(UNS32), (void*)&obj1018.serial_number}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   248
                    };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   249
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   250
/* index 0x1200 :   The SDO Server parameters */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   251
                    /* BEWARE You cannot define more than one SDO server */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   252
                    /* The values should not be modified here, 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   253
                    but can be changed at runtime */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   254
                    // Beware that the default values that you could put here
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   255
                    // will be over written at the initialisation of the node. 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   256
                    // See setNodeId() in init.c
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   257
                    static s_sdo_parameter obj1200  = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   258
                      { 3,                   // Number of entries. Always 3 for the SDO	       
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   259
                        0x600 + NODE_ID,     // The cob_id transmited in CAN msg to the server     
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   260
                        0x580 + NODE_ID,     // The cob_id received in CAN msg from the server  
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   261
                        NODE_ID              // The node id of the client. Should not be modified 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   262
                      };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   263
                    static subindex Index1200[] =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   264
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   265
                      { RO, uint8,  sizeof( UNS8 ), (void*)&obj1200.count },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   266
                      { RO, uint32, sizeof( UNS32), (void*)&obj1200.cob_id_client },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   267
                      { RO, uint32, sizeof( UNS32), (void*)&obj1200.cob_id_server },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   268
                      { RW, uint8,  sizeof( UNS8),  (void*)&obj1200.node_id }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   269
                    };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   270
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   271
/* index 0x1280 :   SDO client parameter */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   272
                    static s_sdo_parameter obj1280 = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   273
                      { 3,     // Nb of entries 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   274
                        0x600, // cobid transmited to the server. The good value should be 0x600 + server nodeId
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   275
                        0x580, // cobid received from the server. The good value should be 0x580 + server nodeId
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   276
                        0x0    // server NodeId
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   277
                      };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   278
                    static subindex Index1280[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   279
                      { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   280
                        { RO, uint8, sizeof( UNS8  ), (void*)&obj1280.count },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   281
                        { RW, uint8, sizeof( UNS32 ), (void*)&obj1280.cob_id_client },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   282
                        { RW, uint8, sizeof( UNS32 ), (void*)&obj1280.cob_id_server },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   283
                        { RW, uint8, sizeof( UNS8  ), (void*)&obj1280.node_id }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   284
                      }; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   285
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   286
/* index 0x1281 :   SDO client parameter */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   287
                    static s_sdo_parameter obj1281 = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   288
                      { 3,     // Nb of entries 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   289
                        0x600, // cobid transmited to the server. The good value should be 0x600 + server nodeId
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   290
                        0x580, // cobid received from the server. The good value should be 0x580 + server nodeId
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   291
                        0x0    // server NodeId
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   292
                      };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   293
                    static subindex Index1281[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   294
                      { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   295
                        { RO, uint8, sizeof( UNS8  ), (void*)&obj1281.count },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   296
                        { RW, uint8, sizeof( UNS32 ), (void*)&obj1281.cob_id_client },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   297
                        { RW, uint8, sizeof( UNS32 ), (void*)&obj1281.cob_id_server },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   298
                        { RW, uint8, sizeof( UNS8  ), (void*)&obj1281.node_id }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   299
                      }; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   300
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   301
/* index 0x1400 :   PDO receive communication parameter */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   302
                    static s_pdo_communication_parameter obj1400 = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   303
                      { 2, // Largest subindex supported 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   304
                        0x0, // Default COBID (overwritten at init for index 0x1400 to 0x1403)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   305
                        253 // Transmission type. See objdictdef.h 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   306
                      };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   307
                    static subindex Index1400[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   308
                      { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   309
                        { RO, uint8, sizeof( UNS8  ), (void*)&obj1400.count },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   310
                        { RW, uint8, sizeof( UNS32 ), (void*)&obj1400.cob_id },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   311
                        { RW, uint8, sizeof( UNS8  ), (void*)&obj1400.type },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   312
                      }; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   313
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   314
/* index 0x1401 :   PDO receive communication parameter */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   315
                    static s_pdo_communication_parameter obj1401 = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   316
                      { 2, // Largest subindex supported 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   317
                        0x0, // Default COBID (overwritten at init for index 0x1400 to 0x1403)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   318
                        253 // Transmission type. See objdictdef.h 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   319
                      };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   320
                    static subindex Index1401[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   321
                      { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   322
                        { RO, uint8, sizeof( UNS8  ), (void*)&obj1401.count },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   323
                        { RW, uint8, sizeof( UNS32 ), (void*)&obj1401.cob_id },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   324
                        { RW, uint8, sizeof( UNS8  ), (void*)&obj1401.type },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   325
                      }; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   326
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   327
/* index 0x1402 :   PDO receive communication parameter */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   328
                    static s_pdo_communication_parameter obj1402 = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   329
                      { 2, // Largest subindex supported 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   330
                        0x0, // Default COBID (overwritten at init for index 0x1400 to 0x1403)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   331
                        253 // Transmission type. See objdictdef.h 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   332
                      };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   333
                    static subindex Index1402[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   334
                      { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   335
                        { RO, uint8, sizeof( UNS8  ), (void*)&obj1402.count },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   336
                        { RW, uint8, sizeof( UNS32 ), (void*)&obj1402.cob_id },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   337
                        { RW, uint8, sizeof( UNS8  ), (void*)&obj1402.type },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   338
                      }; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   339
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   340
/* index 0x1600 :   PDO receive mapping parameter of PDO communication index 0x1400 */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   341
                    static UNS8 obj1600_cnt = 0; // Number of mapped variables
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   342
                    static UNS32 obj1600_mappedVar[] = { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   343
                        // Example to map a variable of 16 bits defined at index 0x6035, subindex 0x12 :
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   344
                        // PDO_MAP(6035,12,16)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   345
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   346
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   347
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   348
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   349
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   350
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   351
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   352
                        PDO_MAP(0000, 00, 00)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   353
                      };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   354
                    subindex Index1600[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   355
                      { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   356
                        { RW, uint8, sizeof( UNS8  ), (void*)&obj1600_cnt },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   357
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1600_mappedVar[0]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   358
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1600_mappedVar[1]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   359
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1600_mappedVar[2]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   360
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1600_mappedVar[3]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   361
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1600_mappedVar[4]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   362
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1600_mappedVar[5]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   363
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1600_mappedVar[6]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   364
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1600_mappedVar[7]}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   365
                      }; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   366
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   367
/* index 0x1601 :   PDO receive mapping parameter of PDO communication index 0x1401 */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   368
                    static UNS8 obj1601_cnt = 0; // Number of mapped variables
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   369
                    static UNS32 obj1601_mappedVar[] = { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   370
                        // Example to map a variable of 16 bits defined at index 0x6035, subindex 0x12 :
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   371
                        // PDO_MAP(6035,12,16)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   372
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   373
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   374
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   375
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   376
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   377
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   378
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   379
                        PDO_MAP(0000, 00, 00)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   380
                      };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   381
                    subindex Index1601[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   382
                      { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   383
                        { RW, uint8, sizeof( UNS8  ), (void*)&obj1601_cnt },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   384
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1601_mappedVar[0]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   385
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1601_mappedVar[1]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   386
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1601_mappedVar[2]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   387
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1601_mappedVar[3]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   388
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1601_mappedVar[4]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   389
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1601_mappedVar[5]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   390
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1601_mappedVar[6]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   391
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1601_mappedVar[7]}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   392
                      }; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   393
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   394
/* index 0x1602 :   PDO receive mapping parameter of PDO communication index 0x1402 */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   395
                    static UNS8 obj1602_cnt = 0; // Number of mapped variables
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   396
                    static UNS32 obj1602_mappedVar[] = { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   397
                        // Example to map a variable of 16 bits defined at index 0x6035, subindex 0x12 :
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   398
                        // PDO_MAP(6035,12,16)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   399
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   400
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   401
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   402
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   403
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   404
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   405
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   406
                        PDO_MAP(0000, 00, 00)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   407
                      };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   408
                    subindex Index1602[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   409
                      { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   410
                        { RW, uint8, sizeof( UNS8  ), (void*)&obj1602_cnt },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   411
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1602_mappedVar[0]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   412
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1602_mappedVar[1]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   413
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1602_mappedVar[2]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   414
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1602_mappedVar[3]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   415
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1602_mappedVar[4]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   416
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1602_mappedVar[5]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   417
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1602_mappedVar[6]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   418
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1602_mappedVar[7]}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   419
                      }; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   420
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   421
/* index 0x1800 :   PDO transmit communication parameter */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   422
                    static s_pdo_communication_parameter obj1800 = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   423
                      { 2, // Largest subindex supported 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   424
                        0x0, // Default COBID (overwritten at init for index 0x1400 to 0x1403)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   425
                        253 // Transmission type. See objdictdef.h 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   426
                      };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   427
                    static subindex Index1800[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   428
                      { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   429
                        { RO, uint8, sizeof( UNS8  ), (void*)&obj1800.count },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   430
                        { RW, uint8, sizeof( UNS32 ), (void*)&obj1800.cob_id },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   431
                        { RW, uint8, sizeof( UNS8  ), (void*)&obj1800.type },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   432
                      }; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   433
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   434
/* index 0x1801 :   PDO transmit communication parameter */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   435
                    static s_pdo_communication_parameter obj1801 = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   436
                      { 2, // Largest subindex supported 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   437
                        0x0, // Default COBID (overwritten at init for index 0x1400 to 0x1403)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   438
                        253 // Transmission type. See objdictdef.h 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   439
                      };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   440
                    static subindex Index1801[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   441
                      { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   442
                        { RO, uint8, sizeof( UNS8  ), (void*)&obj1801.count },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   443
                        { RW, uint8, sizeof( UNS32 ), (void*)&obj1801.cob_id },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   444
                        { RW, uint8, sizeof( UNS8  ), (void*)&obj1801.type },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   445
                      }; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   446
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   447
/* index 0x1802 :   PDO transmit communication parameter */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   448
                    static s_pdo_communication_parameter obj1802 = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   449
                      { 2, // Largest subindex supported 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   450
                        0x0, // Default COBID (overwritten at init for index 0x1400 to 0x1403)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   451
                        253 // Transmission type. See objdictdef.h 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   452
                      };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   453
                    static subindex Index1802[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   454
                      { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   455
                        { RO, uint8, sizeof( UNS8  ), (void*)&obj1802.count },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   456
                        { RW, uint8, sizeof( UNS32 ), (void*)&obj1802.cob_id },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   457
                        { RW, uint8, sizeof( UNS8  ), (void*)&obj1802.type },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   458
                      }; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   459
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   460
/* index 0x1A00 :   PDO transmit mapping parameter of PDO communication index 0x1800 */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   461
                    static UNS8 obj1A00_cnt = 0; // Number of mapped variables
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   462
                    static UNS32 obj1A00_mappedVar[] = { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   463
                        // Example to map a variable of 16 bits defined at index 0x6035, subindex 0x12 :
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   464
                        // PDO_MAP(6035,12,16)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   465
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   466
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   467
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   468
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   469
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   470
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   471
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   472
                        PDO_MAP(0000, 00, 00)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   473
                      };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   474
                    subindex Index1A00[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   475
                      { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   476
                        { RW, uint8, sizeof( UNS8  ), (void*)&obj1A00_cnt },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   477
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A00_mappedVar[0]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   478
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A00_mappedVar[1]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   479
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A00_mappedVar[2]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   480
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A00_mappedVar[3]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   481
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A00_mappedVar[4]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   482
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A00_mappedVar[5]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   483
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A00_mappedVar[6]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   484
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A00_mappedVar[7]}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   485
                      }; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   486
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   487
/* index 0x1A01 :   PDO transmit mapping parameter of PDO communication index 0x1801 */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   488
                    static UNS8 obj1A01_cnt = 0; // Number of mapped variables
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   489
                    static UNS32 obj1A01_mappedVar[] = { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   490
                        // Example to map a variable of 16 bits defined at index 0x6035, subindex 0x12 :
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   491
                        // PDO_MAP(6035,12,16)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   492
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   493
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   494
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   495
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   496
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   497
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   498
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   499
                        PDO_MAP(0000, 00, 00)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   500
                      };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   501
                    subindex Index1A01[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   502
                      { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   503
                        { RW, uint8, sizeof( UNS8  ), (void*)&obj1A01_cnt },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   504
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A01_mappedVar[0]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   505
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A01_mappedVar[1]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   506
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A01_mappedVar[2]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   507
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A01_mappedVar[3]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   508
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A01_mappedVar[4]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   509
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A01_mappedVar[5]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   510
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A01_mappedVar[6]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   511
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A01_mappedVar[7]}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   512
                      }; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   513
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   514
/* index 0x1A02 :   PDO transmit mapping parameter of PDO communication index 0x1802 */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   515
                    static UNS8 obj1A02_cnt = 0; // Number of mapped variables
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   516
                    static UNS32 obj1A02_mappedVar[] = { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   517
                        // Example to map a variable of 16 bits defined at index 0x6035, subindex 0x12 :
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   518
                        // PDO_MAP(6035,12,16)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   519
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   520
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   521
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   522
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   523
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   524
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   525
                        PDO_MAP(0000, 00, 00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   526
                        PDO_MAP(0000, 00, 00)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   527
                      };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   528
                    subindex Index1A02[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   529
                      { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   530
                        { RW, uint8, sizeof( UNS8  ), (void*)&obj1A02_cnt },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   531
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A02_mappedVar[0]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   532
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A02_mappedVar[1]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   533
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A02_mappedVar[2]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   534
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A02_mappedVar[3]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   535
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A02_mappedVar[4]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   536
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A02_mappedVar[5]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   537
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A02_mappedVar[6]},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   538
                        { RW, uint32, sizeof( UNS32 ), (void*)&obj1A02_mappedVar[7]}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   539
                      }; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   540
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   541
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   542
/* index 0x6000 :   Mapped variable */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   543
                    subindex Index6000[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   544
                     {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   545
                       { RW, uint32, sizeof (UNS32), (void*)&canopenErrNB_node5 }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   546
                     };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   547
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   548
/* index 0x6001 :   Mapped variable */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   549
                    subindex Index6001[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   550
                     {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   551
                       { RW, uint32, sizeof (UNS32), (void*)&canopenErrVAL_node5 }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   552
                     };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   553
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   554
/* index 0x6002 :   Mapped variable */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   555
                    static UNS8 highestSubIndex_6002 = 4; // number of subindex - 1
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   556
                    subindex Index6002[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   557
                     {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   558
                       { RO, uint8, sizeof (UNS8), (void*)&highestSubIndex_6002 },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   559
                       { RW, uint8, sizeof (UNS8), (void*)&second },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   560
                       { RW, uint8, sizeof (UNS8), (void*)&minutes },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   561
                       { RW, uint8, sizeof (UNS8), (void*)&hour },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   562
                       { RW, uint8, sizeof (UNS8), (void*)&day }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   563
                     };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   564
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   565
/* index 0x6003 :   Mapped variable */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   566
                    static UNS8 highestSubIndex_6003 = 2; // number of subindex - 1
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   567
                    subindex Index6003[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   568
                     {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   569
                       { RO, uint8, sizeof (UNS8), (void*)&highestSubIndex_6003 },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   570
                       { RW, uint32, sizeof (UNS32), (void*)&canopenErrNB },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   571
                       { RW, uint32, sizeof (UNS32), (void*)&canopenErrVAL }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   572
                     };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   573
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   574
const indextable objdict[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   575
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   576
  DeclareIndexTableEntry(Index1000, 0x1000),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   577
  DeclareIndexTableEntry(Index1001, 0x1001),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   578
  DeclareIndexTableEntry(Index1005, 0x1005),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   579
  DeclareIndexTableEntry(Index1006, 0x1006),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   580
  DeclareIndexTableEntry(Index1007, 0x1007),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   581
  DeclareIndexTableEntry(Index1008, 0x1008),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   582
  DeclareIndexTableEntry(Index1009, 0x1009),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   583
  DeclareIndexTableEntry(Index100A, 0x100A),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   584
  DeclareIndexTableEntry(Index1016, 0x1016),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   585
  DeclareIndexTableEntry(Index1017, 0x1017),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   586
  DeclareIndexTableEntry(Index1018, 0x1018),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   587
  DeclareIndexTableEntry(Index1200, 0x1200),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   588
  DeclareIndexTableEntry(Index1280, 0x1280),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   589
  DeclareIndexTableEntry(Index1281, 0x1281),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   590
  DeclareIndexTableEntry(Index1400, 0x1400),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   591
  DeclareIndexTableEntry(Index1401, 0x1401),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   592
  DeclareIndexTableEntry(Index1402, 0x1402),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   593
  DeclareIndexTableEntry(Index1600, 0x1600),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   594
  DeclareIndexTableEntry(Index1601, 0x1601),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   595
  DeclareIndexTableEntry(Index1602, 0x1602),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   596
  DeclareIndexTableEntry(Index1800, 0x1800),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   597
  DeclareIndexTableEntry(Index1801, 0x1801),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   598
  DeclareIndexTableEntry(Index1802, 0x1802),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   599
  DeclareIndexTableEntry(Index1A00, 0x1A00),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   600
  DeclareIndexTableEntry(Index1A01, 0x1A01),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   601
  DeclareIndexTableEntry(Index1A02, 0x1A02),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   602
  DeclareIndexTableEntry(Index6000, 0x6000),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   603
  DeclareIndexTableEntry(Index6001, 0x6001),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   604
  DeclareIndexTableEntry(Index6002, 0x6002),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   605
  DeclareIndexTableEntry(Index6003, 0x6003),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   606
};
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   607
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   608
// To count at which received SYNC a PDO must be sent.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   609
// Even if no pdoTransmit are defined, at least one entry is computed
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   610
// for compilations issues.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   611
UNS8 count_sync[1] = {0, };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   612
  
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   613
UNS16 firstIndex (enum e_first_object object, UNS16 *lastIndex)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   614
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   615
  switch (object) {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   616
    case FIRST_SDO_SERVER :
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   617
      *lastIndex = 11;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   618
      return 11;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   619
    case FIRST_SDO_CLIENT :
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   620
      *lastIndex = 13;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   621
      return 12;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   622
    case FIRST_PDO_RCV :
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   623
      *lastIndex = 16;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   624
      return 14;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   625
    case FIRST_PDO_RCV_MAP :
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   626
      *lastIndex = 19;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   627
      return 17;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   628
    case FIRST_PDO_TRS :
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   629
      *lastIndex = 22;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   630
      return 20;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   631
    case FIRST_PDO_TRS_MAP :
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   632
      *lastIndex = 25;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   633
      return 23;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   634
  }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   635
  *lastIndex = 0;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   636
  return 0;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   637
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   638
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   639
UNS16 getObjdictSize (void) 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   640
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   641
  return sizeof(objdict)/sizeof(objdict[0]);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   642
}