FlexSEA Communication
Macros | Typedefs | Enumerations | Functions
device_wrapper.h File Reference

Go to the source code of this file.

Macros

#define NUM_TIMER_FREQS   11
 Valid streaming frequencies.
 
#define FX_MAX_DEVICES   10
 Max size of array returned by fxNumDevices.
 
#define MIN_UVLO   15000
 
#define MAX_UVLO   50000
 
#define MIN_UNIQUE_ID   0
 Unique ID has to be within uint16_t bounds.
 
#define MAX_UNIQUE_ID   65535
 
#define MIN_CURRENT_OFFSET   -15
 Current offset, in ADC ticks. Limits come from fx-rigid-re.
 
#define MAX_CURRENT_OFFSET   15
 

Typedefs

typedef enum fxError FxError
 
typedef enum fxControlMode FxControlMode
 
typedef enum fxAppType FxAppType
 

Enumerations

enum  fxError {
  FxSuccess = 0, FxFailure, FxInvalidParam, FxInvalidDevice,
  FxNotStreaming
}
 
enum  fxControlMode {
  FxPosition = 0, FxVoltage = 1, FxCurrent = 2, FxImpedance = 3,
  FxNone = 4, FxCustom = 5, FxMeasRes = 6, FxStalk = 7
}
 
enum  fxAppType {
  FxInvalidApp = -1, FxActPack = 0, FxExo, FxNetMaster,
  FxBMS, FxHabsolute, FxCellScreener, FxBattCycler
}
 

Functions

int fxOpen (const char *portName, unsigned int baudRate, unsigned int logLevel)
 Establish a connection with a FlexSEA device. More...
 
bool fxIsOpen (unsigned int deviceId)
 Check if the device with the given device ID is open. More...
 
bool fxIsActiveDevice (unsigned int deviceId)
 Check if Device connection is still active and running. More...
 
FxError fxClose (unsigned int deviceId)
 Disconnect from a FlexSEA device with the given device ID. More...
 
void fxCloseAll ()
 Disconnect from all FlexSEA devices.
 
int fxGetDeviceIds (int *idArray, unsigned int size)
 Get the device ID of all connected FlexSEA devices. The device ID is used by the functions in this API to specify which FlexSEA device to communicate with. More...
 
FxError fxStartStreaming (unsigned int deviceId, unsigned int frequency, bool shouldLog)
 Start streaming data from a FlexSEA device and optionally log the streamed data. The data logger can impact performance if you are sending many commands in quick succession. More...
 
FxError fxStopStreaming (unsigned int deviceId)
 Stop streaming data from a FlexSEA device. More...
 
int fxGetValidStreamingFrequencies (unsigned int deviceId, int validFrequencies[NUM_TIMER_FREQS])
 Get the valid frequencies for a device. More...
 
bool fxIsStreaming (unsigned int deviceId)
 check if streaming data from a FlexSEA device. More...
 
FxError fxReadDevice (unsigned int deviceId, ActPackState *readData)
 Read the most recent data from a streaming FlexSEA device stream. Must call fxStartStreaming before calling this. More...
 
FxError fxReadNetMasterDevice (unsigned int deviceId, NetMasterState *readData)
 Read the most recent data from a streaming FlexSEA NetMaster device. Must call fxStartStreaming before calling this. More...
 
FxError fxReadBMSDevice (unsigned int deviceId, BMSState *readData)
 Read the most recent data from a streaming FlexSEA BMS device. Must call fxStartStreaming before calling this. More...
 
FxError fxReadHabsoluteDevice (unsigned int deviceId, HabsoluteState *readData)
 Read the most recent data from a streaming FlexSEA Habsolute device. Must call fxStartStreaming before calling this. More...
 
FxError fxReadCellScreenerDevice (unsigned int deviceId, CellScreenerState *readData)
 Read the most recent data from a streaming FlexSEA CellScreener device. Must call fxStartStreaming before calling this. More...
 
FxError fxReadBattCyclerDevice (unsigned int deviceId, BattCyclerState *readData)
 Read the most recent data from a streaming FlexSEA BattCycler device. Must call fxStartStreaming before calling this. More...
 
FxError fxSetReadDataQueueSize (unsigned int deviceId, unsigned int size)
 Set the maximum read data queue size of a device. More...
 
int fxGetReadDataQueueSize (unsigned int deviceId)
 Get the maximum read data queue size of a device. More...
 
int fxReadDeviceAll (unsigned int deviceId, ActPackState *readData, unsigned int n)
 Read all data from a streaming FlexSEA device stream. Must call fxStartStreaming before calling this. More...
 
int fxReadNetMasterDeviceAll (unsigned int deviceId, NetMasterState *readData, unsigned int n)
 Read all exo data from a streaming FlexSEA NetMaster device. Must call fxStartStreaming before calling this. More...
 
int fxReadBMSDeviceAll (unsigned int deviceId, BMSState *readData, unsigned int n)
 Read all exo data from a streaming FlexSEA BMS device. Must call fxStartStreaming before calling this. More...
 
int fxReadHabsoluteDeviceAll (unsigned int deviceId, HabsoluteState *readData, unsigned int n)
 Read all exo data from a streaming FlexSEA Habsolute device. Must call fxStartStreaming before calling this. More...
 
int fxReadCellScreenerDeviceAll (unsigned int deviceId, CellScreenerState *readData, unsigned int n)
 Read all data from a streaming FlexSEA CellScreener device. Must call fxStartStreaming before calling this. More...
 
int fxReadBattCyclerDeviceAll (unsigned int deviceId, BattCyclerState *readData, unsigned int n)
 Read all data from a streaming FlexSEA BattCycler device. Must call fxStartStreaming before calling this. More...
 
FxError fxSetGains (unsigned int deviceId, unsigned int kp, unsigned int ki, unsigned int kd, unsigned int K, unsigned int B, unsigned int ff)
 Sets the gains used by PID controllers on the FlexSEA device. More...
 
FxError fxSendMotorCommand (unsigned int deviceId, FxControlMode controlMode, int value)
 Send a command to the device. More...
 
FxAppType fxGetAppType (unsigned int deviceId)
 Get the device application type. More...
 
FxError fxSetUVLO (unsigned int deviceId, unsigned int mV)
 Set the UVLO to the desired value. More...
 
FxError fxRequestUVLO (unsigned int deviceId)
 Send a UVLO request to the specified device. The value is retrieved asynchronously and must be checked by polling fxGetLastReceivedUVLO. More...
 
int fxGetLastReceivedUVLO (unsigned int deviceId)
 Check the last UVLO value which was received from the device. This UVLO value is updated asyncronously by making calls to fxRequestUVLO. More...
 
FxError fxSetUniqueId (unsigned int deviceId, unsigned int uid)
 Set the Unique ID to the desired value. More...
 
FxError fxSetCurrentOffset (unsigned int deviceId, int offset)
 Set the current offset to the desired value. More...
 
FxError fxRequestCurrentOffset (unsigned int deviceId)
 Send a current offset request to the specified device. The value is retrieved asynchronously and must be checked by polling fxGetLastReceivedCurrentOffset. More...
 
int fxGetLastReceivedCurrentOffset (unsigned int deviceId)
 Check the last current offset which was received from the device. This current offset is updated asyncronously by making calls to fxRequestCurrentOffset. More...
 
FxError fxSetI2T (unsigned int deviceId, i2tVals i2tValsToWrite)
 Set the i2t values to the desired values. More...
 
FxError fxRequestI2T (unsigned int deviceId)
 Send an i2t values request to the specified device. The value is retrieved asyncronously and must be checked by polling fxGetLastReceivedI2T. More...
 
i2tVals fxGetLastReceivedI2T (unsigned int deviceId)
 Check the last i2t values which were received from the device. These i2t values are updated asyncronously by making calls to fxRequestI2T. More...
 
FxError fxSendEventFlags (int flag, int time)
 
FxError fxFindPoles (unsigned int deviceId)
 Find the motor poles. More...
 
FxError fxSetAnkleTorquePoints (unsigned int deviceId, int16_t *newAnkleTorque, uint8_t controller, uint8_t points)
 Sends new Ankle Torque points to device (Read/Write) More...
 
FxError fxReadAnkleTorquePoints (unsigned int deviceId, uint8_t points)
 Reads new Ankle Torque points to device (pure read) More...
 
int16_t * fxGetLastReceivedAnkleTorquePoints (unsigned int deviceId)
 Returns the last points read by the stack. More...
 
FxError fxActivateBootloader (unsigned int deviceId, uint8_t target)
 Activates target bootloader. More...
 
FxError fxIsBootloaderActivated (unsigned int deviceId)
 Returns target bootloader status. More...
 
double fxGetTimingGain (unsigned int deviceId, bool *isValid, double *highestTimingGain)
 

Detailed Description

device_wrapper.h FlexSEA API Documentation

Author
Dephy Inc.

Macro Definition Documentation

◆ MIN_UVLO

#define MIN_UVLO   15000

Under-voltage lockout (UVLO) In mV, values defined by fx-rigid-re (HW + SW)

Enumeration Type Documentation

◆ fxControlMode

Enumerator
FxVoltage 

Position - Send a position setpoint.

FxCurrent 

Voltage - Open Control Command.

FxImpedance 

Current - Send a current Setpoint command.

FxNone 

Impedance - Send an impedance command. Position setpoints but with stiffness and damping coefficients.

FxCustom 

No controller type. Shutoff command.

Function Documentation

◆ fxActivateBootloader()

FxError fxActivateBootloader ( unsigned int  deviceId,
uint8_t  target 
)

Activates target bootloader.

Parameters
deviceId- device ID target - target bootloader
Returns
FxInvalidDevice if deviceId is invalid FxSuccess otherwise

◆ fxClose()

FxError fxClose ( unsigned int  deviceId)

Disconnect from a FlexSEA device with the given device ID.

Parameters
deviceIdis the ID of the device to close
Returns
Error codes defined at top of the header

◆ fxFindPoles()

FxError fxFindPoles ( unsigned int  deviceId)

Find the motor poles.

DO NOT USE THIS FUNCTION UNLESS YOU KNOW WHAT YOU ARE DOING

Parameters
deviceIdis the device ID
Returns
FxInvalidDevice if deviceId is invalid FxSuccess otherwise
Note
DO NOT USE THIS FUNCTION UNLESS YOU KNOW WHAT YOU ARE DOING

◆ fxGetAppType()

FxAppType fxGetAppType ( unsigned int  deviceId)

Get the device application type.

Parameters
deviceIdis the device ID
Returns
FxAppType defined at the top of the header

◆ fxGetDeviceIds()

int fxGetDeviceIds ( int *  idArray,
unsigned int  size 
)

Get the device ID of all connected FlexSEA devices. The device ID is used by the functions in this API to specify which FlexSEA device to communicate with.

Parameters
idArrayis an array to hold the returned device IDs. The return value of this function is the number of connected FlexSEA devices (numDevices). On return each element of the array up till numDevices will contain a valid device ID.
sizeis the size of the idarray. Should be large enough to contain device IDs for all devices you plan to use at once, or FX_MAX_DEVICES.
Returns
number of connected FlexSEA devices
Note
idArray should have at least as many elements as FlexSEA devices used.

◆ fxGetLastReceivedAnkleTorquePoints()

int16_t* fxGetLastReceivedAnkleTorquePoints ( unsigned int  deviceId)

Returns the last points read by the stack.

Parameters
deviceIdis the device ID
Returns
pointer to array

◆ fxGetLastReceivedCurrentOffset()

int fxGetLastReceivedCurrentOffset ( unsigned int  deviceId)

Check the last current offset which was received from the device. This current offset is updated asyncronously by making calls to fxRequestCurrentOffset.

Parameters
deviceIdis the device ID
Returns
The current offset last received from the device. -1 if invalid device but proper usage can also return -1.
Note
Please try to ensure you have a valid device before making a call to this function.

◆ fxGetLastReceivedI2T()

i2tVals fxGetLastReceivedI2T ( unsigned int  deviceId)

Check the last i2t values which were received from the device. These i2t values are updated asyncronously by making calls to fxRequestI2T.

Parameters
deviceIdis the device ID
Returns
The i2t values last received from the device. Will return a default initialized i2tVals struct if deviceId is invalid.

◆ fxGetLastReceivedUVLO()

int fxGetLastReceivedUVLO ( unsigned int  deviceId)

Check the last UVLO value which was received from the device. This UVLO value is updated asyncronously by making calls to fxRequestUVLO.

Parameters
deviceIdis the device ID
Returns
The last received UVLO in mV. -1 if invalid device.

◆ fxGetReadDataQueueSize()

int fxGetReadDataQueueSize ( unsigned int  deviceId)

Get the maximum read data queue size of a device.

Parameters
deviceIdis the device ID of the device to get the read data queue size from.
Returns
size of the read data queue, or -1 if invalid device.

◆ fxGetTimingGain()

double fxGetTimingGain ( unsigned int  deviceId,
bool *  isValid,
double *  highestTimingGain 
)
Parameters
deviceIdThe ID of the device
isValidWill be true if the gain is valid
highestTimingGainthe highest gain received since power on of device
Returns

◆ fxGetValidStreamingFrequencies()

int fxGetValidStreamingFrequencies ( unsigned int  deviceId,
int  validFrequencies[NUM_TIMER_FREQS] 
)

Get the valid frequencies for a device.

Parameters
deviceIdThe device ID
validFrequencieswill be place in this array
Returns
total frequencies available for streaming

◆ fxIsActiveDevice()

bool fxIsActiveDevice ( unsigned int  deviceId)

Check if Device connection is still active and running.

Parameters
deviceIdis the ID of the device to check
Returns
False if this is not and active device

◆ fxIsBootloaderActivated()

FxError fxIsBootloaderActivated ( unsigned int  deviceId)

Returns target bootloader status.

Parameters
deviceId- device ID
Returns
true if activated, false if not.

◆ fxIsOpen()

bool fxIsOpen ( unsigned int  deviceId)

Check if the device with the given device ID is open.

Parameters
deviceIdis the ID of the device to check the open status of.
Returns
true if open, false if not.

◆ fxIsStreaming()

bool fxIsStreaming ( unsigned int  deviceId)

check if streaming data from a FlexSEA device.

Parameters
deviceIdis the device ID
Returns
true if streaming. false if not streaming

◆ fxOpen()

int fxOpen ( const char *  portName,
unsigned int  baudRate,
unsigned int  logLevel 
)

Establish a connection with a FlexSEA device.

Device ID is a 16-bit integer used to refer to a specific FlexSEA device

Device ID is returned by fxOpen upon establishing a connection with a FlexSEA device, and is used by most of the functions in this library to specify which device to run that function on.

Parameters
portNameis the name of the serial port to open (e.g. "COM3")
baudRateis the baud rate used i.e. 115200, 230400, etc.
frequencyis the frequency of communication with the FlexSEA device. This applies for streaming device data as well as sending commands to the device.
logLevelis the logging level for this device. 0 is most verbose and 6 is the least verbose. Values greater than 6 are floored to 6.
Returns
device ID (-1 if invalid/failed to open).
Note
Device ID is used by the functions in this API to specify which FlexSEA device to communicate with.

◆ fxReadAnkleTorquePoints()

FxError fxReadAnkleTorquePoints ( unsigned int  deviceId,
uint8_t  points 
)

Reads new Ankle Torque points to device (pure read)

Parameters
deviceIdis the device ID
Returns
FxInvalidDevice if deviceId is invalid FxSuccess otherwise

◆ fxReadBattCyclerDevice()

FxError fxReadBattCyclerDevice ( unsigned int  deviceId,
BattCyclerState *  readData 
)

Read the most recent data from a streaming FlexSEA BattCycler device. Must call fxStartStreaming before calling this.

Parameters
deviceIdis the device ID of the device to read from.
readDatacontains the most recent data from the device
Returns
FxNotStreaming if device is not streaming when this is called. FxInvalidDevice if deviceId is invalid or is not a BattCycler device.

◆ fxReadBattCyclerDeviceAll()

int fxReadBattCyclerDeviceAll ( unsigned int  deviceId,
BattCyclerState *  readData,
unsigned int  n 
)

Read all data from a streaming FlexSEA BattCycler device. Must call fxStartStreaming before calling this.

Parameters
deviceIdis the device ID of the device to read from.
readDatais an array of size n which contains read results
nis the size of the readData y
Returns
The actual number of entries read. You will probably need to use this number.
Note
Will only fill readData array up to read data queue size.

◆ fxReadBMSDevice()

FxError fxReadBMSDevice ( unsigned int  deviceId,
BMSState *  readData 
)

Read the most recent data from a streaming FlexSEA BMS device. Must call fxStartStreaming before calling this.

Parameters
deviceIdis the device ID of the device to read from.
readDatacontains the most recent data from the device
Returns
FxNotStreaming if device is not streaming when this is called. FxInvalidDevice if deviceId is invalid or is not a BMS device.

◆ fxReadBMSDeviceAll()

int fxReadBMSDeviceAll ( unsigned int  deviceId,
BMSState *  readData,
unsigned int  n 
)

Read all exo data from a streaming FlexSEA BMS device. Must call fxStartStreaming before calling this.

Parameters
deviceIdis the device ID of the device to read from.
readDatais an array of size n which contains read results
nis the size of the readData y
Returns
The actual number of entries read. You will probably need to use this number.
Note
Will only fill readData array up to read data queue size.

◆ fxReadCellScreenerDevice()

FxError fxReadCellScreenerDevice ( unsigned int  deviceId,
CellScreenerState *  readData 
)

Read the most recent data from a streaming FlexSEA CellScreener device. Must call fxStartStreaming before calling this.

Parameters
deviceIdis the device ID of the device to read from.
readDatacontains the most recent data from the device
Returns
FxNotStreaming if device is not streaming when this is called. FxInvalidDevice if deviceId is invalid or is not a CellScreener device.

◆ fxReadCellScreenerDeviceAll()

int fxReadCellScreenerDeviceAll ( unsigned int  deviceId,
CellScreenerState *  readData,
unsigned int  n 
)

Read all data from a streaming FlexSEA CellScreener device. Must call fxStartStreaming before calling this.

Parameters
deviceIdis the device ID of the device to read from.
readDatais an array of size n which contains read results
nis the size of the readData y
Returns
The actual number of entries read. You will probably need to use this number.
Note
Will only fill readData array up to read data queue size.

◆ fxReadDevice()

FxError fxReadDevice ( unsigned int  deviceId,
ActPackState *  readData 
)

Read the most recent data from a streaming FlexSEA device stream. Must call fxStartStreaming before calling this.

Parameters
deviceIdis the device ID of the device to read from.
readDatacontains the most recent data from the device
Returns
FxNotStreaming if device is not streaming when this is called. FxInvalidDevice if deviceId is invalid or is not an ActPack device.

◆ fxReadDeviceAll()

int fxReadDeviceAll ( unsigned int  deviceId,
ActPackState *  readData,
unsigned int  n 
)

Read all data from a streaming FlexSEA device stream. Must call fxStartStreaming before calling this.

Parameters
deviceIdis the device ID of the device to read from.
readDatais an array of size n which contains read results
nis the size of the readData y. Will only fill up to data read queue size.
Returns
The actual number of entries read. You will probably need to use this number.
Note
Will only fill readData array up to read data queue size.

◆ fxReadHabsoluteDevice()

FxError fxReadHabsoluteDevice ( unsigned int  deviceId,
HabsoluteState *  readData 
)

Read the most recent data from a streaming FlexSEA Habsolute device. Must call fxStartStreaming before calling this.

Parameters
deviceIdis the device ID of the device to read from.
readDatacontains the most recent data from the device
Returns
FxNotStreaming if device is not streaming when this is called. FxInvalidDevice if deviceId is invalid or is not a Habsolute device.

◆ fxReadHabsoluteDeviceAll()

int fxReadHabsoluteDeviceAll ( unsigned int  deviceId,
HabsoluteState *  readData,
unsigned int  n 
)

Read all exo data from a streaming FlexSEA Habsolute device. Must call fxStartStreaming before calling this.

Parameters
deviceIdis the device ID of the device to read from.
readDatais an array of size n which contains read results
nis the size of the readData y
Returns
The actual number of entries read. You will probably need to use this number.
Note
Will only fill readData array up to read data queue size.

◆ fxReadNetMasterDevice()

FxError fxReadNetMasterDevice ( unsigned int  deviceId,
NetMasterState *  readData 
)

Read the most recent data from a streaming FlexSEA NetMaster device. Must call fxStartStreaming before calling this.

Parameters
deviceIdis the device ID of the device to read from.
readDatacontains the most recent data from the device
Returns
FxNotStreaming if device is not streaming when this is called. FxInvalidDevice if deviceId is invalid or is not a NetMaster device.

◆ fxReadNetMasterDeviceAll()

int fxReadNetMasterDeviceAll ( unsigned int  deviceId,
NetMasterState *  readData,
unsigned int  n 
)

Read all exo data from a streaming FlexSEA NetMaster device. Must call fxStartStreaming before calling this.

Parameters
deviceIdis the device ID of the device to read from.
readDatais an array of size n which contains read results
nis the size of the readData y
Returns
The actual number of entries read. You will probably need to use this number.
Note
Will only fill readData array up to read data queue size.

◆ fxRequestCurrentOffset()

FxError fxRequestCurrentOffset ( unsigned int  deviceId)

Send a current offset request to the specified device. The value is retrieved asynchronously and must be checked by polling fxGetLastReceivedCurrentOffset.

Parameters
deviceIdis the device ID
Returns
FxInvalidDevice if deviceId does not correspond an exo device. FxSuccess otherwise.
Note
The current offset is retrieved asyncronously and must be checked by polling fxGetLastReceivedCurrentOffset.

◆ fxRequestI2T()

FxError fxRequestI2T ( unsigned int  deviceId)

Send an i2t values request to the specified device. The value is retrieved asyncronously and must be checked by polling fxGetLastReceivedI2T.

Parameters
deviceIdis the device ID
Returns
FxInvalidDevice if deviceId does not correspond an exo device. FxSuccess otherwise.
Note
The i2t values are retrieved asyncronously and must be checked by polling fxGetLastReceivedI2T

◆ fxRequestUVLO()

FxError fxRequestUVLO ( unsigned int  deviceId)

Send a UVLO request to the specified device. The value is retrieved asynchronously and must be checked by polling fxGetLastReceivedUVLO.

Parameters
deviceIdis the device ID
Returns
FxInvalidDevice if deviceId does not correspond an exo device. FxSuccess otherwise.
Note
The UVLO value is retrieved asynchronously and must be checked by polling fxGetLastReceivedUVLO.

◆ fxSendEventFlags()

FxError fxSendEventFlags ( int  flag,
int  time 
)
Parameters
flagis the value of the flag you wish to set
timeis duration of time this flag should be present in millisecond.

◆ fxSendMotorCommand()

FxError fxSendMotorCommand ( unsigned int  deviceId,
FxControlMode  controlMode,
int  value 
)

Send a command to the device.

Parameters
deviceIdis the device ID.
controlModeis the control mode we will use to send this command, defined at the top of the header
valueis the value to use for the controlMode. CmPosition - encoder value/motor angle CmCurrent - current in mA CmVoltage - voltage in mV CmImpedance - encoder value/motor angle
Returns
Error codes defined at top of the header

◆ fxSetAnkleTorquePoints()

FxError fxSetAnkleTorquePoints ( unsigned int  deviceId,
int16_t *  newAnkleTorque,
uint8_t  controller,
uint8_t  points 
)

Sends new Ankle Torque points to device (Read/Write)

Parameters
deviceIdis the device ID
Returns
FxInvalidDevice if deviceId is invalid FxSuccess otherwise

◆ fxSetCurrentOffset()

FxError fxSetCurrentOffset ( unsigned int  deviceId,
int  offset 
)

Set the current offset to the desired value.

Parameters
deviceIdis the device ID
offsetis the current offset. NOT in Amps.
Returns
FxInvalidDevice if deviceId does not correspond an exo device. FxInvalidParam if mV exceeds MIN_CURRENT_OFFSET or MAX_CURRENT_OFFSET. FxSuccess otherwise.

◆ fxSetGains()

FxError fxSetGains ( unsigned int  deviceId,
unsigned int  kp,
unsigned int  ki,
unsigned int  kd,
unsigned int  K,
unsigned int  B,
unsigned int  ff 
)

Sets the gains used by PID controllers on the FlexSEA device.

Parameters
deviceIdis the device ID.
kp: Proportional gain
ki: Integral gain
kd: Differential gain (used in position control only)
K: Stiffness (used in impedance control only)
B: Damping (used in impedance control only)
ff: Feed Forward gain
Returns
Error codes defined at top of the header

◆ fxSetI2T()

FxError fxSetI2T ( unsigned int  deviceId,
i2tVals  i2tValsToWrite 
)

Set the i2t values to the desired values.

Parameters
deviceIdis the device ID
i2tValsToWriteis the i2tVals struct containing the values to write
Returns
FxInvalidDevice if deviceId does not correspond an exo device. FxSuccess otherwise.

◆ fxSetReadDataQueueSize()

FxError fxSetReadDataQueueSize ( unsigned int  deviceId,
unsigned int  size 
)

Set the maximum read data queue size of a device.

Parameters
deviceIdis the device ID of the device to get the read data queue size from.
sizeis the size to set the read data queue size to.
Returns
FxInvalidDevice if invalid device. FxInvalidParam if size is invalid

◆ fxSetUniqueId()

FxError fxSetUniqueId ( unsigned int  deviceId,
unsigned int  uid 
)

Set the Unique ID to the desired value.

Parameters
deviceIdis the device ID
uidis the desired Unique ID (decimal). After a power cycle the current deviceId will be replaced by the new Unique ID
Returns
FxInvalidDevice if deviceId does not correspond an exo device. FxInvalidParam if mV exceeds MIN or MAX values FxSuccess otherwise.

◆ fxSetUVLO()

FxError fxSetUVLO ( unsigned int  deviceId,
unsigned int  mV 
)

Set the UVLO to the desired value.

Parameters
deviceIdis the device ID
mVis the desired UVLO in mV
Returns
FxInvalidDevice if deviceId does not correspond an exo device. FxInvalidParam if mV exceeds MIN_UVLO or MAX_UVLO FxSuccess otherwise.

◆ fxStartStreaming()

FxError fxStartStreaming ( unsigned int  deviceId,
unsigned int  frequency,
bool  shouldLog 
)

Start streaming data from a FlexSEA device and optionally log the streamed data. The data logger can impact performance if you are sending many commands in quick succession.

Parameters
deviceIdis the device ID
shouldLogIf set true, the program logs all received data to a file. Enabling the data logging can impact performance if you are sending many commands in quick succession.

The name of the file is formed as follows:

< FlexSEA model >_id< device ID >_< date and time >.csv

for example:

rigid_id3904_Tue_Nov_13_11_03_50_2018.csv

The file is formatted as a CSV file. The first line of the file will be headers for all columns. Each line after that will contain the data read from the device.

Returns
Error codes defined at top of the header
Note
The data logger can impact performance if you are sending many commands in quick succession.

◆ fxStopStreaming()

FxError fxStopStreaming ( unsigned int  deviceId)

Stop streaming data from a FlexSEA device.

Parameters
deviceIdis the device ID
Returns
Error codes defined at top of the header