examples/gene_SYNC_HCS12/objdict.c
author etisserant
Fri, 23 Jun 2006 16:32:42 +0200
changeset 40 ddeeb217ed71
parent 0 4472ee7c6c3e
child 54 a2ca09ac1523
permissions -rwxr-xr-x
Updated configure and fixes in Makefiles.in for cygwin compiling.
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 "objdict.h"
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    24
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    25
/**************************************************************************/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    26
/* Declaration of the mapped variables                                    */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    27
/**************************************************************************/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    28
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    29
/**************************************************************************/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    30
/* Declaration of the value range types                                   */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    31
/**************************************************************************/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    32
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    33
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    34
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    35
UNS32 gene_SYNC_valueRangeTest (UNS8 typeValue, UNS32 unsValue, REAL32 realValue)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    36
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    37
  switch (typeValue) {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    38
  }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    39
  return 0;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    40
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    41
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    42
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    43
/**************************************************************************/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    44
/* The node id                                                            */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    45
/**************************************************************************/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    46
/* node_id default value. 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    47
   This default value is deprecated.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    48
   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
    49
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    50
#define NODE_ID 0x03
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    51
UNS8 gene_SYNC_bDeviceNodeId = NODE_ID;
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
//*****************************************************************************/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    55
/* Array of message processing information */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    56
/* Should not be modified */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    57
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    58
const UNS8 gene_SYNC_iam_a_slave = 1;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    59
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    60
  // Macros definition
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    61
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    62
/* Beware : 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    63
index                 *must* be writen 4 numbers in hexa
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    64
sub_index             *must* be writen 2 numbers in hexa
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    65
size_variable_in_UNS8 *must* be writen 2 numbers in hexa
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    66
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    67
#define PDO_MAP(index, sub_index, size_variable_in_bits)\
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    68
0x ## index ## sub_index ## size_variable_in_bits
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    69
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    70
/** This macro helps creating the object dictionary entries.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    71
 *  by calling this macro
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    72
 *  it creates an entry in form of: 7 of entries, pointer to the entry. 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    73
 */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    74
#define DeclareIndexTableEntry(entryname, index)    { (subindex*)entryname,sizeof(entryname)/sizeof(entryname[0]), index}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    75
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    76
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    77
//
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    78
//                       OBJECT DICTIONARY
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    79
//                   
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    80
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    81
// Make your change, depending of your application
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    82
 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    83
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    84
/* index 0x1000 :   Device type. 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    85
                    You have to change the value below, so
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    86
                    it fits your canopen-slave-module */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    87
 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    88
                    /* Not used, so, should not be modified */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    89
                    
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    90
                    UNS32 gene_SYNC_obj1000 = 0;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    91
                    subindex gene_SYNC_Index1000[] =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    92
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    93
                      { RO, uint32, sizeof(UNS32), (void*)&gene_SYNC_obj1000 }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    94
                    };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    95
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    96
/* index 0x1001 :   Error register. 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    97
                    Change the entries to fit your application 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    98
                    Not used, so, should not be modified */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    99
                    UNS8 gene_SYNC_obj1001 = 0x00000000;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   100
                    subindex gene_SYNC_Index1001[] =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   101
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   102
                      { RO, uint8, sizeof(UNS8), (void*)&gene_SYNC_obj1001 }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   103
                    };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   104
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   105
/* index 0x1005 :   COB_ID SYNC */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   106
                    /* Should not be modified */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   107
                    UNS32 gene_SYNC_obj1005 = 0x40000080; // bit 30 = 1 : device can generate a SYNC message
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   108
                                                // Beware, it is over written when the node 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   109
                                                // enters in reset mode
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   110
                                                // See initResetMode() in init.c
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   111
                    subindex gene_SYNC_Index1005[] =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   112
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   113
                      { RW, uint32, sizeof(UNS32), (void*)&gene_SYNC_obj1005 }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   114
                    };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   115
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   116
/* index 0x1006 :   SYNC period */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   117
                    // For producing the SYNC signal every n micro-seconds.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   118
                    // Put 0 to not producing SYNC
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   119
                    UNS32 gene_SYNC_obj1006 = 0x000186A0; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   120
                                         // Default 0 to not produce SYNC //
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   121
                                         // Beware, it is over written when the 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   122
                                         // node enters in reset mode.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   123
                                         // See initResetMode() in init.c
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   124
                    subindex gene_SYNC_Index1006[] =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   125
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   126
                      { RW, uint32, sizeof(UNS32), (void*)&gene_SYNC_obj1006 }
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
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   130
                    TIMER_HANDLE gene_SYNC_heartBeatTimers[0];
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   131
                    UNS32 gene_SYNC_obj1016[0]; 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   132
                    UNS8 gene_SYNC_obj1016_cnt = 0;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   133
                    subindex gene_SYNC_Index1016[0];
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   134
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   135
                    UNS16 gene_SYNC_obj1017 = 0x0000;
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   136
/* index 0x1018 :   Identity object */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   137
                    /** index 1018: identify object. Adjust the entries for your node/company
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   138
                    */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   139
                    /* Values can be modified */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   140
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   141
                    s_identity gene_SYNC_obj1018 =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   142
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   143
                      4,       // number of supported entries
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   144
                      0,  // Vendor-ID (given by the can-cia)
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   145
                      0,  // Product Code
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   146
                      0,  // Revision number
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   147
                      0  // serial number
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
                    subindex gene_SYNC_Index1018[] =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   151
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   152
                      { RO, uint8,  sizeof(UNS8),  (void*)&gene_SYNC_obj1018.count },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   153
                      { RO, uint32, sizeof(UNS32), (void*)&gene_SYNC_obj1018.vendor_id},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   154
                      { RO, uint32, sizeof(UNS32), (void*)&gene_SYNC_obj1018.product_code},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   155
                      { RO, uint32, sizeof(UNS32), (void*)&gene_SYNC_obj1018.revision_number},
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   156
                      { RO, uint32, sizeof(UNS32), (void*)&gene_SYNC_obj1018.serial_number}
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 0x1200 :   The SDO Server parameters */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   160
                    /* BEWARE You cannot define more than one SDO server */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   161
                    /* The values should not be modified here, 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   162
                    but can be changed at runtime */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   163
                    // Beware that the default values that you could put here
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   164
                    // will be over written at the initialisation of the node. 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   165
                    // See setNodeId() in init.c
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   166
                    s_sdo_parameter gene_SYNC_obj1200  = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   167
                      { 3,                   // Number of entries. Always 3 for the SDO           
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   168
                        0x000,     // The cob_id transmited in CAN msg to the server     
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   169
                        0x000,     // The cob_id received in CAN msg from the server  
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   170
                        0x03      // The node id of the client. Should not be modified
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   171
                      };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   172
                    subindex gene_SYNC_Index1200[] =
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   173
                    {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   174
                      { RO, uint8,  sizeof( UNS8 ), (void*)&gene_SYNC_obj1200.count },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   175
                      { RO, uint32, sizeof( UNS32), (void*)&gene_SYNC_obj1200.cob_id_client },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   176
                      { RO, uint32, sizeof( UNS32), (void*)&gene_SYNC_obj1200.cob_id_server },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   177
                      { RW, uint8,  sizeof( UNS8),  (void*)&gene_SYNC_obj1200.node_id }
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 0x1280 :   SDO client parameter */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   181
                    s_sdo_parameter gene_SYNC_obj1280 = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   182
                      { 3,     // Nb of entries 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   183
                        0x000, // cobid transmited to the server. The good value should be 0x600 + server nodeId
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   184
                        0x000, // cobid received from the server. The good value should be 0x580 + server nodeId
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   185
                        0x00  // server NodeId
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   186
                      };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   187
                    subindex gene_SYNC_Index1280[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   188
                      { 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   189
                        { RO, uint8, sizeof( UNS8  ), (void*)&gene_SYNC_obj1280.count },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   190
                        { RW, uint8, sizeof( UNS32 ), (void*)&gene_SYNC_obj1280.cob_id_client },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   191
                        { RW, uint8, sizeof( UNS32 ), (void*)&gene_SYNC_obj1280.cob_id_server },
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   192
                        { RW, uint8, sizeof( UNS8  ), (void*)&gene_SYNC_obj1280.node_id }
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   193
                      }; 
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
const indextable gene_SYNC_objdict[] = 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   197
{
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   198
  DeclareIndexTableEntry(gene_SYNC_Index1000, 0x1000),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   199
  DeclareIndexTableEntry(gene_SYNC_Index1001, 0x1001),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   200
  DeclareIndexTableEntry(gene_SYNC_Index1005, 0x1005),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   201
  DeclareIndexTableEntry(gene_SYNC_Index1006, 0x1006),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   202
  DeclareIndexTableEntry(gene_SYNC_Index1018, 0x1018),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   203
  DeclareIndexTableEntry(gene_SYNC_Index1200, 0x1200),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   204
  DeclareIndexTableEntry(gene_SYNC_Index1280, 0x1280),
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   205
};
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   206
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   207
// To count at which received SYNC a PDO must be sent.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   208
// Even if no pdoTransmit are defined, at least one entry is computed
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   209
// for compilations issues.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   210
UNS8 gene_SYNC_count_sync[1] = {0, };
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   211
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   212
quick_index gene_SYNC_firstIndex = {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   213
    SDO_SVR : 5,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   214
    SDO_CLT : 6,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   215
    PDO_RCV : 0,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   216
    PDO_RCV_MAP : 0,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   217
    PDO_TRS : 0,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   218
    PDO_TRS_MAP : 0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   219
};
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   220
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   221
quick_index gene_SYNC_lastIndex = {
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   222
    SDO_SVR : 5,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   223
    SDO_CLT : 6,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   224
    PDO_RCV : 0,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   225
    PDO_RCV_MAP : 0,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   226
    PDO_TRS : 0,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   227
    PDO_TRS_MAP : 0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   228
};
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   229
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   230
UNS16 gene_SYNC_ObjdictSize = sizeof(gene_SYNC_objdict)/sizeof(gene_SYNC_objdict[0]); 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   231
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   232
CO_Data gene_SYNC_Data = CANOPEN_NODE_DATA_INITIALIZER(gene_SYNC);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   233