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