Alex exoskeleton
ALEX SoftwareDocumentation
Functions | Variables
CO_master.h File Reference
#include "CO_driver.h"
#include "CO_SDO.h"
#include "CO_SDOmaster.h"
#include <pthread.h>
Include dependency graph for CO_master.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int sdoClientUpload (CO_SDOclient_t *SDOclient, uint8_t nodeID, uint16_t idx, uint8_t subidx, uint8_t *dataRx, uint32_t dataRxSize, uint32_t *dataRxLen, uint32_t *SDOabortCode, uint16_t SDOtimeoutTime, uint8_t blockTransferEnable)
 
int sdoClientDownload (CO_SDOclient_t *SDOclient, uint8_t nodeID, uint16_t idx, uint8_t subidx, uint8_t *dataTx, uint32_t dataTxLen, uint32_t *SDOabortCode, uint16_t SDOtimeoutTime, uint8_t blockTransferEnable)
 

Variables

pthread_mutex_t CO_CAN_VALID_mtx
 Testing ExoRobot new classes. More...
 
volatile uint32_t CO_timer1ms
 

Detailed Description

CANopen master functions

Author
Janez Paternoster

This file is part of CANopenSocket, a Linux implementation of CANopen stack with master functionality. Project home page is https://github.com/CANopenNode/CANopenSocket. CANopenSocket is based on CANopenNode: https://github.com/CANopenNode/CANopenNode.

CANopenSocket is free and open source software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file CO_master.h.

Function Documentation

int sdoClientDownload ( CO_SDOclient_t *  SDOclient,
uint8_t  nodeID,
uint16_t  idx,
uint8_t  subidx,
uint8_t dataTx,
uint32_t  dataTxLen,
uint32_t SDOabortCode,
uint16_t  SDOtimeoutTime,
uint8_t  blockTransferEnable 
)

Sdo client download.

For further details see CANopenNode/stack/CO_master.h file. This is blocking function.

Parameters
SDOclientPointer to CANopen SDO client object.
nodeIDNode-ID of the remote node.
idxIndex of object in object dictionary in remote node.
subidxSubindex of object in object dictionary in remote node.
dataTxPointer to data buffer, which contains the data.
dataTxLenLength of data in dataTx.
SDOabortCodeReturn variable - SDO abort code.
SDOtimeoutTimeSDO timeout time in milliseconds.
blockTransferEnableIf true, try to initiate block transfer.
Returns
0 on success.

Definition at line 96 of file CO_master.c.

int sdoClientUpload ( CO_SDOclient_t *  SDOclient,
uint8_t  nodeID,
uint16_t  idx,
uint8_t  subidx,
uint8_t dataRx,
uint32_t  dataRxSize,
uint32_t dataRxLen,
uint32_t SDOabortCode,
uint16_t  SDOtimeoutTime,
uint8_t  blockTransferEnable 
)

Sdo client upload.

For further details see CANopenNode/stack/CO_master.h file. This is blocking function.

Parameters
SDOclientPointer to CANopen SDO client object.
nodeIDNode-ID of the remote node.
idxIndex of object in object dictionary in remote node.
subidxSubindex of object in object dictionary in remote node.
dataRxPointer to data buffer, into which received data will be written.
dataRxSizeMaximum size of dataRx.
dataRxLenReturn variable - actual data length in dataRx.
SDOabortCodeReturn variable - SDO abort code.
SDOtimeoutTimeSDO timeout time in milliseconds.
blockTransferEnableIf true, try to initiate block transfer.
Returns
0 on success.

Definition at line 32 of file CO_master.c.

Variable Documentation

pthread_mutex_t CO_CAN_VALID_mtx

Testing ExoRobot new classes.

Mutex is locked, when CAN is not valid (configuration state). May be used from other threads. RT threads may use CO->CANmodule[0]->CANnormal instead.

Definition at line 39 of file main.cpp.

volatile uint32_t CO_timer1ms

Global variable increments each millisecond

Definition at line 70 of file main.cpp.