rllib  1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
rlcanopenstructs.h
Go to the documentation of this file.
1 /***************************************************************************
2  rlcanopen.cpp - description
3  -------------------
4  begin : Tue March 03 2004
5  copyright : (C) 2004 by Marc Br�tigam, Christian Wilmes, R. Lehrig
6  email : lehrig@t-online.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as *
13  * published by the Free Software Foundation *
14  * *
15  ***************************************************************************/
16 
18 
19 #ifndef CanOpenStructsH
20 #define CanOpenStructsH
21 
22 
23 #define DIRECTION_RECEIVE 0
24 #define DIRECTION_TRANSMIT 1
25 
26 
27 
28 #define RECEIVE_PDO_MAPPING_STARTADRESS 0x1600
29 #define RECEIVE_PDO_MAPPING_MAXADRESS 0x17FF
30 #define TRANSMIT_PDO_MAPPING_STARTADRESS 0x1A00
31 #define TRANSMIT_PDO_MAPPING_MAXADRESS 0x1BFF
32 #define MAX_NODES 127
33 #define MAX_SDO_BUFFERSIZE 246
34 
35 
36 
38 #define CAN_TASK 3
39 #define USER_AT_HOST 16
40 #define CMDCODE_GET_CONFIGURATION 15
41 #define CMDCODE_SDO_UPDOWNLOAD 74
42 #define CMDCODE_Node_Diag 66
43 #define CMD_NMT_Module_Protocol 96
44 
46 #define CMD_NMT_START_REMOTE_NODE 1
47 #define CMD_NMT_STOP_REMOTE_NODE 2
48 #define CMD_NMT_ENTER_PREOPERATIONAL 128
49 #define CMD_NMT_RESET_NODE 129
50 #define CMD_NMT_RESET_COMMUNICATION 130
51 
52 #define TASK_TFC_READ 1
53 #define TASK_TFC_WRITE 2
54 #define RESPONSE_CODE_GET_CONFIGURATION 15
55 
56 #define DATA_DIRECTION_MASK 0x30
57 #define DIRECTION_INPUT 0x10
58 #define DIRECTION_OUTPUT 0x20
59 
61 #define ERRCODE_NOERROR 0
62 #define ERRCODE_INVALID_NODEID -2
63 #define ERRCODE_INVALID_PDOID -3
64 #define ERRCODE_PDOSND_FAIL -4
65 #define ERRCODE_INVALID_MAPID -5
66 #define ERRCODE_INVALID_RLTYPE -6
67 #define ERRCODE_PDORCV_FAIL -7
68 
70 #define COLDSTART 2
71 #define WARMSTART 3
72 #define BOOTSTART 4
73 
76 {
78  unsigned short mappingId;
79 
81  int etype;
82 
85 
87  unsigned short position;
88 
90  unsigned short length;
91 } ;
92 
93 
94 
96 struct rlCanPDO
97 {
99  short bPDODirection;
100 
102  unsigned char bPDOSize;
103 
105  unsigned char bDataPosition;
106 
108  unsigned short usPDOAddress;
109 
111  QPtrVector<rlCanMapping> mappingList;
112 
115 };
116 
117 
118 
119 #endif
120