33 _socket->
write((
void*) _message,
sizeof(*_message));
52 _socket->
write((
void*) _message,
sizeof(*_message));
82 _socket->
write((
void*) _message,
sizeof(*_message));
112 _socket->
write((
void*) _message,
sizeof(*_message));
128 _socket->
write((
void*) _message,
sizeof(*_message));
140 (
int) _message->
mtext[0]);
143 _socket->
write((
void*) _message,
sizeof(*_message));
162 _socket->
write((
void*) _message,
sizeof(*_message));
186 while(socket.isConnected())
188 ret = socket.read((
void*) &message,
sizeof(message));
191 sdo_read(daemonptr, &socket, &message);
232 int port = daemonptr->
getPort();
240 if(socketdescr == -1)
break;
260 if (_iniFileName!=0){
int rlDebugPrintf(const char *format,...)
main class which provides canopen API functions and manages all nodes.
int write(const void *buf, int len)
the IPCMSGSTRUCT is the transfer buffer which is send trough TCP sockets
canopen tcp/ip interface for concurrent device-access of multiple clientprocesses ...
void pdo_receive(rlCanOpenDaemon *_daemonptr, rlSocket *_socket, IPCMSGSTRUCT *_message)
void getIpcMsg(IPCMSGSTRUCT _myIpcMsg)
overwrites all data with IPCMSGSTRUCT data
void restart_board(rlCanOpenDaemon *_daemonptr, rlSocket *_socket, IPCMSGSTRUCT *_message)
class to handle CANopen types
void getNodeState(rlCanOpenDaemon *_daemonptr, rlSocket *_socket, IPCMSGSTRUCT *_message)
static void * clientconnection(void *arg)
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
int create(void *(*func)(void *), void *argument)
int sendNMTCommand(int _boardnr, int _nodeid, unsigned char _cmd)
send a NMT Command to one or all nodes (of one board)
void nmt_transmit(rlCanOpenDaemon *_daemonptr, rlSocket *_socket, IPCMSGSTRUCT *_message)
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
void sdo_read(rlCanOpenDaemon *_daemonptr, rlSocket *_socket, IPCMSGSTRUCT *_message)
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
static void * listenerthread(void *arg)
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
void sdo_write(rlCanOpenDaemon *_daemonptr, rlSocket *_socket, IPCMSGSTRUCT *_message)
rlCanOpenDaemon * daemonptr
void pdo_transmit(rlCanOpenDaemon *_daemonptr, rlSocket *_socket, IPCMSGSTRUCT *_message)
~rlCanOpenDaemon()
destructor destroys rlcanopen object
int getPort()
returns value of current port
void start()
runs service in endless loop
rlCanOpenDaemon()
empty constructor initializes on port 5000.
IPCMSGSTRUCT createIpcMsg()
returns a IPCMSGSTRUCT filled with current object data
int getNodeState(int _boardnr, int _nodeid, rlCanOpenTypes &_data)
use this function to get information about a specific node