![]() |
C++ API
|
Base class for Plux BITalino devices. More...
#include <plux.h>
Classes | |
struct | State |
Current device state returned by BITalinoDev::getState() More... | |
Public Member Functions | |
BITalinoDev (const String &path) | |
Connects to a BITalino device. | |
BITalinoDev (BaseDev &baseDev) | |
Promotes a BaseDev instance to BITalinoDev. | |
void | setDOut (const Bools &output) |
Assigns the digital outputs states. | |
void | setBatThreshold (int threshold) |
Sets the battery voltage threshold for the low-battery LED. | |
void | setPWM (int value) |
Assigns the analog (PWM) output value (BITalino 2 only). | |
State | getState (void) |
Returns current device state (BITalino 2 only). | |
![]() | |
SignalsDev (const String &path) | |
Connects to a PLUX device. | |
SignalsDev (BaseDev &baseDev) | |
Promotes a BaseDev instance to SignalsDev. | |
void | getSensors (Sensors &sensors) |
Returns information about attached sensors and internal sensors. | |
void | start (float freq, int portMask, int nBits) |
Starts a real-time acquisition session. | |
void | start (float freq, const Ints &ports, int nBits) |
Starts a real-time acquisition session. | |
void | start (float baseFreq, const Sources &sources) |
Starts a real-time acquisition session. | |
void | stop (void) |
Stops a real-time acquisition session. | |
int | getNumChannels (void) |
Returns the total number of acquisition channels. | |
void | setDOut (bool state) |
Sets the digital output state. | |
virtual bool | onRawFrame (int nSeq, const int data[]) |
Raw frames callback. | |
![]() | |
virtual void | onFoundDevice (const char *path, const char *description) |
DevInfos | findDevicesWithCallback (void) |
BaseDev (const String &path) | |
Connects to a PLUX device. | |
virtual | ~BaseDev (void) |
Disconnects from the device. | |
Properties | getProperties (void) |
Returns the device properties. | |
void | setParameter (int port, int index, const void *data, int dataLen) |
Sets a system or sensor parameter value. | |
float | getBattery (void) |
Returns the remaining battery charge as a percentage of full capacity. | |
void | setTimeout (int timeout=-1) |
Sets the receiving timeout value for loop(). | |
void | loop (void) |
Runs the device message loop. | |
void | interrupt (void *param=NULL) |
Sends an interrupt signal to loop(). | |
virtual bool | onEvent (const Event &evt) |
Event callback. | |
virtual bool | onTimeout (void) |
Timeout callback. | |
virtual bool | onInterrupt (void *param) |
Interrupt signal callback. | |
Additional Inherited Members | |
![]() | |
enum | ProductId { PID_BioPlux = 0x0101 , PID_BiosignalsPlux = 0x0201 , PID_BiosignalsPluxPRO = 0x0205 , PID_MotionPlux = 0x020A , PID_OpenBan = 0x0214 , PID_OpenBanV2_DDME = 0x0215 , PID_OpenBanV2 = 0x0216 , PID_fNIRS = 0x021E , PID_StimPlux = 0x0301 , PID_MuscleBan = 0x0502 , PID_BITalino = 0x0601 , PID_BITalinoRev = 0x0602 , PID_scoliosis = 0x0701 , PID_MuscleBanWearable = 0x0801 , PID_CardioBanWearable = 0x0802 , PID_RespiBanWearable = 0x0803 } |
Product ID enumeration. More... | |
![]() | |
static DevInfos | findDevices (const String &domain="") |
Finds PLUX devices within the given domain. | |
Base class for Plux BITalino devices.
Plux::BITalinoDev::BITalinoDev | ( | const String & | path | ) |
Connects to a BITalino device.
path | Path to the BITalino device. It has the same meaning as in BaseDev::BaseDev(). |
Plux::BITalinoDev::BITalinoDev | ( | BaseDev & | baseDev | ) |
Promotes a BaseDev instance to BITalinoDev.
baseDev | Instance to be promoted. If promotion is successful, baseDev is no longer valid. |
void Plux::BITalinoDev::setDOut | ( | const Bools & | output | ) |
Assigns the digital outputs states.
[in] | output | Vector of booleans to assign to digital outputs, starting at first output (O1). On each vector element, false sets the output to low level and true sets the output to high level. The vector must contain exactly 4 elements for original BITalino (4 digital outputs) or exactly 2 elements for BITalino 2 (2 digital outputs). |
void Plux::BITalinoDev::setBatThreshold | ( | int | threshold | ) |
Sets the battery voltage threshold for the low-battery LED.
[in] | threshold | Battery voltage threshold.
|
void Plux::BITalinoDev::setPWM | ( | int | value | ) |
Assigns the analog (PWM) output value (BITalino 2 only).
[in] | value | Analog output value to set (0...255). The analog output voltage is given by: V (in Volts) = 3.3 * (value+1)/256 |
State Plux::BITalinoDev::getState | ( | void | ) |
Returns current device state (BITalino 2 only).