18 #include <sys/types.h> 70 int _nodeid,
int _objectindex,
80 int _nodeid,
int _objectindex,
89 int _nodeid,
int _pdonr,
98 int _nodeid,
int _pdonr,
106 int _nodeid,
int _pdonr,
126 int restartBoard(
int _boardnr,
int _restarttype,
bool &returnstate);
161 rlCanClient(
int _port,
char* _remoteadress,
int _boardnr);
169 int sendNMTCommand(
int _nodeid,
unsigned char _cmd,
bool &returnstate);
int pdo_transmit(int _boardnr, int _nodeid, int _pdonr, int _mappingnr, rlCanOpenTypes &_pdo_data)
sends a single mapped pdo object to daemon.
int sendNMTCommand(int _nodeid, unsigned char _cmd, bool &returnstate)
int disconnect()
disconnects from daemon
char remoteadress[40]
string of remoteadress
class to handle CANopen types
Class performs API rlcanopen functions remotely through tcp sockets.
int sdo_read(int _boardnr, int _nodeid, int _objectindex, int _subindex, rlCanOpenTypes &_sdo_data)
remotely reads a certain object from the object dictionary of a node.
int restartBoard(int _restarttype, bool &returnstate)
int pdo_receive(int _boardnr, int _nodeid, int _pdonr, int _mappingnr, rlCanOpenTypes &_pdo_data)
receives single mapped pdo object from daemon.
rlCanOpenClient()
initializes the client on localhost port 5000
rlCanClient(int _port, char *_remoteadress, int _boardnr)
int pdo_receive(int _nodeid, int _pdonr, int _mappingnr, rlCanOpenTypes &_pdo_data)
int restartBoard(int _boardnr, int _restarttype, bool &returnstate)
forces daemon to restart canopen device.
int pdo_transmit(int _nodeid, int _pdonr, int _mappingnr, rlCanOpenTypes &_pdo_data)
int sdo_write(int _nodeid, int _objectindex, int _subindex, rlCanOpenTypes &_sdo_data)
int sendNMTCommand(int _boardnr, int _nodeid, unsigned char _cmd, bool &returnstate)
sends a NMT command to daemon.
int sdo_write(int _boardnr, int _nodeid, int _objectindex, int _subindex, rlCanOpenTypes &_sdo_data)
remotely writes data into a certain object from the object dictionary of a node
rlSocket * socket
pointer to socket object
int getNodeState(int _nodeid, rlCanOpenTypes &_data)
int pid
variable contains process id
int connect()
opens a new connection to a running rlCanOpenDaemon
int getNodeState(int _boardnr, int _nodeid, rlCanOpenTypes &_data)
receives node state data of particular node from daemon.
bool connected
flag indicates connection status
int port
variable contains port
int sdo_read(int _nodeid, int _objectindex, int _subindex, rlCanOpenTypes &_sdo_data)
~rlCanOpenClient()
destructor disconnects client
int client_timeout
timeout in ms
void setPort(int _port)
setter for private port variable
void setAdr(char *_adr)
setter for private remoteadress variable