35 #define err00 "no error, command executed" 36 #define err03 "DESCRIPT table not found. DEVICE is not configured by SyCon" 37 #define err57 "sequence error. Check requested DeviceAdr of continued message" 38 #define err58 "no entry found for requested DeviceAdr of request message." 39 #define err100 "Communication ERROR!!!" 43 #include <qvaluevector.h> 44 #include <qptrvector.h> 216 int getPdoID(
int _boardnr,
int _nodeid,
int _objektindex,
int _direction);
int activeboard
the currently active board
main class which provides canopen API functions and manages all nodes.
int getActiveBoard()
returns the number of currently active board
void delmsg()
clear message struct by setting all elements to zero
int getBoardCount()
returns the number of available boards
int boardcount
the current count of CanOpenMaster cards
short setBoardActive(int _boardnr)
sets a desired CanOpenMaster active, so that it can be used
QString logFileName
name of logfile stdout is redirected to
class to handle CANopen types
int refreshMappingList(int _boardnr, int _nodeid, int _pdoID, int _pdoDirection)
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
bool ini()
initialize nodes and create nodelist
void read_inifile(const char *_filename)
read properties of inifile
int getNodeIndex(int _boardnr, int _nodeid, int &_index)
this function returns the listindex of a desired node
int sendNMTCommand(int _boardnr, int _nodeid, unsigned char _cmd)
send a NMT Command to one or all nodes (of one board)
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
int restartBoard(int _boardnr, int _restarttype)
using this function you are able to restart a CanOpenMaster board
bool showNodeConfiguration()
prints out the configuration off all available nodes from all boards
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
char err_out_buf[255]
this string buffer is usually written with sprintf before sent to stdout
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
int getObjectType(int _boardnr, int _nodeid, int _objectindex, int _subindex)
returns daemontype number of a specific object
int getPdoID(int _boardnr, int _nodeid, int _objektindex, int _direction)
return PdoId of mapped object.
int createMappingObjects(int _boardid, int _nodeid, int _pdoDirection)
this function writes the mapping objects for each pdo of a node
QPtrVector< rlCanNode > nodelist
this list contains all nodes from all boards
bool is_twisted_type(int _canopentype)
unsigned char messagenr
message counter
bool iniboards()
Read informations about installed devices.
FILE * err_fp
Pointer to error logfile.
int createNodes()
Search for nodes in all boards and append it into the nodelist.
short sRet
return value for hilscher specific message functions
int getNodeState(int _boardnr, int _nodeid, rlCanOpenTypes &_data)
use this function to get information about a specific node
bool getNodeConfiguration(int _nodeID)
RCS_MESSAGETELEGRAM_10 message
hilscher specific message structur which will be sent to the master card