rllib  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
rlCanOpen Class Reference

main class which provides canopen API functions and manages all nodes. More...

#include <rlcanopen.h>

Public Member Functions

 rlCanOpen ()
 
 rlCanOpen (char *_inifilename)
 
 ~rlCanOpen ()
 
int getBoardCount ()
 returns the number of available boards More...
 
int getActiveBoard ()
 returns the number of currently active board More...
 
bool showNodeConfiguration (int _boardnr, int _nodeid)
 prints out the configuration of a specific node More...
 
bool showNodeConfiguration ()
 prints out the configuration off all available nodes from all boards More...
 
int sdo_read (int _boardnr, int _nodeid, int _objectindex, int _subindex, rlCanOpenTypes &_sdo_data)
 read a certain object from the object dictionary of a node More...
 
int sdo_write (int _boardnr, int _nodeid, int _objectindex, int _subindex, rlCanOpenTypes &_sdo_data)
 write data into a certain object from the object dictionary of a node More...
 
int pdo_receive (int _boardnr, int _nodeid, int _pdonr, int _mappingnr, rlCanOpenTypes &_pdo_data)
 using the pdo_receive function you can receive a mapped object within PDO More...
 
int pdo_receive (int _boardnr, int _nodeid, int _pdonr, rlCanOpenTypes &_pdo_data)
 using the pdo_receive function you can receive a PDO (Process Data Object) More...
 
int pdo_transmit (int _boardnr, int _nodeid, int _pdonr, int _mappingnr, rlCanOpenTypes &_pdo_data)
 transmit a mapped object within a PDO to a specific node More...
 
int pdo_transmit (int _boardnr, int _nodeid, int _pdonr, rlCanOpenTypes &_pdo_data)
 transmit a 8 Byte PDO to a specific node More...
 
int getNodeIndex (int _boardnr, int _nodeid, int &_index)
 this function returns the listindex of a desired node More...
 
int getObjectType (int _boardnr, int _nodeid, int _objectindex, int _subindex)
 returns daemontype number of a specific object More...
 
int getNodeState (int _boardnr, int _nodeid, rlCanOpenTypes &_data)
 use this function to get information about a specific node More...
 
int restartBoard (int _boardnr, int _restarttype)
 using this function you are able to restart a CanOpenMaster board More...
 
int sendNMTCommand (int _boardnr, int _nodeid, unsigned char _cmd)
 send a NMT Command to one or all nodes (of one board) More...
 
bool is_twisted_type (int _canopentype)
 

Private Member Functions

bool getNodeConfiguration (int _nodeID)
 
int getPdoID (int _boardnr, int _nodeid, int _objektindex, int _direction)
 return PdoId of mapped object. More...
 
void read_inifile (const char *_filename)
 read properties of inifile More...
 
bool ini ()
 initialize nodes and create nodelist More...
 
void delmsg ()
 clear message struct by setting all elements to zero More...
 
bool iniboards ()
 Read informations about installed devices. More...
 
short setBoardActive (int _boardnr)
 sets a desired CanOpenMaster active, so that it can be used More...
 
int refreshMappingList (int _boardnr, int _nodeid, int _pdoID, int _pdoDirection)
 
int createNodes ()
 Search for nodes in all boards and append it into the nodelist. More...
 
int createMappingObjects (int _boardid, int _nodeid, int _pdoDirection)
 this function writes the mapping objects for each pdo of a node More...
 

Private Attributes

int activeboard
 the currently active board More...
 
char err_out_buf [255]
 this string buffer is usually written with sprintf before sent to stdout More...
 
short sRet
 return value for hilscher specific message functions More...
 
FILE * err_fp
 Pointer to error logfile. More...
 
QString logFileName
 name of logfile stdout is redirected to More...
 
RCS_MESSAGETELEGRAM_10 message
 hilscher specific message structur which will be sent to the master card More...
 
QPtrVector< rlCanNodenodelist
 this list contains all nodes from all boards More...
 
int boardcount
 the current count of CanOpenMaster cards More...
 
unsigned char messagenr
 message counter More...
 
bool enableLogging
 

Detailed Description

main class which provides canopen API functions and manages all nodes.

This class contains a canopen specific API which accesses the canopen bus through the bus-independ Hilscher device API. It reads the configuration which has to be written previously to the device by SyCon. Based on this configuration data it searches node corresponding EDS files to create object directories. These help to enshure type security and cast warnings when users try to write incorrect data types to can nodes.

Definition at line 55 of file rlcanopen.h.

Constructor & Destructor Documentation

◆ rlCanOpen() [1/2]

rlCanOpen::rlCanOpen ( )

Definition at line 40 of file rlcanopen.cpp.

41 {
42  rlDebugPrintf("Constructer nodes class\n");
43  read_inifile("./canopen.ini");
44  if (enableLogging){
45  FILE* fp;
46  fp = freopen (logFileName.ascii(),"w",stdout); // redirekt stdout to textfile
47 
48  /* enable linebuffering in order to write every line to the file immediately */
49  setvbuf ( fp , NULL , _IOFBF , 1024 );
50  }
51  ini();
52 }
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
QString logFileName
name of logfile stdout is redirected to
Definition: rlcanopen.h:244
bool ini()
initialize nodes and create nodelist
Definition: rlcanopen.cpp:71
void read_inifile(const char *_filename)
read properties of inifile
Definition: rlcanopen.cpp:1189
bool enableLogging
Definition: rlcanopen.h:281

◆ rlCanOpen() [2/2]

rlCanOpen::rlCanOpen ( char *  _inifilename)

Definition at line 29 of file rlcanopen.cpp.

30 {
31  rlDebugPrintf("Constructer nodes class\n");
32  read_inifile(_inifilename);
33  if (enableLogging){
34  freopen (logFileName.ascii(),"w",stdout); // redirekt stdout to textfile
35  }
36  ini();
37 }
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
QString logFileName
name of logfile stdout is redirected to
Definition: rlcanopen.h:244
bool ini()
initialize nodes and create nodelist
Definition: rlcanopen.cpp:71
void read_inifile(const char *_filename)
read properties of inifile
Definition: rlcanopen.cpp:1189
bool enableLogging
Definition: rlcanopen.h:281

◆ ~rlCanOpen()

rlCanOpen::~rlCanOpen ( )

Definition at line 54 of file rlcanopen.cpp.

55 {
56  rlDebugPrintf("destruktor rlCanOpen\n");
57  for (int i=0;i<boardcount;i++)
58  DevExitBoard(i);
59 
60 #ifdef RLWIN32
61  DevCloseDriver(0);
62 #else
63  DevCloseDriver();
64 #endif
65  if (enableLogging)
66  fclose (stdout);
67 
68 }
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
int boardcount
the current count of CanOpenMaster cards
Definition: rlcanopen.h:253
bool enableLogging
Definition: rlcanopen.h:281

Member Function Documentation

◆ createMappingObjects()

int rlCanOpen::createMappingObjects ( int  _boardid,
int  _nodeid,
int  _pdoDirection 
)
private

this function writes the mapping objects for each pdo of a node

creates the mappings for each pdo

Definition at line 137 of file rlcanopen.cpp.

138 {
139  int pdomax = 0;
140  if (_pdoDirection == DIRECTION_RECEIVE)
141  pdomax = nodelist[nodelist.size()-1]->getReceivePdoCount();
142  else if(_pdoDirection == DIRECTION_TRANSMIT)
143  pdomax = nodelist[nodelist.size()-1]->getTransmitPdoCount();
144 
145  for (int j = 1;j<=pdomax;j++) //each receive/transmit pdo
146  if(refreshMappingList(_boardid,_nodeid,j,_pdoDirection)==0) return 0;
147  return 1;
148 
149 }
#define DIRECTION_RECEIVE
definition of CanOpen structs for CanOpen Deamon
#define DIRECTION_TRANSMIT
int refreshMappingList(int _boardnr, int _nodeid, int _pdoID, int _pdoDirection)
Definition: rlcanopen.cpp:917
QPtrVector< rlCanNode > nodelist
this list contains all nodes from all boards
Definition: rlcanopen.h:250

◆ createNodes()

int rlCanOpen::createNodes ( )
private

Search for nodes in all boards and append it into the nodelist.

this function checks the bus for available nodes and creates a corresponding nodelist

Definition at line 103 of file rlcanopen.cpp.

104 {
105  int nodeid;
106  for (int boardid = 0;boardid<boardcount;boardid++)
107  {
108  setBoardActive(boardid);
109  for(nodeid = 0; nodeid <= MAX_NODES; nodeid++) // from node 0..127
110  if (getNodeConfiguration(nodeid)) // writes received node-configuration
111  // into class-global message-struct
112  {
113  // new node found. insert it into the nodelist
114  nodelist.resize( nodelist.size() + 1 );
115 
116  // append the new node in the list
117  nodelist.insert( nodelist.size()-1,
118  new rlCanNode(boardid,nodeid,message));
119 
120  //append Mapping data
121  if (nodelist[nodelist.size()-1]->hasMapping()){
122  if(!createMappingObjects(boardid,nodeid,DIRECTION_TRANSMIT))return 0;
123  if(!createMappingObjects(boardid,nodeid,DIRECTION_RECEIVE))return 0;
124  }
125  else
126  {
127  rlDebugPrintf("WARNING: no Mapping available on node %d.", nodeid);
128  rlDebugPrintf("Probably EDS file couldn't be found in EDS directory.\n");
129  }
130  }
131  }
132  return 1;
133 }
#define MAX_NODES
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
#define DIRECTION_RECEIVE
definition of CanOpen structs for CanOpen Deamon
int boardcount
the current count of CanOpenMaster cards
Definition: rlcanopen.h:253
#define DIRECTION_TRANSMIT
short setBoardActive(int _boardnr)
sets a desired CanOpenMaster active, so that it can be used
Definition: rlcanopen.cpp:285
int createMappingObjects(int _boardid, int _nodeid, int _pdoDirection)
this function writes the mapping objects for each pdo of a node
Definition: rlcanopen.cpp:137
QPtrVector< rlCanNode > nodelist
this list contains all nodes from all boards
Definition: rlcanopen.h:250
class to manage one node of a CanOpenMaster board in a CanOpen network
Definition: rlcannode.h:48
bool getNodeConfiguration(int _nodeID)
Definition: rlcanopen.cpp:217
RCS_MESSAGETELEGRAM_10 message
hilscher specific message structur which will be sent to the master card
Definition: rlcanopen.h:247

◆ delmsg()

void rlCanOpen::delmsg ( )
private

clear message struct by setting all elements to zero

this function resets all elements of global message struct to zero

Definition at line 859 of file rlcanopen.cpp.

859  {
860  message.rx =0;
861  message.tx =0;
862  message.ln =0;
863  message.nr =0;
864  message.a =0;
865  message.f =0;
866  message.b =0;
867  message.e =0;
868  message.device_adr =0;
869  message.data_area =0;
870  message.data_adr =0;
871  message.data_idx =0;
872  message.data_cnt =0;
873  message.data_type =0;
874  message.function =0;
875 
876  for (int i = 0; i < MAX_SDO_BUFFERSIZE; i++)
877  message.d[i] = 0;
878 
879 }
#define MAX_SDO_BUFFERSIZE
RCS_MESSAGETELEGRAM_10 message
hilscher specific message structur which will be sent to the master card
Definition: rlcanopen.h:247

◆ getActiveBoard()

int rlCanOpen::getActiveBoard ( )

returns the number of currently active board

returns the currently active board

Definition at line 296 of file rlcanopen.cpp.

297 {
298  return activeboard;
299 }
int activeboard
the currently active board
Definition: rlcanopen.h:219

◆ getBoardCount()

int rlCanOpen::getBoardCount ( )

returns the number of available boards

returns the current count of available CanOpenMaster cards

Definition at line 211 of file rlcanopen.cpp.

212 {
213  return boardcount;
214 }
int boardcount
the current count of CanOpenMaster cards
Definition: rlcanopen.h:253

◆ getNodeConfiguration()

bool rlCanOpen::getNodeConfiguration ( int  _nodeID)
private

This function reads out the configuration of a specific node using special Hilscher commands (CMDCODE_GET_CONFIGURATION). If the master board isn't configurated by SyCon it is not possibly to use this function with success. It returns false if the node is not available

Device Number

Pointer to user buffer

Timeout

Definition at line 217 of file rlcanopen.cpp.

218 {
219  //build message
220  message.rx = CAN_TASK;
221  message.tx = USER_AT_HOST;
222  message.ln = 8;
223  message.nr =messagenr++;
224  message.a =0;
225  message.f =0;
227  message.e =0x00; //fragmentation
228  message.device_adr =_nodeID;
229  message.data_area =0;
230  message.data_adr =0;
231  message.data_idx =0;
232  message.data_cnt =0;
233  message.data_type =0;
234  message.function =0;
235 
236  //put configuration request
237  DevPutMessage(0, (MSG_STRUC *)&message,5000L) ;
238 
239  //receive answer message
240  sRet = DevGetMessage ( 0,
241  sizeof(message),
242  (MSG_STRUC *)&message,
243  2000L );
244 
245  unsigned char msgnrlocal = messagenr -1;
246 
247  // receive correct answer
248  if((message.a == RESPONSE_CODE_GET_CONFIGURATION) && (message.nr == msgnrlocal))
249  if (message.f == ERRCODE_NOERROR) // node active, no error
250  if(message.e == 0x00) //configuration fits in the message
251  {
252  sprintf(err_out_buf, "Board %d node %d is active. No problems found\n",
253  getActiveBoard(), _nodeID);
254 
256  return 1;
257  }
258  else
259  {
260  sprintf(err_out_buf, "Board %d node %d is active. \n",
261  getActiveBoard(), _nodeID);
262 
264  rlDebugPrintf("Configuration data does not fit in one message,\n");
265  rlDebugPrintf("so the current node does not include the complete data\n");
266  rlDebugPrintf(" - multiplex configration data is not yet implemented!!! -\n");
267  return 1;
268  }
269  else return 0;
270  else
271  {
272  sprintf(err_out_buf, "---->message.a=%d, message.nr=%d unsere msg nr: %d\n",
273  message.a, message.nr, msgnrlocal);
274 
276  sprintf(err_out_buf, "%s\n", "Communication ERROR!!!");
278  return 0;
279  }
280 }
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
int getActiveBoard()
returns the number of currently active board
Definition: rlcanopen.cpp:296
#define CAN_TASK
Hilscher device-communication constants.
#define CMDCODE_GET_CONFIGURATION
char err_out_buf[255]
this string buffer is usually written with sprintf before sent to stdout
Definition: rlcanopen.h:235
#define ERRCODE_NOERROR
ERRCODES.
unsigned char messagenr
message counter
Definition: rlcanopen.h:256
#define USER_AT_HOST
short sRet
return value for hilscher specific message functions
Definition: rlcanopen.h:238
#define RESPONSE_CODE_GET_CONFIGURATION
RCS_MESSAGETELEGRAM_10 message
hilscher specific message structur which will be sent to the master card
Definition: rlcanopen.h:247

◆ getNodeIndex()

int rlCanOpen::getNodeIndex ( int  _boardnr,
int  _nodeid,
int &  _index 
)

this function returns the listindex of a desired node

Because the nodes of all boards are stored in one list, the listindex is not equal to the nodeID(1-127). Use this function to get the listindex of a desired node

Definition at line 882 of file rlcanopen.cpp.

883 {
884  for(unsigned int i = 0; i < nodelist.size(); i++)
885  {
886  if ((nodelist[i]->getNodeID() == _nodeid) &&
887  (nodelist[i]->getBoardID() == _boardnr))
888  {
889  _index = i;
890  return true;
891  }
892  }
893  return false;
894 }
QPtrVector< rlCanNode > nodelist
this list contains all nodes from all boards
Definition: rlcanopen.h:250

◆ getNodeState()

int rlCanOpen::getNodeState ( int  _boardnr,
int  _nodeid,
rlCanOpenTypes _data 
)

use this function to get information about a specific node

Use this function to get information about a specific node. The nodestate, nodeerror and a nodestateFlag will be written to the rlCanOpenTypes. Read the rlCanOpenTypes.h header to get further information about these variables. Hilscher specific function (so no CanOpoen services) are used to receive the information

Definition at line 1045 of file rlcanopen.cpp.

1046 {
1047 
1048  setBoardActive(_boardnr);
1049 
1050  COM_ND_DIAGNOSTICS * diag;
1051  diag = (COM_ND_DIAGNOSTICS*) &message.d[0];
1052 
1053  message.rx = CAN_TASK ;//receiver = user at HOST
1054  message.tx = USER_AT_HOST ;// transmitter = USR_INTF-Task
1055  message.ln = 8 ;//length of message
1056  message.nr = messagenr++ ;//number of the message
1057  message.a = 0 ;//no answer
1058  message.f = 0 ;//error, status
1059  message.b = CMDCODE_Node_Diag;//command = COM_Node_Diag
1060  message.e =0 ;//extension
1061  message.device_adr = _nodeid ;//k Rem_Adr
1062  message.data_area = 0 ;// data area, unused
1063  message.data_adr = 0 ;//data address, unused
1064  message.data_idx = 0 ;//data index, unused
1065  message.data_cnt = 0 ;//data count, unused
1066  message.data_type = 5 ;// data type byte string
1067  message.function = 1 ;//function read
1068 
1069 
1070  if ( (sRet = DevPutMessage(_boardnr, (MSG_STRUC *)&message, 5000L))
1071  == DRV_NO_ERROR )
1072  {
1073  while( (sRet = DevGetMessage(_boardnr, sizeof(message),
1074  (MSG_STRUC *)&message, 0))
1075  == DRV_DEV_GET_NO_MESSAGE )
1076  {
1077  continue;
1078  }
1079  if ( sRet == DRV_NO_ERROR )
1080  {
1081  rlDebugPrintf("message successfully received\n");
1082  // continue;
1083  }
1084  else
1085  {
1086  rlDebugPrintf("Error Message (f = %d))\n",message.f);
1087  rlDebugPrintf("\nDevGetMessage(%d, sizeof(message), &message, 500): %d\n",
1088  _boardnr, (int)sRet);
1089 
1090  return 0;
1091  }
1092  }
1093  else
1094  {
1095  rlDebugPrintf("\nDevPutMessage(%d, &message, 5000): %d\n",_boardnr, (int)sRet);
1096  return 0;
1097  }
1098  _data.set_nodestateFlags( diag->bNodeStatus_1.bNodeNoResponse,
1099  diag->bNodeStatus_1.bEmcyBuffOverflow,
1100  diag->bNodeStatus_1.bPrmFault,
1101  diag->bNodeStatus_1.bGuardActive,
1102  diag->bNodeStatus_1.bDeactivated );
1103 
1104  _data.set_nodestate(diag->bNodeState);
1105  _data.set_nodeerror(diag->bActualError);
1106 
1108 
1109  return 1;
1110 }
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
void set_nodeerror(unsigned char _nodeerror)
void set_DaemonType(rl_types _type)
alternative setter receives integer typenumber
#define CAN_TASK
Hilscher device-communication constants.
short setBoardActive(int _boardnr)
sets a desired CanOpenMaster active, so that it can be used
Definition: rlcanopen.cpp:285
unsigned char messagenr
message counter
Definition: rlcanopen.h:256
#define USER_AT_HOST
void set_nodestateFlags(unsigned char _bNodeNoResponse, unsigned char _bEmcyBuffOverflow, unsigned char _bPrmFault, unsigned char _bGuardActive, unsigned char _bDeactivated)
sets type to RL_NODESTATE. Stores flag-data received from the device.
short sRet
return value for hilscher specific message functions
Definition: rlcanopen.h:238
#define CMDCODE_Node_Diag
RCS_MESSAGETELEGRAM_10 message
hilscher specific message structur which will be sent to the master card
Definition: rlcanopen.h:247
void set_nodestate(unsigned char _nodestate)
sets current state of node.

◆ getObjectType()

int rlCanOpen::getObjectType ( int  _boardnr,
int  _nodeid,
int  _objectindex,
int  _subindex 
)

returns daemontype number of a specific object

returns daemontype number of an object. The type is retrieved from the node's objectdir. When no objectdir exists (e.g. because of a missing EDS file) or when the requested object does not exist, this function will return 0xFF (the corresponding value to rlCanOpenTypes::RL_NOTYPE)

Definition at line 897 of file rlcanopen.cpp.

901 {
902  int nodeindex;
903  if (getNodeIndex(_boardnr, _nodeid, nodeindex)){
904  if (nodelist[nodeindex]->hasMapping())
905  return nodelist[nodeindex]->objecttype(_objectindex, _subindex);
906  else
908  }
909  else{
911  }
912 }
int getNodeIndex(int _boardnr, int _nodeid, int &_index)
this function returns the listindex of a desired node
Definition: rlcanopen.cpp:882
QPtrVector< rlCanNode > nodelist
this list contains all nodes from all boards
Definition: rlcanopen.h:250

◆ getPdoID()

int rlCanOpen::getPdoID ( int  _boardnr,
int  _nodeid,
int  _objektindex,
int  _direction 
)
private

return PdoId of mapped object.

this function iterates through the recieve/tramsmit pdo lists and returns the ID number of the pdo that fits the given objektindex. The PdoId identifies the send/receive PDO on the given node

Definition at line 1015 of file rlcanopen.cpp.

1018  {
1019  int pdomax=0;
1020  int nodeindex=0;
1021  int madress=0;
1022  // get index of node in nodelist depending on boardid and nodeid
1023  // index is stored in nodeindex variable
1024  getNodeIndex(_boardnr, _nodeid, nodeindex);
1025 
1026  // get number of elements in particular PDO list
1027  if (_direction == DIRECTION_RECEIVE)
1028  pdomax = nodelist[nodeindex]->getReceivePdoCount();
1029  if (_direction == DIRECTION_TRANSMIT)
1030  pdomax = nodelist[nodeindex]->getTransmitPdoCount();
1031 
1032  /* iterate through every element of particular list until mapping
1033  object adress matches given objectindex */
1034  for (int j=1;j<=pdomax;j++)
1035  {
1036 
1037  madress = nodelist[nodeindex]->pdoList[_direction][j-1]->mappingOvAdress;
1038  if (madress == _objektindex)
1039  return j;
1040  }
1041  return 0;
1042 }
#define DIRECTION_RECEIVE
definition of CanOpen structs for CanOpen Deamon
#define DIRECTION_TRANSMIT
int getNodeIndex(int _boardnr, int _nodeid, int &_index)
this function returns the listindex of a desired node
Definition: rlcanopen.cpp:882
QPtrVector< rlCanNode > nodelist
this list contains all nodes from all boards
Definition: rlcanopen.h:250

◆ ini()

bool rlCanOpen::ini ( )
private

initialize nodes and create nodelist

Definition at line 71 of file rlcanopen.cpp.

72 {
73  messagenr = 0;
74  nodelist.setAutoDelete(true);
75 
76  time_t rawtime;
77  struct tm * timeinfo;
78  time ( &rawtime );
79  timeinfo = localtime ( &rawtime );
80 
81  sprintf(err_out_buf, "\nnew session startet: %s\n", asctime(timeinfo));
83 
84  if (iniboards()){
85  rlDebugPrintf("at least one board initialize!\n");
86  }
87  else
88  {
89  rlDebugPrintf("no board available or no board could be initialized correctly!\n");
90  rlDebugPrintf("Programm -> Close\n");
91  exit(0);
92  }
93 
94  // search for active nodes and create them
95 
96  createNodes();
97 
98 
99  return 1;
100 }
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
char err_out_buf[255]
this string buffer is usually written with sprintf before sent to stdout
Definition: rlcanopen.h:235
QPtrVector< rlCanNode > nodelist
this list contains all nodes from all boards
Definition: rlcanopen.h:250
unsigned char messagenr
message counter
Definition: rlcanopen.h:256
bool iniboards()
Read informations about installed devices.
Definition: rlcanopen.cpp:154
int createNodes()
Search for nodes in all boards and append it into the nodelist.
Definition: rlcanopen.cpp:103

◆ iniboards()

bool rlCanOpen::iniboards ( )
private

Read informations about installed devices.

Definition at line 154 of file rlcanopen.cpp.

155 {
156 
157  int currentboardcount=0;
158 
159  BOARD_INFO tBoardInfo;
160 
161 #ifdef RLWIN32
162  if ( (sRet = DevOpenDriver(0)) == DRV_NO_ERROR)
163 #else
164  if ( (sRet = DevOpenDriver()) == DRV_NO_ERROR)
165 #endif
166  {
167  // Driver successfully opend, read board information
168 #ifdef RLWIN32
169  if ( (sRet = DevGetBoardInfo( 0, sizeof(tBoardInfo), &tBoardInfo)) != DRV_NO_ERROR)
170 #else
171  if ( (sRet = DevGetBoardInfo( &tBoardInfo)) != DRV_NO_ERROR)
172 #endif
173  {
174  // Function error
175  rlDebugPrintf( "DevGetBoardInfo RetWert = %5d \n", sRet );
176  } else
177  {
178  // Information successfully read, save for further use
179  // Check out which boards are available
180  for ( int usIdx = 0; usIdx < MAX_DEV_BOARDS; usIdx++)
181  {
182  if ( tBoardInfo.tBoard[usIdx].usAvailable == TRUE) {
183  // Board is configured, try to init the board
184  sRet = DevInitBoard(
185 #ifdef RLWIN32
186  tBoardInfo.tBoard[usIdx].usBoardNumber, NULL);
187 #else
188  tBoardInfo.tBoard[usIdx].usBoard);
189 #endif
190  if ( sRet != DRV_NO_ERROR) {
191  // Function error
192  rlDebugPrintf( "DevInitBoard RetWert = %5d \n", sRet );
193  } else {
194  // DEVICE is available and ready............
195  currentboardcount++;
196  }
197  }
198  }
199  }
200  }
201  boardcount = currentboardcount;
202 
203  if (currentboardcount!=0)
204  return 1;
205  else
206  return 0;
207 }
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
int boardcount
the current count of CanOpenMaster cards
Definition: rlcanopen.h:253
#define RLWIN32
Definition: rldefine.h:42
short sRet
return value for hilscher specific message functions
Definition: rlcanopen.h:238

◆ is_twisted_type()

bool rlCanOpen::is_twisted_type ( int  _canopentype)

Definition at line 1226 of file rlcanopen.cpp.

1227 {
1228  switch (_canopentype){
1229 
1230  case rlCanOpenTypes::INTEGER24_t :return true;
1231  case rlCanOpenTypes::INTEGER40_t :return true;
1232  case rlCanOpenTypes::INTEGER48_t :return true;
1233  case rlCanOpenTypes::INTEGER56_t :return true;
1234  case rlCanOpenTypes::UNSIGNED24_t:return true;
1235  case rlCanOpenTypes::UNSIGNED40_t:return true;
1236  case rlCanOpenTypes::UNSIGNED48_t:return true;
1237  case rlCanOpenTypes::UNSIGNED56_t:return true;
1238  default :return false;
1239  };
1240 
1241 }

◆ pdo_receive() [1/2]

int rlCanOpen::pdo_receive ( int  _boardnr,
int  _nodeid,
int  _pdonr,
int  _mappingnr,
rlCanOpenTypes _pdo_data 
)

using the pdo_receive function you can receive a mapped object within PDO

using the pdo_receive function you can receive a PDO (Process Data Object), which is send from the specific node to the device. The enquired object will be written to the rlCanOpenTypes class. The mapping is only available if mapping is configurated during the node creation of the rlcanopen constructer. Therefore a eds file (electronic data sheet) is needed. Use the cannode::hasMapping() function to check if mapping is available. To read out the correct value from this class use one of the get_TYPE() {e.g. get_int() } functions you can assert the type in the class using rlCanOpenTypes::get_DaemonType();

Definition at line 544 of file rlcanopen.cpp.

549 {
550 
551  int nodeindex;
552  unsigned char buffer[8];
553 
554  if (getNodeIndex(_boardnr,_nodeid,nodeindex)== 0)
555  {
556  rlDebugPrintf("ERROR: specified node does not exist! PDO receive failed!");
557  rlDebugPrintf("BoardId: %d NodeId: %d PDO ID: %d Mappingnr: %d\n",
558  _boardnr, _nodeid, _pdonr, _mappingnr);
559 
561  return 0;
562  }
563  if (nodelist[nodeindex]->pdoList[DIRECTION_TRANSMIT].size() < (unsigned int) _pdonr){
564  rlDebugPrintf("ERROR: specified PDO ID does not exist! PDO receive failed!");
565  rlDebugPrintf("BoardId: %d NodeId: %d PDO ID: %d Mappingnr: %d\n",
566  _boardnr, _nodeid, _pdonr, _mappingnr);
567 
569  return 0;
570  }
571  else if (nodelist[nodeindex]->pdoList[DIRECTION_TRANSMIT][_pdonr -1]->mappingList.size()
572  < (unsigned int) _mappingnr){
573  rlDebugPrintf("ERROR: specified Mappingnr does not exist! PDO receive failed!");
574  rlDebugPrintf("BoardId: %d NodeId: %d PDO ID: %d Mappingnr: %d\n",
575  _boardnr, _nodeid, _pdonr, _mappingnr);
576 
578  return 0;
579  }
580 
581  // PDO No.1 has the index 0 !!!
582  int pdosize = nodelist[nodeindex]->pdoList[DIRECTION_TRANSMIT][_pdonr-1]->bPDOSize;
583  int pdooffset = nodelist[nodeindex]->pdoList[DIRECTION_TRANSMIT][_pdonr-1]->usPDOAddress;
584 
585  //cout<<"size ="<<pdosize<<" offset = "<<pdooffset<<"\n";
586 
587  if ( (sRet = DevExchangeIO( _boardnr, // Board NO
588  0, //offset send data
589  0, //Length of the send IO data
590  NULL, //Pointer to the user send data buffer
591  pdooffset, //Byte offset in the receive IO data area
592  pdosize, //Length of the receive IO data
593  &buffer[0], //Pointer to the user read data buffer
594  100L) //timeout in milliseconds
595  ) == DRV_NO_ERROR)
596  {
597 
598  int length_in_byte = nodelist[nodeindex]->
599  pdoList[DIRECTION_TRANSMIT][_pdonr-1]->mappingList[_mappingnr-1]->length/8;
600 
601  int position_in_byte = nodelist[nodeindex]->
602  pdoList[DIRECTION_TRANSMIT][_pdonr-1]->mappingList[_mappingnr-1]->position/8;
603 
604  _pdo_data.clearBuffer();
605 
606  for(int i = position_in_byte; i< length_in_byte+position_in_byte;i++)
607  {
608  _pdo_data.set_buffer(i-position_in_byte,buffer[i]);
609  }
610 
611  _pdo_data.set_DaemonType( nodelist[nodeindex]->pdoList[DIRECTION_TRANSMIT][_pdonr-1]->
612  mappingList[_mappingnr-1]->etype);
613 
614 
615  _pdo_data.set_rlmsgerr(ERRCODE_NOERROR);
616 
617 
618  // if CanOpen-Type is a twistet integer (etc. 52Bit ) the value will be converted
619  int canopentype = nodelist[nodeindex]->pdoList[DIRECTION_TRANSMIT][_pdonr-1]->
620  mappingList[_mappingnr-1]->canopentype;
621 
622  if (is_twisted_type(canopentype))
623  _pdo_data.translate_CanOpenType(canopentype);
624 
625  return 1;
626  }
627  rlDebugPrintf("ERROR: PDO receive failed!");
628  rlDebugPrintf("BoardId: %d NodeId: %d PDO ID: %d Mappingnr: %d\n",
629  _boardnr, _nodeid, _pdonr, _mappingnr);
630 
632 
633  return 0;
634 }
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
void set_DaemonType(rl_types _type)
alternative setter receives integer typenumber
#define DIRECTION_TRANSMIT
#define ERRCODE_INVALID_NODEID
int getNodeIndex(int _boardnr, int _nodeid, int &_index)
this function returns the listindex of a desired node
Definition: rlcanopen.cpp:882
#define ERRCODE_PDORCV_FAIL
#define ERRCODE_INVALID_MAPID
void set_rlmsgerr(long _errnr)
sets the errornumber. refer private varibale rlmsgerr for details
void clearBuffer()
sets all bytes in databuffer to zero
#define ERRCODE_NOERROR
ERRCODES.
QPtrVector< rlCanNode > nodelist
this list contains all nodes from all boards
Definition: rlcanopen.h:250
bool is_twisted_type(int _canopentype)
Definition: rlcanopen.cpp:1226
#define ERRCODE_INVALID_PDOID
bool translate_CanOpenType(int _canopentype)
short sRet
return value for hilscher specific message functions
Definition: rlcanopen.h:238
void set_buffer(int _index, unsigned char _databyte)
transfer raw data into the databuffer

◆ pdo_receive() [2/2]

int rlCanOpen::pdo_receive ( int  _boardnr,
int  _nodeid,
int  _pdonr,
rlCanOpenTypes _pdo_data 
)

using the pdo_receive function you can receive a PDO (Process Data Object)

using the pdo_receive function you can receive a PDO (Process Data Object), which is send from the specific node to the canOpen master card. The data will be written to the rlCanOpenTypes class. This function doesn't use mapping. So the whole 8Byte PDO data, will be received. To read out use the rlCanOpenTypes::get_buffer({0-7}) function

Definition at line 637 of file rlcanopen.cpp.

641 {
642 
643  int nodeindex;
644  if (getNodeIndex(_boardnr,_nodeid,nodeindex)== 0)
645  {
646  sprintf(err_out_buf, "ERROR: specified node does not exist! PDO \
647  receive failed! BoardId: %d NodeId: %d PDO \
648  ID: %d\n", _boardnr, _nodeid, _pdonr);
650 
651  //cout<<"ERROR: specified node does not exist!\n";
653  return 0;
654  }
655 
656  if (nodelist[nodeindex]->pdoList[DIRECTION_TRANSMIT].size() < (unsigned int) _pdonr){
657  sprintf(err_out_buf, "ERROR: specified PDO ID does not exist! \
658  PDO receive failed! BoardId: %d NodeId: \
659  %d PDO ID: %d\n", _boardnr, _nodeid, _pdonr);
661 
662  //cout<<"PDO ID does not exists!\n";
664  return 0;
665  }
666 
667  int pdosize = nodelist[nodeindex]->pdoList[DIRECTION_TRANSMIT][_pdonr-1]->bPDOSize;
668 
669  int pdooffset = nodelist[nodeindex]->
670  pdoList[DIRECTION_TRANSMIT][_pdonr-1]->usPDOAddress;
671 
672  //cout<<"\nsize ="<<pdosize<<" offset = "<<pdooffset;
673 
674  if ( (sRet = DevExchangeIO( _boardnr, // Board NO
675  0, //offset send data
676  0, //Length of the send IO data
677  NULL, //Pointer to the user send data buffer
678  pdooffset, //Byte offset in the receive IO data area
679  pdosize, //Length of the receive IO data
680  &_pdo_data.pdobuffer[0],//Pointer to the user read data buffer
681  100L) //timeout in milliseconds
682  ) == DRV_NO_ERROR)
683  {
684  _pdo_data.pdobuf2buf();
685  //rlDebugPrintf("PDO recieve successfull!\n");
686  _pdo_data.set_rlmsgerr(ERRCODE_NOERROR);
687  return 1;
688 
689  }
690  sprintf(err_out_buf, "ERROR: PDO receive failed! \
691  BoardId: %d NodeId: %d PDO \
692  ID: %d\n", _boardnr, _nodeid, _pdonr);
694 
695  //rlDebugPrintf("ERROR: PDO RECEIVE FAILED\n");
697  return 0;
698 }
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
#define DIRECTION_TRANSMIT
#define ERRCODE_INVALID_NODEID
int getNodeIndex(int _boardnr, int _nodeid, int &_index)
this function returns the listindex of a desired node
Definition: rlcanopen.cpp:882
#define ERRCODE_PDORCV_FAIL
void pdobuf2buf()
exchange bytes 0-7 from pdobuffer to databuffer
void set_rlmsgerr(long _errnr)
sets the errornumber. refer private varibale rlmsgerr for details
char err_out_buf[255]
this string buffer is usually written with sprintf before sent to stdout
Definition: rlcanopen.h:235
#define ERRCODE_NOERROR
ERRCODES.
QPtrVector< rlCanNode > nodelist
this list contains all nodes from all boards
Definition: rlcanopen.h:250
unsigned char pdobuffer[8]
external buffer for pdotransfer
#define ERRCODE_INVALID_PDOID
short sRet
return value for hilscher specific message functions
Definition: rlcanopen.h:238

◆ pdo_transmit() [1/2]

int rlCanOpen::pdo_transmit ( int  _boardnr,
int  _nodeid,
int  _pdonr,
int  _mappingnr,
rlCanOpenTypes _pdo_data 
)

transmit a mapped object within a PDO to a specific node

Using the pdo_transmit function you can transmit a PDO (Process Data Object) to a specific node. The desired data must be written to the rlCanOpenTypes class. The mapping is only available if mapping is configurated during the node creation of the rlcanopen constructer. Therefore an eds file (electronic data sheet) is needed. Use the cannode::hasMapping() function to check if mapping is available

Definition at line 703 of file rlcanopen.cpp.

708 {
709  int nodeindex;
710  if (getNodeIndex(_boardnr,_nodeid,nodeindex)== 0)
711  {
712  sprintf(err_out_buf, "ERROR: specified node does not exist! PDO transmit \
713  failed! BoardId: %d NodeId: %d PDO ID: %d Mappingnr:\
714  %d\n", _boardnr, _nodeid, _pdonr, _mappingnr);
717  return 0;
718  }
719  if (nodelist[nodeindex]->pdoList[DIRECTION_RECEIVE].size() < (unsigned int) _pdonr){
720  sprintf(err_out_buf, "ERROR: specified PDO ID does not exist! PDO transmit\
721  failed! BoardId: %d NodeId: %d PDO ID: %d Mappingnr:\
722  %d\n", _boardnr, _nodeid, _pdonr, _mappingnr);
724 
725  //cout<<"PDO ID does not exists!\n";
727  return 0;
728  }
729  else if (nodelist[nodeindex]->pdoList[DIRECTION_RECEIVE][_pdonr -1]->mappingList.size()
730  < (unsigned int) _mappingnr){
731  sprintf(err_out_buf, "ERROR: specified mappingnr does not exist! PDO \
732  transmit failed! BoardId: %d NodeId: %d PDO \
733  ID: %d Mappingnr: %d\n",
734  _boardnr, _nodeid, _pdonr, _mappingnr);
736 
737  //cout<<"mapping ID does not exists!\n";
739  return 0;
740  }
741 
742  // PDO No.1 has the index 0 !!!
743  int pdosize = nodelist[nodeindex]->pdoList[DIRECTION_RECEIVE][_pdonr-1]->bPDOSize;
744  int pdooffset = nodelist[nodeindex]->pdoList[DIRECTION_RECEIVE][_pdonr-1]->usPDOAddress;
745 
746  int length_in_byte = nodelist[nodeindex]->pdoList[DIRECTION_RECEIVE][_pdonr-1]->
747  mappingList[_mappingnr-1]->length/8;
748 
749  int position_in_byte = nodelist[nodeindex]->pdoList[DIRECTION_RECEIVE][_pdonr-1]->
750  mappingList[_mappingnr-1]->position/8;
751 
752  if (_pdo_data.get_DaemonType() != (nodelist[nodeindex]->
753  pdoList[DIRECTION_RECEIVE][_pdonr-1]->mappingList[_mappingnr-1]->etype))
754  {
755 
756  sprintf(err_out_buf, "ERROR: invalid type! Expected type: %d Your Type:\
757  %d! PDO transmit failed! BoardId: %d NodeId: %d \
758  PDO ID: %d Mappingnr: %d\n",
759  nodelist[nodeindex]->pdoList[DIRECTION_RECEIVE][_pdonr-1]->
760  mappingList[_mappingnr-1]->etype,
761  _pdo_data.get_DaemonType(), _boardnr, _nodeid, _pdonr, _mappingnr);
762 
763 
765  _pdo_data.get_DaemonType();
767  return 0;
768  }
769 
770  _pdo_data.buf2pdobuf();
771 
772  // no conversion necessary. correct length in mapping list
773 
774  pdooffset = pdooffset + position_in_byte;
775  pdosize = length_in_byte;
776 
777 
778 
779  //cout<<"size ="<<pdosize<<" offset = "<<pdooffset<<"\n";
780 
781  if ( (sRet = DevExchangeIO( _boardnr, // Board NO
782  pdooffset, //offset send data
783  pdosize, //Length of the send IO data
784  &_pdo_data.pdobuffer[0],//Pointer to the user send data buffer
785  0, //Byte offset in the receive IO data area
786  0, //Length of the receive IO data
787  NULL, //Pointer to the user read data buffer
788  100L) //timeout in milliseconds
789  ) == DRV_NO_ERROR)
790  {
791  _pdo_data.set_rlmsgerr(0);
792  //rlDebugPrintf("PDO transmit successful! \n");
793  return 1;
794  }
795  sprintf(err_out_buf, "ERROR: PDO transmit failed! BoardId: %d NodeId: %d \
796  PDO ID: %d Mappingnr: %d\n",
797  _boardnr, _nodeid, _pdonr, _mappingnr);
799 
801  return 0;
802 }
#define ERRCODE_INVALID_RLTYPE
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
#define DIRECTION_RECEIVE
definition of CanOpen structs for CanOpen Deamon
#define ERRCODE_INVALID_NODEID
int getNodeIndex(int _boardnr, int _nodeid, int &_index)
this function returns the listindex of a desired node
Definition: rlcanopen.cpp:882
int get_DaemonType()
returns current of data stored in databuffer
#define ERRCODE_INVALID_MAPID
void set_rlmsgerr(long _errnr)
sets the errornumber. refer private varibale rlmsgerr for details
void buf2pdobuf()
exchange bytes 0-7 from databuffer to pdobuffer
char err_out_buf[255]
this string buffer is usually written with sprintf before sent to stdout
Definition: rlcanopen.h:235
QPtrVector< rlCanNode > nodelist
this list contains all nodes from all boards
Definition: rlcanopen.h:250
unsigned char pdobuffer[8]
external buffer for pdotransfer
#define ERRCODE_INVALID_PDOID
#define ERRCODE_PDOSND_FAIL
short sRet
return value for hilscher specific message functions
Definition: rlcanopen.h:238

◆ pdo_transmit() [2/2]

int rlCanOpen::pdo_transmit ( int  _boardnr,
int  _nodeid,
int  _pdonr,
rlCanOpenTypes _pdo_data 
)

transmit a 8 Byte PDO to a specific node

Using the pdo_transmit function you can transmit a PDO (Process Data Object) to a specific node. The desired data must be written to the rlCanOpenTypes class. This function does not support mapping. So the whole 8byte PDO data, will be send to write to the rlCanOpenTypes use the rlCanOpenTypes::set_buffer({0-7}) function

Definition at line 806 of file rlcanopen.cpp.

810 {
811  int nodeindex;
812  _pdo_data.buf2pdobuf();
813 
814  if (getNodeIndex(_boardnr,_nodeid,nodeindex)== 0)
815  {
816  sprintf(err_out_buf, "ERROR: specified node does not exist! PDO transmit\
817  failed! BoardId: %d NodeId: %d PDO ID: %d \n",
818  _boardnr, _nodeid, _pdonr);
819 
822  return 0;
823  }
824  if (nodelist[nodeindex]->pdoList[DIRECTION_RECEIVE].size() < (unsigned int) _pdonr){
825  sprintf(err_out_buf, "ERROR: specified PDO ID does not exist! PDO \
826  transmit failed! BoardId: %d NodeId: %d PDO \
827  ID: %d \n", _boardnr, _nodeid, _pdonr);
830  return 0;
831  }
832 
833  int pdosize = nodelist[nodeindex]->pdoList[DIRECTION_RECEIVE][_pdonr-1]->bPDOSize;
834  int pdooffset = nodelist[nodeindex]->pdoList[DIRECTION_RECEIVE][_pdonr-1]->usPDOAddress;
835 
836  if ( (sRet = DevExchangeIO( _boardnr, // Board NO
837  pdooffset, //offset send data
838  pdosize, //Length of the send IO data
839  &_pdo_data.pdobuffer[0],//Pointer to the user send data buffer
840  0, //Byte offset in the receive IO data area
841  0, //Length of the receive IO data
842  NULL, //Pointer to the user read data buffer
843  100L) //timeout in milliseconds
844  ) == DRV_NO_ERROR)
845  {
846  _pdo_data.set_rlmsgerr(ERRCODE_NOERROR);
847  return 1;
848  }
849  sprintf(err_out_buf, "ERROR: PDO transmit failed! BoardId: %d NodeId: %d \
850  PDO ID: %d \n", _boardnr, _nodeid, _pdonr);
852 
854  return 0;
855 }
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
#define DIRECTION_RECEIVE
definition of CanOpen structs for CanOpen Deamon
#define ERRCODE_INVALID_NODEID
int getNodeIndex(int _boardnr, int _nodeid, int &_index)
this function returns the listindex of a desired node
Definition: rlcanopen.cpp:882
void set_rlmsgerr(long _errnr)
sets the errornumber. refer private varibale rlmsgerr for details
void buf2pdobuf()
exchange bytes 0-7 from databuffer to pdobuffer
char err_out_buf[255]
this string buffer is usually written with sprintf before sent to stdout
Definition: rlcanopen.h:235
#define ERRCODE_NOERROR
ERRCODES.
QPtrVector< rlCanNode > nodelist
this list contains all nodes from all boards
Definition: rlcanopen.h:250
unsigned char pdobuffer[8]
external buffer for pdotransfer
#define ERRCODE_INVALID_PDOID
#define ERRCODE_PDOSND_FAIL
short sRet
return value for hilscher specific message functions
Definition: rlcanopen.h:238

◆ read_inifile()

void rlCanOpen::read_inifile ( const char *  _filename)
private

read properties of inifile

read properties of inifile. EDS path, logfile location and user-specific options are set on startup

Definition at line 1189 of file rlcanopen.cpp.

1189  {
1190  rlIniFile ini;
1191  QString buffer;
1192  if (ini.read(_filename)!=-1){
1193  rlDebugPrintf("used inifile: %s\n", _filename);
1194 
1195  // read EDS directory location
1196  buffer=QString(ini.text("DIRECTORIES","EdsDir"));
1197  buffer.remove((char) ACSII_CODE_CARRIAGE_RETURN);
1198  rlDebugPrintf("EdsDir: %s\n", buffer.ascii());
1199  // store EDS directory location in environmet variable
1200 #ifdef RLWIN32
1201  SetEnvironmentVariable("EdsDir", buffer.ascii());
1202 #else
1203  setenv("EdsDir", buffer.ascii(), 1);
1204 #endif
1205 
1206  // read Logfilename
1207  logFileName=QString(ini.text("DIRECTORIES","LogFileName"));
1208  logFileName.remove((char) ACSII_CODE_CARRIAGE_RETURN);
1209  rlDebugPrintf("Log Filename: %s\n", logFileName.ascii());
1210 
1211  // read loggin-option
1212  buffer=QString(ini.text("OPTIONS","enableLoggin"));
1213  if (buffer.contains("yes", false)==1)
1214  enableLogging=true;
1215  else
1216  enableLogging=false;
1217  }
1218  else
1219  {
1220  logFileName= "./outfile.txt";
1221  rlDebugPrintf("ERROR: INIFILE NOT FOUND\n");
1222  }
1223 }
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
QString logFileName
name of logfile stdout is redirected to
Definition: rlcanopen.h:244
bool ini()
initialize nodes and create nodelist
Definition: rlcanopen.cpp:71
bool enableLogging
Definition: rlcanopen.h:281

◆ refreshMappingList()

int rlCanOpen::refreshMappingList ( int  _boardnr,
int  _nodeid,
int  _pdoID,
int  _pdoDirection 
)
private

if the user changes the mapping of a node using SDO functions, the internal mapping list should be changed

Definition at line 917 of file rlcanopen.cpp.

921 {
922  //rlDebugPrintf("refresh mappinglist1\n");
923  int nodeindex;
924  int madress=0;
925 
926 
927  madress = nodelist[nodelist.size()-1]->
928  pdoList[_pdoDirection][_pdoID -1]->mappingOvAdress;
929 
930  if (getNodeIndex(_boardnr,_nodeid,nodeindex)== false)
931  {
932  sprintf(err_out_buf, "ERROR: specified node does not exist! refresh \
933  mapping list failed! BoardId: %d NodeId: %d \
934  PDO ID: %d \n", _boardnr, _nodeid, _pdoID);
936  return 0;
937  }
938 
939 
940  if(nodelist[nodeindex]->pdoList[_pdoDirection].size() < (unsigned int) _pdoID)
941  {
942  sprintf(err_out_buf, "ERROR: PDO does not exist! refresh \
943  mapping list failed! BoardId: %d NodeId: %d \
944  PDO ID: %d \n", _boardnr, _nodeid, _pdoID);
946  return 0;
947  }
948 
949  //append Mapping data
950  rlCanOpenTypes sdobuffer;
951  int mappingcount;
952  rlCanMapping * mappingobject;
953 
954  //get mapping count
955  if (sdo_read(_boardnr,_nodeid,madress,0,sdobuffer) == 0){
956  sprintf(err_out_buf, "ERROR: read sdo data! refresh mapping list failed! \
957  BoardId: %d NodeId: %d PDO ID: %d \n",
958  _boardnr, _nodeid, _pdoID);
960  }
961 
962  mappingcount = sdobuffer.get_uchar();
963 
964  sprintf(err_out_buf, "Current mappingcount: %d\n", mappingcount);
966 
967  nodelist[nodeindex]->pdoList[_pdoDirection][_pdoID-1]->
968  mappingList.resize(mappingcount);
969 
970  int currentposition = 0;
971  for (int mcount = 1; mcount <= mappingcount;mcount++) //each mappingobject
972  {
973  mappingobject = new rlCanMapping; //create new mappingobject in memory
974  mappingobject->mappingId = mcount;
975 
976 
977  if (sdo_read(_boardnr,_nodeid,madress,mcount,sdobuffer) == 0){
978  sprintf(err_out_buf, "ERROR: read sdo data! refresh mapping list failed! \
979  BoardId: %d NodeId: %d PDO ID: %d \n",
980  _boardnr, _nodeid, _pdoID);
982  //cout<<"Error during create Mappinglist!\n";
983  }
984 
985  //get length of mapping object
986  int mlength = sdobuffer.get_buffer(0);
987  mappingobject->length = mlength;
988 
989  //calculate the mapping position
990  if (mcount>1)
991  mappingobject->position = currentposition;
992  else
993  mappingobject->position = 0;
994  currentposition+=mlength;
995 
996  // get the ov adress of the current mapped object
997  int mi = (int) (sdobuffer.get_buffer(3)*pow(256,1)
998  + sdobuffer.get_buffer(2));
999 
1000  unsigned char msi = sdobuffer.get_buffer(1);
1001 
1002  rlCanOpenTypes temptype;
1003  mappingobject->etype = temptype.canOpenType2DeamonType
1004  (nodelist[nodelist.size()-1]->objecttype(mi, msi));
1005 
1006  // insert the mappingobject to mappinglist
1007  nodelist[nodeindex]->pdoList[_pdoDirection][_pdoID-1]->
1008  mappingList.insert(mcount-1,mappingobject);
1009 
1010  }
1011  return 1;
1012 }
unsigned short mappingId
the mapping ID determines the mapping object within the PDO (1 to n)
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
class to handle CANopen types
int sdo_read(int _boardnr, int _nodeid, int _objectindex, int _subindex, rlCanOpenTypes &_sdo_data)
read a certain object from the object dictionary of a node
Definition: rlcanopen.cpp:332
static int canOpenType2DeamonType(int _canopentype)
Function for typenumber conversion.
int getNodeIndex(int _boardnr, int _nodeid, int &_index)
this function returns the listindex of a desired node
Definition: rlcanopen.cpp:882
unsigned short position
its position in within the 8Byte
unsigned char get_uchar()
returns databuffer-content as uchar type
char err_out_buf[255]
this string buffer is usually written with sprintf before sent to stdout
Definition: rlcanopen.h:235
mapping object which is part of the mappinglist of a PDO
QPtrVector< rlCanNode > nodelist
this list contains all nodes from all boards
Definition: rlcanopen.h:250
int etype
its current type (int32, float, char, ...)
unsigned char get_buffer(int _index)
returns 1 byte from databuffer
unsigned short length
length of mappend object in bits

◆ restartBoard()

int rlCanOpen::restartBoard ( int  _boardnr,
int  _restarttype 
)

using this function you are able to restart a CanOpenMaster board

Using this function you are able to restart a CanOpenMaster board (device). There are 3 possibly kinds of restarting the master: coldstart, warmstart, bootstart. The corresponding '#defines' are declared in canopenstructs.h Hilscher specific function (so no CanOpoen services) are used to execute this command

Definition at line 1114 of file rlcanopen.cpp.

1115 {
1116  //COLDSTART 2
1117  //WARMSTART 3
1118  //BOOTSTART 4
1119 
1120  if ( (sRet = DevReset(_boardnr, _restarttype, 5000L) != DRV_NO_ERROR ))
1121  {
1122  rlDebugPrintf("restart failed!\n");
1123  rlDebugPrintf("DevReset(%d, Restart, 5000): %d\n", _boardnr, sRet);
1124  return 0;
1125  }
1126 
1127  rlDebugPrintf("restart successfully\n");
1128  return 1;
1129 }
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
short sRet
return value for hilscher specific message functions
Definition: rlcanopen.h:238

◆ sdo_read()

int rlCanOpen::sdo_read ( int  _boardnr,
int  _nodeid,
int  _objectindex,
int  _subindex,
rlCanOpenTypes _sdo_data 
)

read a certain object from the object dictionary of a node

using the sdo_read function you can read a certain object from the object dictionary of a node. For this the SDO (Service Data Object) service will be used. The enquired object will be written to the rlCanOpenTypes class. To read out the correct value from this class use one of the get_TYPE() {e.g. get_int() } functions. You can assert the type in the class using rlCanOpenTypes::get_DaemonType(); if sdo_read failures the current error can be read out using rlCanOpenTypes::get_rlmsgerr()

Definition at line 332 of file rlcanopen.cpp.

337 {
338  int datalength;
339  int canopentype;
340  int nodeindex;
341 
342  if (getNodeIndex(_boardnr,_nodeid,nodeindex)== 0)
343  {
344  rlDebugPrintf("ERROR: specified node does not exist! SDO write failed!");
345  rlDebugPrintf("BoardId: %d NodeId: %d Objektindex: %d Subindex: %d\n",
346  _boardnr, _nodeid, _objectindex, _subindex);
347 
349  return 0;
350  }
351 
352 
353  delmsg();
354  setBoardActive(_boardnr);
355 
356  message.rx = CAN_TASK;
357  message.tx = USER_AT_HOST;
358  message.ln = 8;
359  message.nr = messagenr++;
360  message.a = 0;
361  message.f = 0;
363  message.e = 0;
364  message.device_adr = _nodeid;
365  message.data_area = 0;
366  message.data_adr = _objectindex;
367  message.data_idx = _subindex;
368  message.data_cnt = 0;
369  message.data_type = 0;
370  message.function = TASK_TFC_READ;
371 
372  if(DevPutMessage(0, (MSG_STRUC *)&message,5000L) != DRV_NO_ERROR) return 0;
373 
374  delmsg();
375  // receive the answer
376 
377  sRet = DevGetMessage( getActiveBoard(), // Device Number
378  sizeof(message),
379  (MSG_STRUC *)&message, // Pointer to user buffer
380  2000L ); // Timeout
381  unsigned char msgnrlocal;
382  msgnrlocal = messagenr - 1;
383 
384  // receive correct answer
385  if((message.a == CMDCODE_SDO_UPDOWNLOAD)&&(message.nr == msgnrlocal)){
386  _sdo_data.set_rlmsgerr(message.f);
387  if (message.f == ERRCODE_NOERROR) // node active, no error
388  {
389  canopentype=getObjectType(_boardnr, _nodeid, _objectindex, _subindex);
390  if (canopentype!=rlCanOpenTypes::RL_NOTYPE){
391  _sdo_data.set_CanOpenType(canopentype);
392  datalength = _sdo_data.getLength();
393  }
394  else
395  {
397  datalength = MAX_SDO_BUFFERSIZE;
398  }
399  _sdo_data.clearBuffer();
400  for(int i = 0; i < datalength; i++)
401  _sdo_data.set_buffer(i, message.d[i]);
402 
403  // if CanOpen-Type is a twistet integer (etc. 52Bit ) the value will be converted
404  if ((is_twisted_type(canopentype)) && (nodelist[nodeindex]->hasMapping()))
405  _sdo_data.translate_CanOpenType(canopentype);
406 
407  return 1;
408  }
409  else
410  {
411  rlDebugPrintf("message.f = %d message.f = %x Hex \n", message.f, message.f);
412  }
413  }
414  else
415  {
416  rlDebugPrintf("message.a = %d message.nr = %d vergleich mit: %d\n",
417  message.a, message.nr, msgnrlocal);
418 
419  _sdo_data.set_rlmsgerr(-1);
420  }
421  rlDebugPrintf("ERROR during read SDO message!");
422  rlDebugPrintf("BoardId: %d NodeId: %d Obj: %x Sub: %x\n",
423  _boardnr, _nodeid, _objectindex, _subindex);
424 
425 
426  return 0;
427 }
#define CMDCODE_SDO_UPDOWNLOAD
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
void set_CanOpenType(int _type)
recieves an CANopen typenumber and returns appropiate RL-Type
int getActiveBoard()
returns the number of currently active board
Definition: rlcanopen.cpp:296
#define TASK_TFC_READ
void delmsg()
clear message struct by setting all elements to zero
Definition: rlcanopen.cpp:859
void set_DaemonType(rl_types _type)
alternative setter receives integer typenumber
#define CAN_TASK
Hilscher device-communication constants.
short setBoardActive(int _boardnr)
sets a desired CanOpenMaster active, so that it can be used
Definition: rlcanopen.cpp:285
#define ERRCODE_INVALID_NODEID
int getNodeIndex(int _boardnr, int _nodeid, int &_index)
this function returns the listindex of a desired node
Definition: rlcanopen.cpp:882
void set_rlmsgerr(long _errnr)
sets the errornumber. refer private varibale rlmsgerr for details
void clearBuffer()
sets all bytes in databuffer to zero
#define ERRCODE_NOERROR
ERRCODES.
int getLength()
returns number of bytes used for current type
int getObjectType(int _boardnr, int _nodeid, int _objectindex, int _subindex)
returns daemontype number of a specific object
Definition: rlcanopen.cpp:897
QPtrVector< rlCanNode > nodelist
this list contains all nodes from all boards
Definition: rlcanopen.h:250
bool is_twisted_type(int _canopentype)
Definition: rlcanopen.cpp:1226
unsigned char messagenr
message counter
Definition: rlcanopen.h:256
#define USER_AT_HOST
bool translate_CanOpenType(int _canopentype)
short sRet
return value for hilscher specific message functions
Definition: rlcanopen.h:238
void set_buffer(int _index, unsigned char _databyte)
transfer raw data into the databuffer
#define MAX_SDO_BUFFERSIZE
RCS_MESSAGETELEGRAM_10 message
hilscher specific message structur which will be sent to the master card
Definition: rlcanopen.h:247

◆ sdo_write()

int rlCanOpen::sdo_write ( int  _boardnr,
int  _nodeid,
int  _objectindex,
int  _subindex,
rlCanOpenTypes _sdo_data 
)

write data into a certain object from the object dictionary of a node

using the sdo_write function you can write to a certain object from the object dictionary of a node. For this the SDO (Service Data Object) Service will be used. The relevant data must be written into the rlCanOpenTypes class before. To write the data into the rlCanOpenTypes class use one of the datatype depending functions like rlCanOpenTypes::set_int(int _value); if sdo_write failures the current error can be read out using rlCanOpenTypes::get_rlmsgerr()

Definition at line 431 of file rlcanopen.cpp.

436 {
437  int length;
438  int pdoid;
439  length = _sdo_data.getLength();
440  int nodeindex;
441  if (getNodeIndex(_boardnr,_nodeid,nodeindex)== 0)
442  {
443  rlDebugPrintf("ERROR: specified node does not exist! SDO write failed!");
444  rlDebugPrintf("BoardId: %d NodeId: %d Objektindex: %d Subindex: %d\n",
445  _boardnr, _nodeid, _objectindex, _subindex);
446 
448  return 0;
449  }
450 
451  // if CanOpen-Type is a twistet integer (etc. 52Bit ) the datalength must be adjusted
452  int canopentype = getObjectType(_boardnr, _nodeid, _objectindex, _subindex);
453 
454  if ((is_twisted_type(canopentype)) && (nodelist[nodeindex]->hasMapping()))
455  length = _sdo_data.get_CanOpenTypeLength(canopentype);
456 
457  for(int i = 0;i<length;i++)
458  message.d[i] = _sdo_data.get_buffer(i);
459 
460 
461  setBoardActive(_boardnr);
462 
463  message.rx = CAN_TASK;
464  message.tx = USER_AT_HOST;
465  message.ln = 8+ length;
466  message.nr = messagenr++;
467  message.a = 0;
468  message.f = 0;
470  message.e = 0;
471  message.device_adr = _nodeid;
472  message.data_area = 0;
473  message.data_adr = _objectindex;
474  message.data_idx = _subindex;
475  message.data_cnt = length;
476  message.data_type = 0;
477  message.function = TASK_TFC_WRITE;
478 
479  if(DevPutMessage(0, (MSG_STRUC *)&message,5000L) != DRV_NO_ERROR) return 0;
480 
481 
482  // receive the answer
483 
484  sRet = DevGetMessage ( _boardnr, // Device Number
485  sizeof(message),
486  (MSG_STRUC *)&message, // Pointer to user buffer
487  2000L ); // Timeout
488 
489  unsigned char msgnrlocal = messagenr - 1;
490 
491  // receive correct answer
492  if((message.a == CMDCODE_SDO_UPDOWNLOAD)&&(message.nr == msgnrlocal)){
493  _sdo_data.set_rlmsgerr(message.f);
494  if (message.f == ERRCODE_NOERROR) // node active, no error
495  {
496  //check if the mapping has changed
497  if( (_objectindex >= TRANSMIT_PDO_MAPPING_STARTADRESS) &&
498  (_objectindex <= TRANSMIT_PDO_MAPPING_MAXADRESS) &&
499  (nodelist[nodeindex]->hasMapping()) )
500  {
501  rlDebugPrintf("Mapping has changed: boardid %d, nodeid %d, objectindex %x\n",
502  _boardnr, _nodeid, _objectindex);
503 
504  pdoid = getPdoID(_boardnr, _nodeid, _objectindex, DIRECTION_TRANSMIT);
505  refreshMappingList(_boardnr,_nodeid,pdoid,DIRECTION_TRANSMIT);
506  }
507  else if ( (_objectindex >= RECEIVE_PDO_MAPPING_STARTADRESS) &&
508  (_objectindex <= RECEIVE_PDO_MAPPING_MAXADRESS) &&
509  (nodelist[nodeindex]->hasMapping()) )
510  {
511  rlDebugPrintf("Mapping has changed: boardid %d, nodeid %d, objectindex %x\n",
512  _boardnr, _nodeid, _objectindex);
513  pdoid = getPdoID(_boardnr, _nodeid, _objectindex, DIRECTION_RECEIVE);
514  refreshMappingList(_boardnr,_nodeid,pdoid,DIRECTION_RECEIVE);
515  }
516  return 1;
517  }
518  else
519  {
520  sprintf(err_out_buf, "message.f = %d message.f = %x Hex \n",
521  message.f, message.f);
522 
524  _sdo_data.set_rlmsgerr(message.f);
525  }
526  }
527  else
528  {
529  _sdo_data.set_rlmsgerr(-1);
530  sprintf(err_out_buf, "message.a = %d message.nr = %d vergleich mit: %d\n",
531  message.a, message.nr, msgnrlocal);
532 
534  }
535  rlDebugPrintf("ERROR during read SDO message!");
536  rlDebugPrintf("BoardId: %d NodeId: %d Obj: %x Sub: %x\n",
537  _boardnr, _nodeid, _objectindex, _subindex);
538 
540  return 0;
541 }
#define CMDCODE_SDO_UPDOWNLOAD
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
#define DIRECTION_RECEIVE
definition of CanOpen structs for CanOpen Deamon
#define TRANSMIT_PDO_MAPPING_MAXADRESS
#define DIRECTION_TRANSMIT
#define CAN_TASK
Hilscher device-communication constants.
short setBoardActive(int _boardnr)
sets a desired CanOpenMaster active, so that it can be used
Definition: rlcanopen.cpp:285
#define ERRCODE_INVALID_NODEID
int refreshMappingList(int _boardnr, int _nodeid, int _pdoID, int _pdoDirection)
Definition: rlcanopen.cpp:917
int getNodeIndex(int _boardnr, int _nodeid, int &_index)
this function returns the listindex of a desired node
Definition: rlcanopen.cpp:882
#define TRANSMIT_PDO_MAPPING_STARTADRESS
void set_rlmsgerr(long _errnr)
sets the errornumber. refer private varibale rlmsgerr for details
char err_out_buf[255]
this string buffer is usually written with sprintf before sent to stdout
Definition: rlcanopen.h:235
#define ERRCODE_NOERROR
ERRCODES.
int getLength()
returns number of bytes used for current type
int getObjectType(int _boardnr, int _nodeid, int _objectindex, int _subindex)
returns daemontype number of a specific object
Definition: rlcanopen.cpp:897
#define RECEIVE_PDO_MAPPING_MAXADRESS
int getPdoID(int _boardnr, int _nodeid, int _objektindex, int _direction)
return PdoId of mapped object.
Definition: rlcanopen.cpp:1015
int get_CanOpenTypeLength(int _canopentype)
QPtrVector< rlCanNode > nodelist
this list contains all nodes from all boards
Definition: rlcanopen.h:250
bool is_twisted_type(int _canopentype)
Definition: rlcanopen.cpp:1226
unsigned char messagenr
message counter
Definition: rlcanopen.h:256
#define RECEIVE_PDO_MAPPING_STARTADRESS
#define TASK_TFC_WRITE
#define USER_AT_HOST
unsigned char get_buffer(int _index)
returns 1 byte from databuffer
short sRet
return value for hilscher specific message functions
Definition: rlcanopen.h:238
RCS_MESSAGETELEGRAM_10 message
hilscher specific message structur which will be sent to the master card
Definition: rlcanopen.h:247

◆ sendNMTCommand()

int rlCanOpen::sendNMTCommand ( int  _boardnr,
int  _nodeid,
unsigned char  _cmd 
)

send a NMT Command to one or all nodes (of one board)

Using this function you can send a NMT Command to one or all nodes (of one board). NMT (Network Management) is a CanOpen service. Because of the device there are constrictions for the user. You can only execute the follow NMT commands: START_REMOTE_NODE, STOP_REMOTE_NODE, ENTER_PREOPERATIONAL, RESET_NODE, RESET_COMMUNICATION The corresponding '#defines' are declared in canopenstructs.h

Definition at line 1132 of file rlcanopen.cpp.

1133 {
1134  MSG_STRUC message;
1135  setBoardActive(_boardnr);
1136 
1137  message.rx = CAN_TASK ;//receiver = user at HOST
1138  message.tx = USER_AT_HOST ;// transmitter = USR_INTF-Task
1139  message.ln = 2 ;//length of message
1140  message.nr = messagenr++ ;//number of the message
1141  message.a = 0 ;//no answer
1142  message.f = 0 ;//error, status
1143  message.b = CMD_NMT_Module_Protocol;//command = COM_Node_Diag
1144  message.e = 0 ;//extension
1145 
1146  // NMT Command specifier
1147  //1 Start Remote Node
1148  //2 Stop Remote Node
1149  //128 Enter Pre-Operational
1150  //129 Reset Node
1151  //130 Reset Communication
1152  message.data[0] = _cmd ;//NMT Command specifier
1153  message.data[1] = _nodeid ;//NodeID
1154 
1155  if ( (sRet = DevPutMessage(_boardnr, (MSG_STRUC *)&message, 5000L))
1156  == DRV_NO_ERROR )
1157  {
1158  while( (sRet = DevGetMessage(_boardnr, sizeof(message),
1159  (MSG_STRUC *)&message, 0))
1160  == DRV_DEV_GET_NO_MESSAGE )
1161  {
1162  continue;
1163  }
1164  if ( sRet == DRV_NO_ERROR )
1165  {
1166  rlDebugPrintf("NMT message successfully received\n");
1167  // continue;
1168  }
1169  else
1170  {
1171  rlDebugPrintf("Error Message (f = %d))\n",message.f);
1172  rlDebugPrintf("\nDevGetMessage(%d, sizeof(message), &message, 500): %d\n",
1173  _boardnr, (int)sRet);
1174 
1175  return 0;
1176  }
1177  }
1178  else
1179  {
1180  rlDebugPrintf("\nDevPutMessage(NMT)(%d, &message, 5000): %d\n",_boardnr, (int)sRet);
1181  return 0;
1182  } /* if ( (sRet = DevPutMessage(...)) == DRV_NO_ERROR ) else */
1183 
1184  return 1;
1185 }
int rlDebugPrintf(const char *format,...)
Definition: rlcutil.cpp:61
#define CAN_TASK
Hilscher device-communication constants.
short setBoardActive(int _boardnr)
sets a desired CanOpenMaster active, so that it can be used
Definition: rlcanopen.cpp:285
#define CMD_NMT_Module_Protocol
unsigned char messagenr
message counter
Definition: rlcanopen.h:256
#define USER_AT_HOST
short sRet
return value for hilscher specific message functions
Definition: rlcanopen.h:238
RCS_MESSAGETELEGRAM_10 message
hilscher specific message structur which will be sent to the master card
Definition: rlcanopen.h:247

◆ setBoardActive()

short rlCanOpen::setBoardActive ( int  _boardnr)
private

sets a desired CanOpenMaster active, so that it can be used

Definition at line 285 of file rlcanopen.cpp.

286 {
287 
288  if ( (sRet = DevSetHostState( _boardnr, HOST_READY, 0L) == DRV_NO_ERROR) )
289  activeboard = _boardnr;
290 
291  return sRet;
292 }
int activeboard
the currently active board
Definition: rlcanopen.h:219
short sRet
return value for hilscher specific message functions
Definition: rlcanopen.h:238

◆ showNodeConfiguration() [1/2]

bool rlCanOpen::showNodeConfiguration ( int  _boardnr,
int  _nodeid 
)

prints out the configuration of a specific node

Definition at line 303 of file rlcanopen.cpp.

304 {
305  for( unsigned int i = 0; i < nodelist.size(); i++)
306  {
307  if ((nodelist[i]->getNodeID() == _nodeid) &&
308  (nodelist[i]->getBoardID() == _boardnr))
309  {
310  nodelist[i]->showConfiguration();
311  return true;
312 
313  }
314  }
315 
316  return false;
317 }
QPtrVector< rlCanNode > nodelist
this list contains all nodes from all boards
Definition: rlcanopen.h:250

◆ showNodeConfiguration() [2/2]

bool rlCanOpen::showNodeConfiguration ( )

prints out the configuration off all available nodes from all boards

Definition at line 320 of file rlcanopen.cpp.

321 {
322  if(nodelist.size() == 0) return 0;
323  for(unsigned int i = 0; i < nodelist.size(); i++)
324  {
325  nodelist[i]->showConfiguration();
326  }
327  return 1;
328 }
QPtrVector< rlCanNode > nodelist
this list contains all nodes from all boards
Definition: rlcanopen.h:250

Member Data Documentation

◆ activeboard

int rlCanOpen::activeboard
private

the currently active board

Definition at line 219 of file rlcanopen.h.

◆ boardcount

int rlCanOpen::boardcount
private

the current count of CanOpenMaster cards

Definition at line 253 of file rlcanopen.h.

◆ enableLogging

bool rlCanOpen::enableLogging
private

this indicator is true when stdout is redirected to file. it is set in the ini-file

Definition at line 281 of file rlcanopen.h.

◆ err_fp

FILE* rlCanOpen::err_fp
private

Pointer to error logfile.

Definition at line 241 of file rlcanopen.h.

◆ err_out_buf

char rlCanOpen::err_out_buf[255]
private

this string buffer is usually written with sprintf before sent to stdout

Definition at line 235 of file rlcanopen.h.

◆ logFileName

QString rlCanOpen::logFileName
private

name of logfile stdout is redirected to

Definition at line 244 of file rlcanopen.h.

◆ message

RCS_MESSAGETELEGRAM_10 rlCanOpen::message
private

hilscher specific message structur which will be sent to the master card

Definition at line 247 of file rlcanopen.h.

◆ messagenr

unsigned char rlCanOpen::messagenr
private

message counter

Definition at line 256 of file rlcanopen.h.

◆ nodelist

QPtrVector<rlCanNode> rlCanOpen::nodelist
private

this list contains all nodes from all boards

Definition at line 250 of file rlcanopen.h.

◆ sRet

short rlCanOpen::sRet
private

return value for hilscher specific message functions

Definition at line 238 of file rlcanopen.h.


The documentation for this class was generated from the following files: