rllib  1
rlcannode.h
Go to the documentation of this file.
1 /***************************************************************************
2  cannode.h - description
3  -------------------
4  begin : Tue March 03 2004
5  copyright : (C) 2004 by R. Lehrig
6  email : lehrig@t-online.de
7  authors : Marc Br�tigam, Christian Wilmes
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This library is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as *
14  * published by the Free Software Foundation *
15  * *
16  ***************************************************************************/
17 
18 #ifndef NODE
19 #define NODE
20 
21 #include "rldefine.h"
22 #include <iostream>
23  using std::cin;
24  using std::cout;
25 #include <qptrvector.h>
26 #include <qdir.h>
27 #include <qstring.h>
28 #include <qstringlist.h>
29 
30 #include "rlcanopenstructs.h"
31 #include "rlcanopentypes.h"
32 #include "rlinifile.h"
33 
34 #ifndef TOOL
35 #define TOOL
36 //#include "ToolBox.cpp"
37 #endif
38 
39 #include "objdir.h" /* Include file for EDS file manager */
40 
41 #include "cif_user.h" /* Include file for device driver API */
42 #include "rcs_user.h" /* Include file for RCS definition */
43 #include "asc_user.h" /* Include file for ASCII protocols */
44 #include "nvr_user.h" /* Include file for 3964R protocol */
45 #include "COM_USER.H"
46 
48 class rlCanNode
49 {
50  public:
51  rlCanNode ();
52 
56  rlCanNode (int boardnr, int nodeid, RCS_MESSAGETELEGRAM_10& _telegramm);
57 
59  ~rlCanNode();
60 
62  int objecttype(int objindex, int subindex);
63 
65  void showConfiguration();
66 
68  int getNodeID();
69 
71  int getBoardID();
72 
74  int getPdoCount();
75 
77  int getReceivePdoCount();
78 
80  int getTransmitPdoCount();
81 
84  bool hasMapping();
85 
87  //QPtrVector<rlCanPDO> transmit_pdoList;
88 
90  //QPtrVector<rlCanPDO> receive_pdoList;
91 
92  // RECEIVE_LIST = 0
93  // TRANSMIT_LIST = 1
94  QPtrVector<rlCanPDO> pdoList[2];
95 
96  private:
98  int nodeID;
99 
101  int boardID;
102 
106  rlIniFile* getEDS(const char* _productstr);
107 
111 
114  ObjDir* objdir;
115 
118  void readConfigurationMessage(RCS_MESSAGETELEGRAM_10& _message);
119 
121  unsigned short usIdentNumber;
122 
124  unsigned char usVendorIdent;
125 
127  QString abVendorName;
128  QString abDeviceName;
129  QString abDescription;
130  QString edslocation;
131  unsigned char pdocount;
132  unsigned char bMasterAddress;
133  unsigned char bSettings;
134 };
135 
136 #endif
137 
QString abDeviceName
Definition: rlcannode.h:128
int nodeID
current node ID (1-127)
Definition: rlcannode.h:98
int getBoardID()
returns the board ID the node is connected to.
Definition: rlcannode.cpp:245
unsigned char pdocount
Definition: rlcannode.h:131
unsigned char bSettings
Definition: rlcannode.h:133
int objecttype(int objindex, int subindex)
returns the type of a specific entry in the object directory
Definition: rlcannode.cpp:250
unsigned char usVendorIdent
Unique vendor number if available.
Definition: rlcannode.h:124
QPtrVector< rlCanPDO > pdoList[2]
contains transmit PDOs
Definition: rlcannode.h:94
ObjDir * objdir
Definition: rlcannode.h:114
int boardID
curent board ID (0-3)
Definition: rlcannode.h:101
rlIniFile * ini
Definition: rlcannode.h:110
QString abVendorName
specific node informations. extracted from message telegramm
Definition: rlcannode.h:127
int getNodeID()
returns the current node ID of the node
Definition: rlcannode.cpp:239
rlIniFile * getEDS(const char *_productstr)
finds the eds file matching the product string in [DeviceInfo] ProductName
Definition: rlcannode.cpp:109
unsigned char bMasterAddress
Definition: rlcannode.h:132
int getPdoCount()
returns the current number of all installed PDOs (Process Data Objects)
Definition: rlcannode.cpp:280
void readConfigurationMessage(RCS_MESSAGETELEGRAM_10 &_message)
reads out the configuration of a node from the CanOpenMaster board
Definition: rlcannode.cpp:142
QString edslocation
Definition: rlcannode.h:130
void showConfiguration()
prints out the configuration of the node
Definition: rlcannode.cpp:200
int getTransmitPdoCount()
returns the current number of all installed transmit PDOs
Definition: rlcannode.cpp:290
int getReceivePdoCount()
returns the current number of all installed reiceive PDOs
Definition: rlcannode.cpp:285
unsigned short usIdentNumber
Unique device number if available.
Definition: rlcannode.h:121
class to manage one node of a CanOpenMaster board in a CanOpen network
Definition: rlcannode.h:48
bool hasMapping()
indicates if a node available mapping
Definition: rlcannode.cpp:295
~rlCanNode()
calls destructors of rlinifile obj and objdir
Definition: rlcannode.cpp:97
QString abDescription
Definition: rlcannode.h:129