User Manual BioDAQ SDK ENG
User Manual BioDAQ SDK ENG
User manual
English
Title: User manual BTS BioDAQ SDK ENG v.x.x.x
Project: BTS BioDAQ SDK Published: 16/06/2014
BTS S.p.A. reserves the right to make changes to this document and the products described in it at any
time and without notice.
This document could contain some errata.
No responsibility is assumed by BTS S.p.A. for any troubles resulting from its use.
Windows®, Windows XP® and Windows 2000® are registered trademarks of Microsoft Corporation®.
All trademarks used are properties of their respective owners.
Glossary
AUX Auxiliary
BM Base Module
EMG Electromyographic
EGN Electrogoniometric
FSW Footswitch
MAC Media Access Control
PAN Personal Area Network
SDK Software Development Kit
1 Introduction
With the IDE Microsoft® Visual Studio® 2010 and/or greater the user can compile and use the samples
provided with the installation package.
The compatibility with IDE Microsoft® Visual Studio® 2008 is ensured with the issue to use Microsoft® .NET
Framework 3.5 support.
The compatibility with IDE Microsoft® Visual Studio® 2005 or smaller is NOT ensured.
The application written by the user must use the Microsoft® .NET Framework 3.5 or greater (TODO: check
this!!).
Refer to the instructions contained in this manual for information on how to install the SDK.
1.3 Installation
TODO....
2 Architecture
The SDK is composed by a collection of libraries developed with “Microsoft .NET” technology and with the
exclusion of the library for saving data in TDF file format, the libraries are written in C# language.
In order to allow the development of applications not only in “managed “ language, but also “unmanaged”
(for example C++) the software modules are implemented using COM type interfaces.
3 SDK description
BASIC CONCEPTS
Control of the system by the application takes place through the “BioDAQ” object using the methods and
properties made available by its “IBioDAQ” interface and which it will be described in this manual.
In general through this interface the system is initialized, it is configured, the resources are enumerated
and the acquisitions are piloted with relative data management.
Before describing in details properties and methods exported by the interface of SDK libraries, some basic
concepts must be described.
SYSTEM RESOURCES
“Resources” mean the following elements:
• Base Module (BM): this is the device that controls the wireless network to which the BTS sensors
are connected and which can be a maximum of 1 in the current version of system.
• Sensors: these are the BTS devices that connect to the BM and which acquire data. Each BM can
manage up to a maximum of 10.
The BTS sensors belong to the following types:
1. EMG sensors: these sensors acquire electromyographic data;
2. AUX sensors: these sensors acquire data from Biometrics twin axis goniometers for the
measurement of angles and data from footswitch contact areas;
3. AUXEGN sensors: these sensors acquire data from Biometrics twin axis goniometers for the
measurement of angles (reserved);
4. AUXFSW sensors: these sensors acquire data from footswitch contact areas (reserved).
Each sensor is identified by 8 byte MAC address serial number. MAC address is strictly related to
the type of sensor. According to the type of sensors, MAC address of sensor has the following
encoding:
1. EMG sensor: MAC address: 02-B7-5E-00-05-XX-XX-XX
2. AUX sensor: MAC address: 02-B7-5E-00-06-XX-XX-XX
3. AUXEGN sensor: MAC address: 02-B7-5E-00-07-XX-XX-XX
4. AUXFSW sensor: MAC address: 02-B7-5E-00-08-XX-XX-XX
The last 3 bytes are the unique identifier for each sensor on the sensor itself (on the metallic clip for
the EMG, on the plastic case for AUX, AUXEGN and AUXFSW).
The sensors are identified by a color and a label (alphanumeric code).
The allowed colors are: Blue, Red, Yellow, Green and Black. The label must respect the following: a
numeric value from “1” to “255” for EMG sensor, a letter from “A” to “Z” for AUX sensor, AUXEGN
sensor and AUXFSW sensor.
• Channels: these are the logical data channels associated with each sensor. The number can vary
depending on the type of sensor ad its configuration, that is:
1. EMG sensor: 1 channel.
2. AUX sensor: 2 channels in EGN mode and 4 channels in FSW mode.
3. AUXEGN sensor: 2 channels (only EGN mode).
4. AUXFSW sensor: 4 channels (only FSW mode).
For each of these types of resources there is a “list” (in the general sense of the term) which can be
accessed within certain limits. These lists are generated at system initialization or in case of reconfiguration
of the same when the profile or the protocol is changed (see definitions of PROFILE and PROTOCOL for
further details).
CONFIGURATION
Each base module has a configuration defined by two parameters:
1. Radio channel code on which the wireless network is activated;
2. Identifier of the wireless network which is activated on the radio channel above (PANId parameter).
PROFILE
The profile is a list of sensors, identified by the MAC addresses and their labels (color‐alphanumeric
character), assigned to the system.
PROTOCOL
The protocol is a list of channels (with their parameters) which are intended to be acquired and which must
be compatible with the profile currently in use.
SINK
The sink represents the destination to which the acquired data by the system is addressed. The SDK is
capable of managing several sinks simultaneously which are collected in a list made available by the
interface.
Three sinks are implemented in the SDK. This group can be extended, obviously implementing an “ISink”
type interface. The currently implemented sinks are:
• Queue sink: stores the data in “Queue” type structure;
• Disk sink: stores the data on a binary file in the disk with a custom format after a selected real‐time
data processing. The data are then available for subsequent conversion in TDF file;
• Math sink: stores the data in “Queue” type structure after the selected real‐time data processing
(see PROCESSOR).
PROCESSOR
It carries out the real‐time data processing and it is used in conjunction with the MathSink and with the
DiskSink (see SINK above).
The SDK implements the following three processor types:
1. Transparent Processor: the data are NOT processed but they are stored and/or they are written in a
file as they are received;
2. RMS Processor: it carries out the calculation of the RMS according to the set configurations before
they are stored and/or they are written in a file;
3. EMA Processor: it applied the EMA (Exponential Moving Average) filter to the data before they are
stored and/or they are written in a file.
STATE MACHINE
In the Figure 1 below the main state machine of BioDAQ interface is described. There are 7 different states:
• Idle;
• Ready;
• Armed;
• Capturing;
• Recording;
• Downloading;
• Error.
The meaning of the states, the state transitions and what operations are possible is described below.
IDLE State
This state is reached by default when the BioDAQ object is created or after a reset operation. In this state
the SDK does not have control of the hardware communication ports.
READY State
This state is reached when the system is initialized or after the end of an acquisition.
In initialization phase the following operations are carried out:
• Instantiation of the drivers and opening of the requested communication ports;
• Initialization of the system and enumeration of all resources available to the system: BM, sensors
and channels.
IDLE ERROR
Init
DOWNLOADING
Download
Reset
DownloadAbort
ApplyConfig
ApplyProfile
ApplyProtocol READY RECORDING
Stop
Trigger
Record
Arm Stop
ArmWithEvents
Start
Reset
ARMED CAPTURING
StartWithMemoryMode
Reset
Reset
In this state, and only in this one, it is possible to modify the configuration of the BM, modify the profile or
the protocol used. It is also possible to add new “sinks” to the existing list of list for data management.
ARMED State
This state is reached when the system is “armed” in order to perform an acquisition. During this operation
all the “time consuming” operations needed for the realization of an acquisition are executed.
In this state only start acquisition and stop acquisition operations are possible, whether they are piloted by
software events or system reset operation.
CAPTURING State
This is the state when an acquisition is in progress: the data are sent to the sinks but not stored, to store
the data it is necessary to get the RECORDING state.
RECORDING State
As in the CAPTURING state an acquisition is in progress but data are also stored. The reference “time = 0”
for the data is the instant in which the recording starts and it is automatically calculated by the BioDAQ.
This is very useful when it is necessary to monitor the data for a long time (acquisition in progress:
CAPTURING state) before the real acquisition (acquisition in progress: RECORDING state).
DOWNLOADING State
This is the state when the acquired and saved data, in the on‐board memory of EMG probes, are
downloaded to a proper data structure. At the end of download process, the READY state is get.
ERROR State
This state can be reached in various cases, for example due to an hardware communications error or an
error in the protocol application. The type of error which occurred is stored by the BioDAQ interface and it
is made available to the software application (see GetLastError property).
In these types of situations it is not always possible to remedy the cause of the error, for example in
presence of hardware errors. In these cases the system must be reset and the software application
restarted.
In the next pages of the manual the interfaces with related methods and properties are enlisted. The
interfaces are exported by the BioDAQ libraries. For each method, the prototype of function is provided
with description of the parameters that composing the function “signature” and description of returned
value. The function prototype is written in C# language (managed) and C++ language (unmanaged).
In C++ language, for a property exists different prototype functions: all functions are allowed to be used.
4 Drivers library
The bts.biodaq.drivers library contains the command execution status codes reserved for BM en the set of
serial communication errors between BM and external world (application).
5 Core library
The bts.biodq.core library contains the following interfaces:
• BioDAQ: main interface to control the system;
• BMView, BMViewList: interfaces to manage the BMs;
• SensorId, SensorIdDictionary, SensorView, SensorViewList, SensorIdDictionaryEnum: interfaces to
handle the sensors;
• Channel, ChannelEMG, ChannelEGN, ChannelFSW, ChannelViewList: interfaces to manage the
channels (EMG, EGN and FSW types) related to the loaded profile;
• CommandBase ?
• DataSink, DataSinkList, DataSinksEnum, DiskSink, MathSink, QueueSink, SinksFactory: interfaces to
manage the “sink” for data acquisition;
• Exporter, TrialReader: interfaces to convert and to save data in a file with custom format (BTS
proprietary format);
• PanConfig, PanConfigList: interfaces to manage the PANs;
• Port, PortCOM, PortList, PortsEnum, PortsManager: interfaces to manage the serial COM ports;
• Processor, RMS Processor, EMA Processor, Transparent: interfaces to configure the processor with
the related “sink”;
• Protocol, ProtocolItem: interfaces to manage the protocol (collection of channels).
connected).
Downloading Data download is in progress.
Error System enters in an irreversible error state. Currently this happens when
there is a failed communication to BM or a wrong protocol is applied to
BioDAQ interface.
5.1.6 ActiveProtocol
Prototype:
Protocol ActiveProtocol() {get;}
Description:
Retrieve the active protocol.
Parameters:
Function return parameter:
Protocol Active protocol
C++ version:
Prototype:
IProtocolPtr ActiveProtocol
IProtocolPtr GetActiveProtocol()
HRESULT get_ActiveProtocol( struct IProtocol * * pVal )
Parameters:
Function return parameter:
Protocol Active protocol (COM interface)
5.1.7 Arm
Prototype:
BioDAQExitStatus Arm()
Description:
Execute the system Arm before carrying out an acquisition. During this operation, all the “time‐consuming”
operations necessary for execution of an acquisition are carries out. After an “Arm” operation, it is not
possible to carry out any type of modification.
Parameters:
Function return parameter:
BioDAQExitStatus.Success Success
BioDAQExitStatus.InvalidOperation Invalid operation
BioDAQExitStatus.InvalidArgument Invalid argument
BioDAQExitStatus.Failure Generic failure
See also:
C++ version:
Prototype:
BioDAQExitStatus Arm()
Parameters:
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_InvalidOperation Invalid operation
BioDAQExitStatus_InvalidArgument Invalid argument
BioDAQExitStatus_Failure Generic failure
5.1.8 ArmWithEvents
Prototype:
Parameters:
StartEventName Automatic reset event for start
StopEventName Automatic reset event for stop
RecordEventName Manual reset event for record
Function return parameter:
BioDAQExitStatus.Success Success
BioDAQExitStatus.InvalidOperation Invalid operation
BioDAQExitStatus.InvalidArgument Invalid argument
BioDAQExitStatus.Failure Generic failure
See also:
C++ version:
Prototype:
BioDAQExitStatus ArmWithEvents(BSTR StartEventName, BSTR StopEventName,
BSTR RecordEventName)
Parameters:
StartEventName Automatic reset event for start
StopEventName Automatic reset event for stop
RecordEventName Manual reset event for record
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_InvalidOperation Invalid operation
BioDAQExitStatus_InvalidArgument Invalid argument
BioDAQExitStatus_Failure Generic failure
5.1.9 ApplyConfig
Prototype:
BioDAQExitStatus ApplyConfig(PanConfigList configList)
Description:
This method modifies the configuration of BM connected to the system acting on the frequency of the
wireless network radio channel and the identifier of the network itself. Modification of the configuration
implies an automatic reset cycle of the BM involved in the modification. The configuration parameters of
the PAN are the following:
• RF channel: a byte value between 11 and 26 which represents the IEEE encoding for the ZigBee
channels;
• PAN identifier: any whole 2 byte value;
• Serial: 6 element byte array.
Parameters:
configList PANs configuration list
Function return parameter:
BioDAQExitStatus.Success Success
BioDAQExitStatus.InvalidOperation Invalid operation
BioDAQExitStatus.InvalidArgument Invalid argument
BioDAQExitStatus.Failure Generic failure
See also:
PanConfigList
C++ version:
Prototype:
ExitStatusCode ApplyConfig(IPanConfigListPtr pConfigList)
Parameters:
pConfigList PANs configuration list
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_InvalidOperation Invalid operation
BioDAQExitStatus_InvalidArgument Invalid argument
BioDAQExitStatus_Failure Generic failure
5.1.10 ApplyProfile
Prototype:
BioDAQExitStatus ApplyProfile(SensorIdDictionary sensorsId)
Description:
The method sets the new list of sensors handled by the system. Each BM can manage a maximum number
of 10 sensors.
Parameters:
sensorsId Sensors collection
Function return parameter:
BioDAQExitStatus.Success Success
BioDAQExitStatus.InvalidOperation Invalid operation
BioDAQExitStatus.InvalidArgument Invalid argument
BioDAQExitStatus.Failure Generic failure
See also:
SensorIdDictionary
C++ version:
Prototype:
ExitStatusCode ApplyProfile(ISensorIdDictionaryPtr pSensorsId)
Parameters:
pSensorsId Sensors collection
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_InvalidOperation Invalid operation
BioDAQExitStatus_InvalidArgument Invalid argument
BioDAQExitStatus_Failure Generic failure
5.1.11 ApplyProtocol
Prototype:
BioDAQExitStatus ApplyProtocol(Protocol protocol)
Description:
This method sets the list of channels to be acquired. The protocol is a subset of channels enabled to acquire
data. The protocol must be compatible with the profile currently in use.
The protocol is not saved in the memory of BM; the protocol is lost when BM is disconnected.
Parameters:
protocol Protocol
Function return parameter:
BioDAQExitStatus.Success Success
BioDAQExitStatus.InvalidOperation Invalid operation
See also:
Protocol
C++ version:
Prototype:
ExitStatusCode ApplyProtocol(IProtocolPtr pProtocol)
Parameters:
pProtocol Protocol
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_InvalidOperation Invalid operation
BioDAQExitStatus_InvalidArgument Invalid argument
BioDAQExitStatus_Failure Generic failure
5.1.12 Attach
Prototype:
BioDAQExitStatus Attach()
Description:
It detects the serial COM port where device is connected and it executes system initialization. It performs
the following operations:
• creation of the drivers related to the selected ports (currently the system can manage only 1 port);
• opening of the port;
• enumeration of the resources present;
• creation of the internal objects.
In the current version only serial port are managed, whether virtual or physical.
Parameters:
Function return parameter:
BioDAQExitStatus.Success Success
BioDAQExitStatus.Failure Generic failure
See also:
Reset
C++ version:
Prototype:
BioDAQExitStatus Attach()
Parameters:
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_Failure Generic failure
5.1.13 BmsView
Prototype:
BMViewList BmsView() {get;}
Description:
It returns a list of objects that represent the BMs. This list cannot be modified. On each element of the list
there is a limited access. Currently, the system handles only one BM.
Parameters:
Function return parameter:
BmsView BMs list
C++ version:
Prototype:
IBMViewListPtr BmsView
IBMViewListPtr GetBmsView()
HRESULT get_BmsView( struct IBMViewList * * pVal )
Parameters:
Function return parameter:
BmsView BMs list (COM interface)
5.1.14 ChannelsView
Prototype:
ChannelsViewList ChannelsView() {get;}
Description:
It returns a list of objects that represent the Channels. This list cannot be modified. On each element of the
list there is a limited access.
Parameters:
C++ version:
Prototype:
IChannelsViewListPtr ChannelsView
IChannelsViewListPtr GetChannelsView()
HRESULT get_ChannelsView( struct IChannelViewList * * pVal )
Parameters:
Function return parameter:
ChannelsView Channels list (COM interface)
5.1.15 Download
Prototype:
BioDAQExitStatus DownLoad()
Description:
Starts download data.
Method reserved for recent hardware version of system (BM and EMG probes).
Parameters:
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_InvalidOperation Invalid operation
BioDAQExitStatus_InvalidArgument Invalid argument
BioDAQExitStatus_Failure Generic failure
See also:
DownLoadAbort
C++ version:
Prototype:
BioDAQExitStatus DownLoad()
Parameters:
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_InvalidOperation Invalid operation
5.1.16 DownloadAbort
Prototype:
BioDAQExitStatus DownLoadAbort()
Description:
Abort the download data.
Method reserved for recent harware version of system (BM and EMG probes).
Parameters:
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_InvalidOperation Invalid operation
BioDAQExitStatus_InvalidArgument Invalid argument
BioDAQExitStatus_Failure Generic failure
See also:
DownLoad
C++ version:
Prototype:
BioDAQExitStatus DownLoadAbort()
Parameters:
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_InvalidOperation Invalid operation
BioDAQExitStatus_InvalidArgument Invalid argument
BioDAQExitStatus_Failure Generic failure
5.1.17 GetLastError
Prototype:
BioDAQErrors GetLastError()
Description:
It returns the last error which occurred in the system.
Parameters:
Function return parameter:
C++ version:
Prototype:
BioDAQErrors GetLastError()
Parameters:
Function return parameter:
BioDAQErrors BioDAQ error code
5.1.18 Init
Prototype:
BioDAQExitStatus Init(PortList Ports)
Description:
It executes system initialization. It performs the following operations:
• creation of the drivers related to the selected ports (currently the system can manage only 1 port);
• opening of the port;
• enumeration of the resources present;
• creation of the internal objects.
In the current version only serial port are managed, whether virtual or physical.
Parameters:
Ports Ports list
Function return parameter:
BioDAQExitStatus.Success Success
BioDAQExitStatus.InvalidOperation Invalid operation
BioDAQExitStatus.InvalidArgument Invalid argument
BioDAQExitStatus.Failure Generic failure
See also:
PortList
Reset
C++ version:
Prototype:
BioDAQExitStatus Init(IPortsListPtr pPorts)
Parameters:
pPorts Port lists
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_InvalidOperation Invalid operation
BioDAQExitStatus_InvalidArgument Invalid argument
BioDAQExitStatus_Failure Generic failure
5.1.19 Ports
Prototype:
PortList Ports()
Description:
It returns a list of ports managed by the system. In the current version the list contains only one serial port.
Parameters:
Function return parameter:
Ports List of ports
C++ version:
Prototype:
PortList Ports()
Parameters:
Function return parameter:
Ports List of ports
5.1.20 Record
Prototype:
BioDAQExitStatus Record()
Description:
Starts the data recording.
Parameters:
Function return parameter:
BioDAQExitStatus.Success Success
BioDAQExitStatus.InvalidOperation Invalid operation
See also:
Start
Stop
C++ version:
Prototype:
BioDAQExitStatus Record ()
Parameters:
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_InvalidOperation Invalid operation
BioDAQExitStatus_InvalidArgument Invalid argument
BioDAQExitStatus_Failure Generic failure
5.1.21 Reset
Prototype:
BioDAQExitStatus Reset()
Description:
It executes a reset of system, closing any open ports and freeing up all the occupied resources.
Parameters:
Function return parameter:
BioDAQExitStatus.Success Success
BioDAQExitStatus.InvalidOperation Invalid operation
BioDAQExitStatus.InvalidArgument Invalid argument
BioDAQExitStatus.Failure Generic failure
See also:
Init
C++ version:
Prototype:
BioDAQExitStatus Reset ()
Parameters:
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_InvalidOperation Invalid operation
BioDAQExitStatus_InvalidArgument Invalid argument
BioDAQExitStatus_Failure Generic failure
5.1.22 SensorsView
Prototype:
SensorsViewDictionary SensorsView() {get;}
Description:
It returns a list of objects that represent the sensors. The list cannot be modified. On each element of the
list there is a limited access.
Parameters:
Function return parameter:
SensorsView Sensors list
C++ version:
Prototype:
ISensorViewDictionaryPtr SensorsView
ISensorViewDictionaryPtr GetSensorsView()
HRESULT get_SensorsView( struct ISensorViewDictionary * * pVal )
Parameters:
Function return parameter:
SensorsView Sensors list (COM interface)
5.1.23 Sinks
Prototype:
DataSinkList Sinks() {get;}
Description:
It returns a list of objects that represent the sinks. This list can be modified adding or removing elements.
Parameters:
Function return parameter:
Sinks Sinks list
C++ version:
Prototype:
IDataSinkListPtr Sinks
IDataSinkListPtr GetSinks()
HRESULT get_Sinks( struct IDataSinkList * * pVal )
Parameters:
Function return parameter:
Sinks Sinks list (COM interface)
5.1.24 SinksFactory
TODO
5.1.25 Start
Prototype:
BioDAQExitStatus Start()
Description:
Start an acquisition.
Parameters:
Function return parameter:
BioDAQExitStatus.Success Success
BioDAQExitStatus.InvalidOperation Invalid operation
BioDAQExitStatus.InvalidArgument Invalid argument
BioDAQExitStatus.Failure Generic failure
See also:
Stop
C++ version:
Prototype:
BioDAQExitStatus Start ()
Parameters:
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_InvalidOperation Invalid operation
5.1.26 StartInMemoryMode
Prototype:
BioDAQExitStatus StartInMemoryMode()
Description:
Start an acquisition. The data are also stored in the memory of EMG probes, if necessary; the stored data
are available for the download operation.
Method reserved for recent hardware version (firmware version of EMG probes with build number >31).
Parameters:
Function return paramater:
BioDAQExitStatus.Success Success
BioDAQExitStatus.InvalidOperation Invalid operation
BioDAQExitStatus.InvalidArgument Invalid argument
BioDAQExitStatus.Failure Generic failure
See also:
Stop
C++ version:
Prototype:
BioDAQExitStatus StartinMemoryMode ()
Parameters:
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_InvalidOperation Invalid operation
BioDAQExitStatus_InvalidArgument Invalid argument
BioDAQExitStatus_Failure Generic failure
5.1.27 Stop
Prototype:
BioDAQExitStatus Stop()
Description:
Stop the acquisition.
Parameters:
See also:
Start
C++ version:
Prototype:
BioDAQExitStatus Stop ()
Parameters:
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_InvalidOperation Invalid operation
BioDAQExitStatus_InvalidArgument Invalid argument
BioDAQExitStatus_Failure Generic failure
5.1.28 Trigger
Prototype:
BioDAQExitStatus Trigger( TriggerSource triggerSource )
Description:
Method currently not implemented. Only the Software type TriggerSource is settable (default trigger type).
Parameters:
triggerSource TODO
Function return parameter:
BioDAQExitStatus.Success Success
BioDAQExitStatus.InvalidOperation Invalid operation
BioDAQExitStatus.InvalidArgument Invalid argument
BioDAQExitStatus.Failure Generic failure
See also:
C++ version:
Prototype:
BioDAQExitStatus Trigger( TriggerSource triggerSource )
Parameters:
triggerSource TODO
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_InvalidOperation Invalid operation
BioDAQExitStatus_InvalidArgument Invalid argument
BioDAQExitStatus_Failure Generic failure
5.1.29 UpdateStatusInfo
Prototype:
BioDAQExitStatus UpdateStatusInfo()
Description:
It executes the state information update relative to the BM and the sensors forcing a hardware reading
from each BM. This information can be consulted directly from the properties of each BM, sensor or
channel belonging to the BioDAQ lists.
Parameters:
Function return parameter:
BioDAQExitStatus.Success Success
BioDAQExitStatus.InvalidOperation Invalid operation
BioDAQExitStatus.InvalidArgument Invalid argument
BioDAQExitStatus.Failure Generic failure
See also:
C++ version:
Prototype:
BioDAQExitStatus UpdateStatusInfo()
Parameters:
Function return parameter:
BioDAQExitStatus_Success Success
BioDAQExitStatus_InvalidOperation Invalid operation
BioDAQExitStatus_InvalidArgument Invalid argument
5.2.1 OldValue
Prototype:
BioDAQState OldValue() {get;}
Description:
It returns the previous state of the BioDAQ controller.
Parameters:
Function return parameter:
OldValue Previous state of controller
C++ version:
Prototype:
BioDAQState OldValue
BioDAQState OldValue()
Parameters:
Function return parameter:
OldValue Previous state of controller
5.2.2 NewValue
Prototype:
BioDAQState NewValue() {get;}
Description:
It returns the actual state of the BioDAQ controller.
Parameters:
Function return parameter:
NewValue State of controller
C++ version:
Prototype:
BioDAQState NewValue
BioDAQState NewValue()
Parameters:
Function return parameter:
NewValue State of controller
5.3.1 BeginDownLoadEventHandler
Call back function to manage the BeginDownLoad event.
Prototype:
delegate void BeginDownLoadEventHandler(object sender,
BeginDownLoadEventArgs eventArgs)
Description:
Delegate for BeginDownLoad event.
Parameters:
sender Source of event
eventArgs Instance containing information about the event
Function return parameter:
See also:
BeginDownLoadEventArgs interface
C++ version:
5.5.1 EndDownLoadEventHandler
Call back function to manage the EndDownLoad event.
Prototype:
delegate void EndDownLoadEventHandler(object sender, EndDownLoadEventArgs
eventArgs)
Description:
Delegate for EndDownLoad event.
Parameters:
sender Source of event
eventArgs Instance containing information about the event
Function return parameter:
See also:
EndDownLoadEventArgs interface
C++ version:
5.6.1 State
Prototype:
BioDAQDownloadStatus State() {get;}
Description:
It returns the download data operation status.
Parameters:
Function return parameter:
State State of download operation
C++ version:
Prototype:
BioDAQDownloadStatus State
BioDAQDownloadStatus State()
Parameters:
5.7.1 ProgressDownLoadEventHandler
Call back function to manage the ProgressDownLoad event.
Prototype:
delegate void ProgressDownLoadEventHandler(object sender,
ProgressDownLoadEventArgs eventArgs)
Description:
Delegate for ProgressDownLoad event.
Parameters:
sender Source of event
eventArgs Instance containing information about the event
Function return parameter:
See also:
ProgressDownLoadEventArgs interface
C++ version:
Prototype:
HRESULT ProgressDownLoad ( const _variant_t & sender, struct
IProgressDownLoadEventArgs * eventArgs )
virtual HRESULT __stdcall raw_ProgressDownLoad(VARIANT sender,
bts_biodaq_core::IProgressDownLoadEventArgs * eventArgs)
Parameters:
sender Oggetto sorgente dell’evento
eventArgs Istanza contenente informazioni sull’evento di download in
progressione
Function return parameter:
5.8.1 ProgressPercentage
Prototype:
Percent ProgressPercentage() {get;}
Description:
It returns the percentage of downloaded data.
Parameters:
Function return parameter:
ProgressPercentage Percentage code
C++ version:
Prototype:
Percent ProgressPercentage
Percent GetProgressPercentage()
HRESULT get_ProgressPercentage(Percent * pVal)
Parameters:
Function return parameter:
pVal Percentage code
5.9.5 DataPacketSize
Prototype:
int DataPacketSize() {get;}
Description:
It returns the data packet size (data + header). Packet size is sent from the sensors and it is handled by the
BM (number of samples).
Parameters:
Function return parameter:
DataPacketSize Data packet size
C++ version:
Prototype:
long DataPacketSize
long GetDataPacketSize()
HRESULT get_DataPacketSize( long * pVal )
Parameters:
Function return parameter:
DataPacketSize Data packet size
5.9.6 Device
Prototype:
BMType Device() {get;}
Description:
TODO.
Parameters:
Function return parameter:
Device TODO
C++ version:
Prototype:
BMType Device
BMType GetDevice()
HRESULT get_Device( BMType * pVal )
Parameters:
Function return parameter:
Device TODO
5.9.7 FWVersion
Prototype:
C++ version:
Prototype:
mscorlib::_VersionPtr FWVersion
mscorlib::_VersionPtr GetFWVersion()
HRESULT get_FWVersion( struct mscorlib::_Version * * pVal )
Parameters:
Function return parameter:
FWVersion TODO
5.9.8 Latency
Prototype:
SignalLatency Latency() {get;}
Description:
Property NOT implemented.
Parameters:
Function return parameter:
Latency TODO
C++ version:
Prototype:
SignalLatency Latency
SignalLatency GetLatency()
HRESULT get_Latency( SignalLatency * pVal )
Parameters:
Function return parameter:
Latency TODO
5.9.9 PANId
Prototype:
C++ version:
Prototype:
unsigned long PANId
unsigned long GetPANId()
HRESULT get_PANId( unsigned long * pVal )
Parameters:
Function return parameter:
PANId PAN Identifier
5.9.10 PacketSamples
Prototype:
int PacketSamples() {get; set;}
Description:
It returns/sets the number of samples per packet.
The number of samples per packet affects the data coding for EMG probes.
Only a range of values are admitted according to the coding type for EMG probes. For ADPCM code type
the value must be satisfied by the following conditions:
• value must be greater than 19 and smaller than 101;
• value must be odd.
For Raw code type the value must be satisfied by the following conditions:
• value must be greater than 10 and smaller than 62;
• value multiplied for (3/2) must be an integer value.
The number of samples per packet does not affect the data coding for AUX probes, AUX_EGN probes and
AUX_FSW probes.
Parameters:
Function return parameter:
PacketSamples Number of samples per packet
C++ version:
Prototype:
long PacketSamples
long GetPacketSamples()
HRESULT get_PacketSamples( long * pVal )
Parameters:
Function return parameter:
PacketSamples Number of samples per packet
Prototype:
long PacketSamples
void PutPacketSamples( long newValue )
HRESULT putref_PacketSamples( long newValue )
Parameters:
newValue Number of samples per packet
Function return parameter:
5.9.11 PlatId
Prototype:
BMPlatform PlatId() {get;}
Description:
Property NOT implemented.
Parameters:
Function return parameter:
PlatId TODO
C++ version:
Prototype:
BMPlatform PlatId
BMPlatform GetPlatId()
HRESULT get_PlatId( BMPlatform * pVal )
Parameters:
Function return parameter:
PlatId TODO
5.9.12 RFCh
Prototype:
byte RFChan() {get;}
Description:
It returns the wireless network radio channel related to the BM.
Parameters:
Function return parameter:
RFChan RF channel
C++ version:
Prototype:
unsigned char RFChan
unsigned char GetRFChan()
HRESULT get_RFChan( unsigned char * pVal )
Parameters:
Function return parameter:
RFChan RF channel
5.9.13 SensorsMask
Prototype:
byte SensorsMask() {get; set;}
Description:
It returns/sets the sensors mask which are connected to the BM and are enabled to acquire data. ‘1’‐bit
value in the mask means i‐th sensor is connected. This property is used only with simulated data mode.
Parameters:
Function return parameter:
SensorsMask Sensors mask for connection status
C++ version:
Prototype:
unsigned char SensorsMask
unsigned char GetSensorsMask()
HRESULT get_SensorsMask( unsigned char * pVal )
Parameters:
Function return parameter:
SensorsMask Sensors mask for connection status
Prototype:
unsigned char SensorsMask
void PutSensorsMask( unsigned char newValue )
HRESULT putref_SensorsMask( unsigned char newValue )
Parameters:
newValue Sensors mask for connection status
Function return parameter:
5.9.14 Serial
Prototype:
Byte[] Serial() {get;}
Description:
It returns the identifier of BM. It is a 6 byte array.
Parameters:
Function return parameter:
Serial BM serial identifier
C++ version:
Prototype:
SAFEARRAY * Serial
SAFEARRAY * GetSerial()
HRESULT get_Serial( SAFEARRAY * * pVal )
Parameters:
Function return parameter:
GetSerial BM serial identifier
5.9.15 SerialHex
Prototype:
string SerialHex() {get;}
Description:
It returns the identifier of BM. It is a hexadecimal string.
Parameters:
Function return parameter:
Serial BM serial identifier (hexadecimal string)
C++ version:
Prototype:
_bstr_t Serial
_bstr_t GetSerial()
HRESULT get_Serial( BSTR * pVal )
Parameters:
Function return parameter:
GetSerial BM serial identifier (hexadecimal string)
5.9.16 Sim
Prototype:
bool Sim() {get; set;}
Description:
It returns/sets a value indicating if acquired data are simulated.
Parameters:
Function return parameter:
True Data are simulated
False Data are not simulated
C++ version:
Prototype:
VARIANT_BOOL Sim
VARIANT_BOOL GetSim()
HRESULT get_Sim( VARIANT_BOOL * pVal )
Parameters:
Function return parameter:
VARIANT_TRUE Data are simulated
VARIANT_FALSE Data are not simulated
Prototype:
VARIANT_BOOL Sim
void PutSim( VARIANT_BOOL newValue )
HRESULT putref_Sim( VARIANT_BOOL newValue )
Parameters:
newValue VARIANT_TRUE if data are simulated
Function return parameter:
5.9.17 SimPacketSamples
Prototype:
int SimPacketSamples() {get; set;}
Description:
It returns/sets the number of samples per packet for simulated data.
Parameters:
Function return parameter:
SimPacketSamples Number of samples per packet
C++ version:
Prototype:
long SimPacketSamples
long GetSimPacketSamples()
HRESULT get_SimPacketSamples( long * pVal )
Parameters:
Function return parameter:
SimPacketSamples Number of samples per packet
Prototype:
long SimPacketSamples
void PutSimPacketSamples( long newValue )
HRESULT putref_SimPacketSamples( long newValue )
Parameters:
newValue Number of samples per packet
Function return parameter:
5.9.18 State
Prototype:
BMState State() {get;}
Description:
It returns the state of BM.
Parameters:
Function return parameter:
State BM state
C++ version:
Prototype:
BMState State
BMState GetState()
HRESULT get_State( BMState * pVal )
Parameters:
Function return parameter:
State BM state
5.10.1 Contains
Prototype:
bool Contains(BMView bm)
Description:
True if list contains the given BM.
Parameters:
bm BM
Function return parameter:
True BM belongs to the list
False BM does not belong to the list
C++ version:
Prototype:
VARIANT_BOOL Contains( struct IBMView * bm )
Parameters:
bm BM
5.10.2 Count
Prototype:
int Count() {get;}
Description:
It returns the number of BMs in the list.
Parameters:
Function return parameter:
Count Number of elements
C++ version:
Prototype:
long Count
long GetCount()
HRESULT get_Count( long * pVal )
Parameters:
Function return parameter:
Count Number of elements
5.10.3 IndexOf
Prototype:
int IndexOf(BMView bm)
Description:
It returns the index where the given BM is stored in the list.
Parameters:
bm BM
C++ version:
Prototype:
long IndexOf( struct IBMView * bm )
Parameters:
bm BM
Function return parameter:
IndexOf Index in the list
5.10.4 This[index]
Prototype:
BMView This[int index] {get;}
Description:
It returns the BM specified by the given index.
Parameters:
index Index in the list
Function return parameter:
BMView BM
C++ version:
Prototype:
IBMViewPtr Item[]
IBMViewPtr GetItem( long index )
HRESULT get_Item( long index, struct IBMView * * pVal )
Parameters:
index Index in the list
pVal BM
Function return parameter:
GetItem BM
5.11.1 Active
Prototype:
bool Active {get;}
Description:
True if channel is active for data acquisition.
Parameters:
Function return parameter:
Active True if channel is active to acquire data
C++ version:
Prototype:
VARIANT_BOOL Active
VARIANT_BOOL GetActive()
HRESULT get_Active( VARIANT_BOOL * pVal )
Parameters:
5.11.2 Coding
Prototype:
CodingType Coding {get;}
Description:
It returns the coding type. See coding types codes in SensorView interface.
Parameters:
Function return parameter:
Coding Coding type
C++ version:
Prototype:
CodingType Coding
CodingType GetCoding()
HRESULT get_CodingType( CodingType * pVal )
Parameters:
Function return parameter:
pVal Coding type
5.11.3 ConversionFactor
Prototype:
float ConversionFactor {get;}
Description:
It returns the conversion factor. This value converts the digital data value in the float value. The conversion
factor is related to the analog‐to‐digital converter. The conversion factor varies according to the channel
type.
Parameters:
Function return parameter:
ConversionFactor Conversion factor
C++ version:
Prototype:
float ConversionFactor
float GetConversionFactor()
HRESULT get_ConversionFactor( float * pVal )
Parameters:
Function return parameter:
pVal Conversion factor
5.11.4 DecimationFactor
Prototype:
int DecimationFactor {get;}
Description:
It returns the decimation factor. TODO
Parameters:
Function return parameter:
DecimationFactor Decimation factor
C++ version:
Prototype:
long DecimationFactor
long GetDecimationFactor()
HRESULT get_DecimationFactor( long * pVal )
Parameters:
Function return parameter:
pVal Decimation factor
5.11.5 LogicZero
Prototype:
int LogicZero {get;}
Description:
It returns the logic offset value related to the analog‐to‐digital converter. This value converts the digital
data value in the float value.
Parameters:
Function return parameter:
LogicZero Zero offset
C++ version:
Prototype:
long LogicZero
long GetLogicZero()
HRESULT get_LogicZero( long * pVal )
Parameters:
Function return parameter:
pVal Zero offset
5.11.6 ProtocolChannelIndex
Prototype:
int ProtocolChannelIndex() {get; set;}
Description:
It returns/sets the index of channel inside the active protocol.
Parameters:
Function return parameter:
ProtocolChannelIndex Index of channel in the protocol
C++ version:
Prototype:
long ProtocolChannelIndex
long GetProtocolChannelIndex()
HRESULT get_ProtocolChannelIndex( long * pVal )
Parameters:
Function return parameter:
pVal Index of channel in the protocol
Prototype:
long ProtocolChannelIndex
void PutProtocolChannelIndex( long newValue )
HRESULT putref_ProtocolChannelIndex( long newVal )
Parameters:
newValue Index of channel in the protocol
Function return parameter:
5.11.7 SamplingRate
Prototype:
SamplingRate SamplingRate {get;}
Description:
It returns the sampling rate code. The sampling frequency is referred to the EMG sensors; AUX sensors,
AUXEGN sensors and AUXFSW sensors works at fixed 100 Hz.
Parameters:
Function return parameter:
SamplingRate Sampling rate code
C++ version:
Prototype:
SamplingRate SamplingRate
SamplingRate GetSamplingRate()
HRESULT get_SamplingRate( SamplingRate * pVal )
Parameters:
Function return parameter:
pVal Sampling rate code
5.11.8 Type
Prototype:
ChannelType Type {get;}
Description:
It returns the channel type.
Parameters:
Function return parameter:
Type Channel type
C++ version:
Prototype:
ChannelType Type
ChannelType GetType()
HRESULT get_Type( ChannelType * pVal )
Parameters:
Function return parameter:
pVal Channel type
5.12.1 ChannelRangeCode
Prototype:
EMGChannelRangeCodes ChannelRangeCode {get;}
Description:
It returns channel range code for EMG channel.
Parameters:
Function return parameter:
ChannelRangeCode Range code
C++ version:
Prototype:
EMGChannelRangeCodes ChannelRangeCode
EMGChannelRangeCodes GetChannelRangeCode()
HRESULT get_ChannelRangeCode ( EMGChannelRangeCodes * pVal )
Parameters:
Function return parameter:
pVal Range code
5.12.2 Compression
Prototype:
bool Compression {get;}
Description:
True if data of EMG sensors are compressed in the transmission. This parameter defines the coding type of
EMG channel.
Parameters:
Function return parameter:
Compression True if compression is enabled
C++ version:
Prototype:
VARIANT_BOOL Compression
VARIANT_BOOL GetCompression()
HRESULT get_Compression ( VARIANT_BOOL * pVal )
Parameters:
Function return parameter:
pVal True if compression is enabled
5.12.3 LowPassCutOff
Prototype:
int LowPassCutOff {get;}
Description:
It returns the cut‐off frequency [Hz] of low pass filter used in the envelope mode.
Parameters:
Function return parameter:
LowPassCutOff Cut‐off frequency [Hz]
C++ version:
Prototype:
long LowPassCutOff
long GetLowPassCutOff()
HRESULT get_LowPassCutOff ( long * pVal )
Parameters:
Function return parameter:
pVal Cut‐off frequency [Hz]
5.12.4 SignalRange
Prototype:
float SignalRange {get;}
Description:
It returns the float value related to the range code of EMG channel.
Parameters:
Function return parameter:
SignalRange Float value represents range code of EMG channel
C++ version:
Prototype:
float SignalRange
float GetSignalRange()
HRESULT get_SignalRange( float * pVal )
Parameters:
Function return parameter:
pVal Float value represents range code of EMG channel
5.12.5 Units
Prototype:
MeasuringUnits Units {get;}
Description:
It returns the measuring unit related to the EMG channel.
Parameters:
Function return parameter:
Units Measuring unit of EMG channel
C++ version:
Prototype:
MeasuringUnits Units
MeasuringUnits GetUnits()
HRESULT get_Units( MeasuringUnits * pVal )
Parameters:
Function return parameter:
pVal Measuring unit of EMG channel
5.13.1 ChannelRangeCode
Prototype:
EGNChannelRangeCodes ChannelRangeCode {get;}
Description:
It returns channel range code for EGN channel.
Parameters:
Function return parameter:
ChannelRangeCode Range code
C++ version:
Prototype:
EGNChannelRangeCodes ChannelRangeCode
EGNChannelRangeCodes GetChannelRangeCode()
HRESULT get_ChannelRangeCode( EGNChannelRangeCodes * pVal )
Parameters:
Function return parameter:
pVal Range code
5.13.2 SignalRange
Prototype:
float SignalRange {get;}
Description:
It returns the float value related to the range code of EGN channel.
Parameters:
Function return parameter:
SignalRange Float value represents range code of EGN channel
C++ version:
Prototype:
float SignalRange
float GetSignalRange()
HRESULT get_SignalRange( float * pVal )
Parameters:
Function return parameter:
5.13.3 Units
Prototype:
MeasuringUnits Units {get;}
Description:
It returns the measuring unit related to the EGN channel.
Parameters:
Function return parameter:
Units Measuring unit of EGN channel
C++ version:
Prototype:
MeasuringUnits Units
MeasuringUnits GetUnits()
HRESULT get_Units ( MeasuringUnits * pVal )
Parameters:
Function return parameter:
pVal Measuring unit of EGN channel
5.14.1 Units
Prototype:
MeasuringUnits Units {get;}
Description:
It returns the measuring unit related to the FSW channel.
Parameters:
Function return parameter:
Units Measuring unit of FSW channel
C++ version:
Prototype:
MeasuringUnits Units
MeasuringUnits GetUnits()
HRESULT get_Units( MeasuringUnits * pVal )
Parameters:
Function return parameter:
pVal Measuring unit of FSW channel
5.15.1 Contains
Prototype:
bool Contains(Channel channel)
Description:
It returns True if given channel belongs to the list.
Parameters:
channel Channel
Function return parameter:
True Channel belongs to the list
False Channel does not belong to the list
C++ version:
Prototype:
VARIANT_BOOL Contains( struct IChannel * channel )
Parameters:
channel Channel
5.15.2 Count
Prototype:
int Count() {get;}
Description:
It returns the number of channels in the list.
Parameters:
Function return parameter:
Count Number of channels
C++ version:
Prototype:
long Count
long GetCount()
HRESULT get_Count( long * pVal )
Parameters:
Function return parameter:
pVal Number of channels
5.15.3 GetEnumerator
Prototype:
IEnumerator GetEnumerator()
Description:
It returns the IEnumerator interface related to the list of channels. The IEnumerator interface permits to
access elements of list. See Microsoft MSDN for a detailed definition on IEnumerator interface.
Parameters:
Function return parameter:
GetEnumerator IEnumerator interface
C++ version:
Prototype:
IEnumVARIANTPtr GetEnumerator()
Parameters:
Function return parameter:
GetEnumerator IEnumerator interface
5.15.4 IndexOf
Prototype:
int IndexOf(Channel channel)
Description:
It returns the index where the given channel is stored in the list.
Parameters:
channel Channel
Function return parameter:
IndexOf Index in the list
C++ version:
Prototype:
long IndexOf( struct IChannel * channel )
Parameters:
channel Channel
Function return parameter:
IndexOf Index in the list
5.15.5 SetEMGChannelsCodingType
Prototype:
bool SetEMGChannelsCodingType( CodingType coding )
Description:
It sets the coding type for EMG channels belonging to the list.
Parameters:
coding Coding type
Function return parameter:
True Success
False Failed
C++ version:
Prototype:
VARIANT_BOOL SetEMGChannelsCodingType( CodingType coding )
Parameters:
coding Coding type
Function return parameter:
VARIANT_TRUE Success
VARIANT_FALSE Failed
5.15.6 SetEMGChannelsCompression
Prototype:
bool SetEMGChannelsCompression( bool compression )
Description:
It sets the compression for data transmission of EMG channels.
Parameters:
compression TRUE if compression is enabled
Function return parameter:
True Success
False Failed
C++ version:
Prototype:
VARIANT_BOOL SetEMGChannelsCompression( VARIANT_BOOL compression )
Parameters:
compression TRUE if compression is enabled
Function return parameter:
VARIANT_TRUE Success
VARIANT_FALSE Failed
5.15.7 SetEMGChannelsHPFilterEnabling
Prototype:
bool SetEMGChannelsHPFilterEnabling( bool bEnabled )
Description:
It enables the HP filter for EMG channels. The implemented filter is a FIR high pass filter (frequency cut‐off
fc = 10 Hz, delay dT = 49 ms with sampling frequency of 1 kHz).
Parameters:
bEnabled True if HP filter is enabled
Function return parameter:
True Success
C++ version:
Prototype:
VARIANT_BOOL SetEMGChannelsHPFilterEnabling (VARIANT_BOOL bEnabled )
Parameters:
bEnabled VARIANT_TRUE if HP filter is enabled
Function return parameter:
VARIANT_TRUE Success
5.15.8 SetEMGChannelsLowPassCutOff
Prototype:
bool SetEMGChannelsLowPassCutOff( int lowpassCutOff )
Description:
It sets the cut‐off frequency for the data acquisition in envelope mode for EMG channels.
Parameters:
lowpassCutOff Cut‐off frequency
Function return parameter:
True Success
False Failed
C++ version:
Prototype:
VARIANT_BOOL SetEMGChannelsLowPassCutOff ( long lowpassCutOff )
Parameters:
5.15.9 SetEMGChannelsRangeCode
Prototype:
bool SetEMGChannelsRangeCode( EMGChannelRangeCodes rangeCode )
Description:
It sets the range code for data acquisition of EMG channels.
Parameters:
rangeCode Range code
Function return parameter:
True Success
False Failed
C++ version:
Prototype:
VARIANT_BOOL SetEMGChannelsRangeCode ( EMGChannelRangeCodes rangeCode )
Parameters:
rangeCode Range code
Function return parameter:
VARIANT_TRUE Success
VARIANT_FALSE Failed
5.15.10 SetEMGChannelsSamplingRate
Prototype:
bool SetEMGChannelsSamplingRate( SamplingRate samplingRate )
Description:
It sets the sampling rate for EMG channels.
Parameters:
samplingRate Sampling rate code
Function return parameter:
True Success
False Failed
C++ version:
Prototype:
VARIANT_BOOL SetEMGChannelsSamplingRate ( SamplingRate samplingRate )
Parameters:
samplingRate Sampling rate code
Function return parameter:
VARIANT_TRUE Success
VARIANT_FALSE Failed
5.15.11 This[index]
Prototype:
IChannel This[int index] {get;}
Description:
It returns the Channel specified by the given index.
Parameters:
index Index in the list
Function return parameter:
IChannel Channel
C++ version:
Prototype:
IChannelPtr Item[]
IChannelPtr GetItem( long index )
HRESULT get_Item ( long index, struct IChannel * * pVal )
Parameters:
index Index in the list
pVal Channel
Function return parameter:
GetItem Channel
5.17.1 Arm
Prototype:
SinkExitStatus Arm(Protocol protocol)
Description:
It executes an “Arm” of the sink before acquire data. The internal resources of the sink are initialized.
You have not to use this method if you add the sink to the list of datasinks of the controller.
Parameters:
protocol Protocol (channels collection) to acquire
Function return parameter:
SinkExitStatus.Success Success
SinkExitStatus.InvalidOperation Invalid operation
SinkExitStatus.InvalidArgument Invalid argument
SinkExitStatus.Error Generic error
See also:
C++ version:
Prototype:
SinkExitStatus Arm( struct IProtocol * protocol )
HRESULT Arm( [in] struct IProtocol * protocol, [out, retval]
SinkExitStatus * pVal )
Parameters:
protocol Protocol (channels collection) to acquire
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
5.17.2 Init
Prototype:
SinkExitStatus Init()
Description:
It initializes the sink.
You have not to use this method if you add the sink to the list of datasinks of the controller.
Parameters:
Function return parameter:
SinkExitStatus.Success Success
SinkExitStatus.InvalidOperation Invalid operation
SinkExitStatus.InvalidArgument Invalid argument
SinkExitStatus.Error Generic error
See also:
C++ version:
Prototype:
SinkExitStatus Init()
HRESULT Init( [out, retval] SinkExitStatus * pVal )
Parameters:
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
5.17.3 Reset
Prototype:
SinkExitStatus Reset()
Description:
It executes a reset of sink.
You have not to use this method if you add the sink to the list of datasinks of the controller.
Parameters:
Function return parameter:
SinkExitStatus.Success Success
SinkExitStatus.InvalidOperation Invalid operation
SinkExitStatus.InvalidArgument Invalid argument
SinkExitStatus.Error Generic error
See also:
C++ version:
Prototype:
SinkExitStatus Reset()
HRESULT Reset( [out, retval] SinkExitStatus * pVal )
Parameters:
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
5.17.4 Start
Prototype:
SinkExitStatus Start()
Description:
It starts the data acquisition/real‐time processing for the sink.
You have not to use this method if you add the sink to the list of datasinks of the controller.
Parameters:
Function return parameter:
SinkExitStatus.Success Success
SinkExitStatus.InvalidOperation Invalid operation
SinkExitStatus.InvalidArgument Invalid argument
SinkExitStatus.Error Generic error
See also:
C++ version:
Prototype:
SinkExitStatus Start()
HRESULT Start( [out, retval] SinkExitStatus * pVal )
Parameters:
Function return parameter:
SinkExitStatus_Success Successo
SinkExitStatus_InvalidOperation Operazione non valida
5.17.5 Stop
Prototype:
SinkExitStatus Stop()
Description:
It stops the data acquisition/real‐time processing for the sink.
You have not to use this method if you add the sink to the list of datasinks of the controller.
Parameters:
Function return parameter:
SinkExitStatus.Success Success
SinkExitStatus.InvalidOperation Invalid operation
SinkExitStatus.InvalidArgument Invalid argument
SinkExitStatus.Error Generic error
See also:
C++ version:
Prototype:
SinkExitStatus Stop()
HRESULT Stop( [out, retval] SinkExitStatus * pVal )
Parameters:
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
5.17.6 Write
Prototype:
SinkExitStatus Write( int chIx, long sampleIx, float value )
Description:
It writes the data value in the sink for the given channel.
You have not to use this method if you add the sink to the list of datasinks of the controller.
Parameters:
chIx Channel index
sampleIx Sample index
value Data value
Function return parameter:
SinkExitStatus.Success Success
SinkExitStatus.InvalidOperation Invalid operation
SinkExitStatus.InvalidArgument Invalid argument
SinkExitStatus.Error Generic error
See also:
C++ version:
Prototype:
SinkExitStatus Write( long chIx, __int64 sampleIx, float value )
HRESULT Write( [in] long chIx, [in] __int64 sampleIx, [in] float value,
[out, retval] SinkExitStatus * pVal )
Parameters:
chIx Channel index
sampleIx Sample index
value Data value
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
5.18.1 Add
Prototype:
void Add(IDataSink datasink)
Description:
It adds a given sink to the list.
Parameters:
datasink Sink
Function return parameter:
See also:
C++ version:
Prototype:
HRESULT Add( struct IDataSink * datasink )
Parameters:
datasink Sink
Function return parameter:
HRESULT COM return code
5.18.2 Clear
Prototype:
void Clear()
Description:
Clean up the list.
Parameters:
Function return parameter:
See also:
C++ version:
Prototype:
HRESULT Clear()
Parameters:
Function return parameter:
5.18.3 CopyTo
Prototype:
void CopyTo(IDataSink[] array, int arrayIndex)
Description:
Copy a given array of sinks, starting a the specified index of the target array
Parameters:
array Sinks array
arrayIndex Starting index
Function return parameter:
See also:
C++ version:
Prototype:
HRESULT CopyTo(SAFEARRAY * array, long arrayIndex)
Parameters:
array Sinks array
arrayIndex Starting index
Function return parameter:
HRESULT COM return code
5.18.4 Contains
Prototype:
bool Contains(IDataSink datasink)
Description:
It returns True if given sink belongs to the list
Parameters:
datasink Sink
Function return parameter:
True Sink belongs to the list
False Sink does not belong to the list
See also:
C++ version:
Prototype:
VARIANT_BOOL Contains( struct IDataSink * datasink )
Parameters:
datasink Sink
Function return parameter:
VARIANT_TRUE Sink belong to the list
VARIANT_FALSE Sink does not belong to the list
5.18.5 Count
Prototype:
int Count() {get;}
Description:
It returns the number of sinks in the list.
Parameters:
Function return parameter:
Count Number of elements
C++ version:
Prototype:
long Count
long GetCount()
HRESULT get_Count( long * pVal )
Parameters:
Function return parameter:
pVal Number of elements
5.18.6 GetEnumerator
Prototype:
IDataSinkEnum GetEnumerator()
Description:
It returns the IDataSinkEnum interface related to the list of sinks. The IDataSinkEnum interface permits to
access elements of list. The IDataSinkEnum interface derives from IEnumerator interface. See Microsoft
MSDN for a detailed definition on IEnumerator interface
Parameters:
Function return parameter:
GetEnumerator IdataSinkEnum interface
C++ version:
Prototype:
IDataSinkEnumPtr GetEnumerator()
Parameters:
Function return parameter:
pVal IdataSinkEnum interface
5.18.7 IndexOf
Prototype:
int IndexOf(IDataSink datasink)
Description:
It returns the index where the given sink is stored in the list.
Parameters:
datasink Sink
Function return parameter:
IndexOf Index in the list
C++ version:
Prototype:
long IndexOf( struct IDataSink * datasink )
Parameters:
datasink Sink
Function return parameter:
IndexOf Index in the list
5.18.8 Insert
Prototype:
void Insert(int index, IDataSink datasink)
Description:
It inserts the sink in the list at given index.
Parameters:
index Index in the list
datasink Sink
Function return parameter:
C++ version:
Prototype:
HRESULT Insert( long index, struct IDataSink * datasink )
Parameters:
index Index in the list
datasink Sink
Function return parameter:
HRESULT COM return code
5.18.9 IsReadOnly
Prototype:
bool IsReadOnly() {get;}
Description:
It returns False. The access to the list is not complete.
Parameters:
Function return parameter:
False The access to the list is limited
C++ version:
Prototype:
VARIANT_BOOL IsReadOnly
VARIANT_BOOL GetIsReadOnly()
HRESULT get_IsReadOnly ( VARIANT_BOOL * pVal )
Parameters:
5.18.10 Remove
Prototype:
bool Remove(IDataSink datasink)
Description:
It removes the sink from the list.
Parameters:
datasink Sink to remove
Function return parameter:
True Successful operation
False Failed operation
See also:
C++ version:
Prototype:
VARIANT_BOOL Remove( struct IDataSink * datasink )
Parameters:
datasink Sink to remove
Function return parameter:
VARIANT_TRUE Successful operation
VARIANT_FALSE Failed operation
5.18.11 RemoveAt
Prototype:
void RemoveAt(int index)
Description:
It removes the sink from the list at given index
Parameters:
index Index of sink to remove
Function return parameter:
See also:
C++ version:
Prototype:
HRESULT RemoveAt( long index )
Parameters:
index Index of sink to remove
Function return parameter:
HRESULT COM return code
5.18.12 This[index]
Prototype:
IDataSink This[int index] {get; set;}
Description:
It returns/sets the Sink specified by the given index.
Parameters:
index Index in the list
Function return parameter:
IDataSink Sink interface
C++ version:
Prototype:
IDataSinkPtr Item[]
IDataSinkPtr GetItem( long index )
HRESULT get_Item( long index, struct IDataSink * * pVal )
Parameters:
index Index in the list
Function return parameter:
pVal Sink interface
Prototype:
IDataSinkPtr Item[]
void PutRefItem( long index, struct IDataSink * newVal )
5.19.1 Current
Prototype:
IDataSink Current() {get;}
Description:
It returns the current element from the list.
Parameters:
Function return parameter:
Current Current sink from list
C++ version:
Prototype:
IDataSinkPtr Current
IDataSinkPtr GetCurrent()
HRESULT get_Current( struct IDataSink * * pVal )
Parameters:
Function return parameter:
pVal Current sink from list
5.19.2 MoveNext
Prototype:
bool MoveNext()
Description:
See also:
C++ version:
Prototype:
VARIANT_BOOL MoveNext()
Parameters:
Function return parameter:
VARIANT_TRUE Successful operation
VARIANT_FALSE Failed operation: current element is the last element
of the list
5.19.3 Reset
Prototype:
void Reset()
Description:
It sets the enumerator pointer to initial position (before the first element of the list).
Parameters:
Function return parameter:
See also:
C++ version:
Prototype:
HRESULT Reset()
Parameters:
Function return parameter:
HRESULT COM return code
5.20.1 DownloadFileName
Prototype:
string DownloadFileName {get; set;}
Description:
It retrieves/sets the full path binary file name where data are saved during the download. The data are
encoding with a custom format.
Parameters:
Function return parameter:
C++ version:
Prototype:
_bstr_t DownloadFileName
_bstr_t GetDownloadFileName()
HRESULT get_DownloadFileName( BSTR * pVal )
Parameters:
pVal Full path file name
Function return parameter:
Prototype:
_bstr_t DownloadFileName
void PutDownloadFileName( _bstr_t newVal )
HRESULT putref_DownloadFileName( BSTR newVal )
Parametri:
newVal Full path file name
Function return parameter:
5.20.2 DownloadStart
Prototype:
SinkExitStatus DownloadStart( Protocol protocol )
Description:
Arm the sink in order to receive data during download.
Parameters:
protocol Protocol (channels collection) to acquire
Function return parameter:
SinkExitStatus.Success Success
SinkExitStatus.InvalidOperation Invalid operation
SinkExitStatus.InvalidArgument Invalid argument
SinkExitStatus.Error Generic error
See also:
DownloadStop
C++ version:
Prototype:
SinkExitStatus DownloadStart( struct IProtocol * protocol )
HRESULT DownloadStart( [in] struct IProtocol * protocol, [out, retval]
SinkExitStatus * pVal )
Parameters:
protocol Protocol (channels collection) to acquire
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
5.20.3 DownloadStop
Prototype:
SinkExitStatus DownloadStop()
Description:
Release the resources used during the download operation.
Parameters:
Function return parameter:
SinkExitStatus.Success Success
See also:
DownloadStart
C++ version:
Prototype:
SinkExitStatus DownloadStop()
HRESULT DownloadStop( [out, retval] SinkExitStatus * pVal )
Parameters:
Function return paramater:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
5.20.4 DownloadWrite
Prototype:
SinkExitStatus DownloadWrite( int chIx, long sampleIx, float value )
Description:
It writes the data value in the sink for the given channel during download operation.
You have not to use this method directly, if you add the sink to the list of datasinks of the controller.
Parameters:
chIx Channel index
sampleIx Sample index
value Sample value
Function return parameter:
SinkExitStatus.Success Success
SinkExitStatus.InvalidOperation Invalid operation
SinkExitStatus.InvalidArgument Invalid argument
SinkExitStatus.Error Generic error
See also:
C++ version:
Prototype:
SinkExitStatus DownloadWrite( long chIx, __int64 sampleIx, float value )
HRESULT DownloadWrite( [in] long chIx, [in] __int64 sampleIx, [in] float
value, [out, retval] SinkExitStatus * pVal )
Parameters:
chIx Channel index
sampleIx Sample index
value Sample value
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
5.20.5 FileName
Prototype:
string FileName {get; set;}
Description:
It retrieves/sets the full path binary file name where data are saved. The data are encoding with a custom
format.
Parameters:
Function return parameter:
C++ version:
Prototype:
_bstr_t FileName
_bstr_t GetFileName()
HRESULT get_FileName( BSTR * pVal )
Parameters:
pVal Full path file name
Function return parameter:
Prototype:
_bstr_t FileName
5.20.6 GetProcessor
Prototype:
IProcessor GetProcessor( int chIx )
Description:
It retrieves the math processor for a given channel index. There are many processors as the number of
channels.
Parameters:
chIx Channel index
Function return parameter:
IProcessor IProcessor interface
See also:
C++ version:
Prototype:
IProcessorPtr GetProcessor( long chIx )
Parameters:
chIx Channel index
Function return parameter:
pVal IProcessor interface
5.20.7 SetProcessor
Prototype:
SinkExitStatus SetProcessor( IProcessor processor, int chIx )
Description:
It sets the math processor for a given channel index. For each channel it is possible to set a processor.
Parameters:
processor Processor
See also:
C++ version:
Prototype:
SinkExitStatus SetProcessor( struct IProcessor * processor, long chIx )
Parameters:
processor Processor
chIx Channel index
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
5.21.1 NTimePeriods
Prototype:
int NTimePeriods {get;}
Description:
It retrieves the number of periods used to create the EMA filter.
Parameters:
Function return parameter:
C++ version:
Prototype:
long NTimePeriods
long GetNTimePeriods()
HRESULT get_NTimePeriods( long * pVal )
Parameters:
pVal Time periods
Function return parameter:
The footswitch data are converted according to a specific rule. In the acquisition protocol with FSW
channels, the contact areas are specified as follows: every single area is identified by a label.
As you can see in the figure below the contact areas are grouped in clearly defined districts.
The following table specifies the values in volts that are associated to the contact area when this is active
(on status):
Etichetta segnali/area contatto Valore
FS1, FS5, IC_Left, IC_Right 0.4 mV
FS2, FS6, EC_Left, EC_Right 0.8 mV
FS3, FS7, HC_Left, HC_Right 1.6 mV
FS4, FS8, TC_Left, TC_Right 3.2 mV
If the contact area is not active (off state) the associated volt value is zero.
The footswitch signals are obtained as a sum of the contact areas belonging to the specific district and have
a clearly defined label, as shown in the following table:
Segnale footswitch/etichetta Aree di contatto
Left FSW Left FSW = EC_Left + IC_Left +
HC_Left + TC_Left
Right FSW Right FSW = EC_Right + IC_Right +
HC_Right + TC_Right
FSW A FSW A = FS1 + FS2 + FS3 + FS4
FSW B FSW B = FS5 + FS6 + FS7 + FS8
The Left FSW and Right FSW signals refer to the footswitch signals obtainable by positioning the sensors in
the sole of the left and right foot, as shown in the figure; while the FSW A and FSW B signals refer to
general signals, obtained as a sum of the contact areas.
5.22.1 ExportData
Prototype:
bool ExportData()
Description:
It converts the acquired data and it saves the data in a file with BTS format (TDF file format). It uses the
ITrialReader interface to retrieve information from binary file related to the Disk sink.
Parameters:
Function return parameter:
True Successful operation
False Failed operation
See also:
C++ version:
Prototype:
VARIANT_BOOL ExportData()
Parameters:
Function return parameter:
VARIANT_TRUE Successful operation
VARIANT_FALSE Failed operation
5.22.2 ExportedFile
Prototype:
string ExportedFile {get; set;}
Description:
It retrieves/sets the TDF full path file name where data are saved. The TDF format is a BTS proprietary
format.
Parameters:
Function return parameter:
C++ version:
Prototype:
_bstr_t ExportedFile
_bstr_t GetExportedFile()
Prototype:
_bstr_t ExportedFile
void PutExportedFile( BSTR newVal )
HRESULT putref_ExportedFile( BSTR newVal )
Parameters:
newVal TDF full path file name
Function return parameter:
5.22.3 TrialReader
Prototype:
ITrialReader TrialReader {get; set;}
Description:
It retrieves/sets the ITrialReader interface. The ITrialReader interface must be specified in order to retrieve
information from binary file.
Parameters:
Function return parameter:
C++ version:
Prototype:
ITrialReaderPtr TrialReader
ITrialReaderPtr GetTrialReader()
HRESULT get_TrialReader( struct ITrialReader * * pVal )
Parameters:
pVal ITrialReader interface
Function return parameter:
Prototype:
ITrialReaderPtr TrialReader
void PutTrialReader( ITrialReaderPtr newVal )
HRESULT putref_TrialReader( struct ITrialReader * newVal )
Parameters:
newVal ITrialReader interface
Function return parameter:
5.23.1 GetProcessor
Prototype:
IProcessor GetProcessor( int chIx )
Description:
It retrieves the math processor for a given channel index. There are many processors as the number of
channels.
Parameters:
chIx Channel index
Function return parameter:
IProcessor IProcessor interface
See also:
C++ version:
Prototype:
IProcessorPtr GetProcessor( long chIx )
Parameters:
chIx Channel index
Function return parameter:
pVal IProcessor interface
5.23.2 SetProcessor
Prototype:
SinkExitStatus SetProcessor( IProcessor processor, int chIx )
Description:
It sets the math processor for a given channel index. For each channel it is possible to set a processor.
Parameters:
processor Processor
chIx Channel index
Function return parameter:
SinkExitStatus.Success Success
SinkExitStatus.InvalidOperation Invalid operation
SinkExitStatus.InvalidArgument Invalid argument
SinkExitStatus.Error Generic error
See also:
C++ version:
Prototype:
SinkExitStatus SetProcessor( struct IProcessor * processor, long chIx )
Parameters:
processor Processor
chIx Channel index
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
5.24.1 PANId
Prototype:
unit PANId {get; set;}
Description:
It retrieves/sets the PAN identifier. For the actual version of system, the PANId has the value 0xA0A0. No
other values are used.
Parameters:
Function return parameter:
C++ version:
Prototype:
unsigned long PANId
unsigned long GetPANId()
HRESULT get_PANId( unsigned long * pVal )
Parameters:
pVal Wireless network identifier
Function return parameter:
Prototype:
unsigned long PANId
void PutPANId( unsigned long newVal )
HRESULT putref_PANId( unsigned long newVal )
Parameters:
newVal Wireless network identifier
Function return parameter:
5.24.2 RFCh
Prototype:
byte RFCh {get; set;}
Description:
It retrieves/sets the RF channel of the wireless network.
Parameters:
Function return parameter:
C++ version:
Prototype:
unsigned char RFCh
unsigned char GetRFCh()
HRESULT get_RFCh( unsigned char * pVal )
Parameters:
pVal RF channel
Function return parameter:
Prototype:
unsigned char RFCh
void PutRFCh( unsigned char newVal )
HRESULT putref_RFCh( unsigned char newVal )
Parameters:
newVal RF channel
Function return parameter:
5.24.3 Serial
Prototype:
Byte[] Serial {get; set;}
Description:
It retrieves/sets the serial identifier of the wireless network related to the BM. The serial is a 6 element
byte array. The serial permits to associate in a unique manner the PanConfig object to the BM.
Parameters:
Function return parameter:
C++ version:
Prototype:
SAFEARRAY * Serial
SAFEARRAY * GetSerial()
HRESULT get_Serial( SAFEARRAY * * pVal )
Parameters:
pVal Serial identifier
Function return parameter:
Prototype:
SAFEARRAY * Serial
void PutSerial(SAFEARRAY * newVal )
HRESULT putref_Serial( SAFEARRAY * newVal )
Parameters:
newVal Serial identifier
Function return parameter:
5.25.1 Add
Prototype:
void Add(PanConfig item)
Description:
It adds a PanConfig object to the list.
Parameters:
item PanConfig object to add
Function return parameter:
See also:
C++ version:
Prototype:
HRESULT Add( struct IPanConfig * item )
Parameters:
item PanConfig object to add
Function return parameter:
HRESULT COM return code
5.25.2 Clear
Prototype:
void Clear()
Description:
It deletes all elements from the list.
Parameters:
Function return parameter:
See also:
C++ version:
Prototype:
HRESULT Clear()
Parameters:
Function return parameter:
HRESULT COM return code
5.25.3 Count
Prototype:
int Count()
Description:
It retrieves the number of elements in the list.
Parameters:
Function return parameter:
Count Number of elements
C++ version:
Prototype:
long Count()
Parameters:
Function return parameter:
Count Number of elements
5.25.4 IndexOf
Prototype:
int IndexOf(PanConfig item)
Description:
It returns the index where the given PanConfig is stored in the list.
Parameters:
item PanConfig
Function return parameter:
IndexOf Index in the list
C++ version:
Prototype:
long IndexOf( struct IPanConfig * item )
Parameters:
item PanConfig
Function return parameter:
IndexOf Index in the list
5.25.5 Insert
Prototype:
void Insert(int index, PanConfig item)
Description:
It inserts the PanConfig object in the list at given index.
Parameters:
index Index in the list
item PanConfig object
Function return parameter:
C++ version:
Prototype:
HRESULT Insert( long index, struct IPanConfig * item )
Parameters:
index Index in the list
item PanConfig object
Function return parameter:
5.25.6 Remove
Prototype:
bool Remove(PanConfig item)
Description:
It removes the PanConfig object from the list.
Parameters:
item PanConfig to remove
Function return parameter:
True Successful operation
False Failed operation
See also:
C++ version:
Prototype:
VARIANT_BOOL Remove( struct IPanConfig * item )
Parameters:
item PanConfig to remove
Function return parameter:
VARIANT_TRUE Successful operation
VARIANT_FALSE Failed operation
5.26.1 Type
Prototype:
Drivers.PortType Type {get;}
Description:
It retrieves the type of port.
Parameters:
Function return parameter:
Type Type of port
C++ version:
Prototype:
bts_biodaq_drivers::PortType Type
bts_biodaq_drivers::PortType GetType()
HRESULT get_Type( bts_biodaq_drivers::PortType * pVal )
Parameters:
Function return parameter:
pVal Type of port
5.27.1 Baudrate
Prototype:
BaudRate BaudRate {get; set;}
Description:
It retrieves/sets the baud rate for the serial COM port. The value must be set to 230400 bits per second.
Parameters:
Function return parameter:
C++ version:
Prototype:
BaudRate BaudRate
BaudRate GetBaudRate ()
HRESULT get_BaudRate( BaudRate * pVal )
Parameters:
pVal Baud rate
Function return parameter:
Prototype:
BaudRate BaudRate
void PutBaudRate( BaudRate newVal )
HRESULT putref_BaudRate( BaudRate newVal )
Parameters:
newVal Baud rate
Function return parameter:
5.27.2 DataBits
Prototype:
int DataBits {get; set;}
Description:
It retrieves/sets the number of bits representing a data value in the data transmission protocol for the
serial COM port. Default value: 8 bits.
Parameters:
Function return parameter:
C++ version:
Prototype:
long DataBits
long GetDataBits ()
HRESULT get_DataBits( long * pVal )
Parameters:
pVal Number of bits
Function return parameter:
Prototype:
long DataBits
void PutDataBits( long newVal )
HRESULT putref_DataBits( long newVal )
Parameters:
newVal Number of bits
Function return parameter:
5.27.3 Description
Prototype:
String Description {get;}
Description:
It retrieves the description (a label value) of the serial COM port.
Parameters:
Function return parameter:
C++ version:
Prototype:
_bstr_t Description
_bstr_t GetDescription ()
HRESULT get_Description( BSTR * pVal )
Parameters:
Function return parameter:
pVal Description
5.27.4 Handshake
Prototype:
int Handshake {get; set;}
Description:
It retrieves/sets the handshake protocol (control transmission protocol) of the serial port COM. Default
value: RTS (Request To Send) handshake protocol. See Microsoft MSDN for a detailed definition of
System.IO.Ports objects.
Parameters:
Function return parameter:
C++ version:
Prototype:
long Handshake
long GetHandshake ()
HRESULT get_Handshake( long * pVal )
Parameters:
pVal Handshake protocol code
Function return parameter:
Prototype:
long Handshake
void PutHandshake( long newVal )
HRESULT putref_Handshake( long newVal )
Parameters:
newVal Handshake protocol code
Function return parameter:
5.27.5 Number
Prototype:
byte Number {get; set;}
Description:
It retrieves/sets the port number as defined by the operative system (OS).
Parameters:
Function return parameter:
C++ version:
Prototype:
unsigned char Number
Prototype:
unsigned char Number
void PutNumber( unsigned char newVal )
HRESULT putref_Number( unsigned char newVal )
Parameters:
newVal Port number
Function return parameter:
5.27.6 ParityBit
Prototype:
int ParityBit {get; set;}
Description:
It retrieves/sets the parity bits check control in the protocol transimission of serial port COM. Default value:
none parity bit check control. See Microsoft MSDN for a detailed definition of System.IO.Ports objects.
Parameters:
Function return parameter:
C++ version:
Prototype:
long ParityBit
long GetParityBit()
HRESULT get_ParityBit( [out, retval] long * pVal )
Parameters:
pVal Parity bits check control code
Function return parameter:
Prototype:
long ParityBit
void PutParityBit( long newVal )
HRESULT putref_ParityBit(long newVal )
Parameters:
newVal Parity bits check control code
Function return parameter:
5.27.7 Portname
Prototype:
String PortName {get;}
Description:
It retrieves the name of the serial port COM as defined by the operative system (OS).
Parameters:
Function return parameter:
C++ version:
Prototype:
_bstr_t PortName
_bstr_t GetPortName()
HRESULT get_PortName( BSTR * pVal )
Parameters:
Function return parameter:
pVal Name of port
5.28.1 Add
Prototype:
void Add(Port port)
Description:
It adds a port to the list.
Parameters:
port Port
Function return parameter:
See also:
C++ version:
Prototype:
HRESULT Add( struct IPort * port )
Parameters:
port Port
Function return parameter:
HRESULT COM return code
5.28.2 Clear
Prototype:
void Clear()
Description:
It deletes the list of ports.
Parameters:
Function return parameter:
See also:
C++ version:
Prototype:
HRESULT Clear()
Parameters:
Function return parameter:
HRESULT COM return code
5.28.3 Contains
Prototype:
bool Contains(Port port)
Description:
It returns True if given port belongs to the list.
Parameters:
port Port
Function return parameter:
True The port belongs to the list
False The port does not belong to the list
See also:
C++ version:
Prototype:
HRESULT Contains(struct IPort * port)
Parameters:
port Port
Function return parameter:
VARIANT_TRUE The port belongs to the list
VARIANT_FALSE The port does not belong to the list
5.28.4 Count
Prototype:
int Count() {get;}
Description:
It retrieves the number of ports in the list.
Parameters:
Function return parameter:
Count Number of elements
C++ version:
Prototype:
long Count
long GetCount()
HRESULT get_Count( long * pVal )
Parameters:
Function return parameter:
pVal Number of elements
5.28.5 CopyTo
Prototype:
void CopyTo(Port[] array, int arrayIndex)
Description:
Copy a given array of ports, starting at the specified index of the target array.
Parameters:
array Ports array
arrayIndex Starting index
Function return parameter:
See also:
C++ version:
Prototype:
HRESULT CopyTo(SAFEARRAY * array, long arrayIndex)
Parameters:
array Ports array
arrayIndex Starting index
Function return parameter:
HRESULT COM return code
5.28.6 GetEnumerator
Prototype:
IPortsEnum GetEnumerator()
Description:
It returns the IPortsEnum interface related to the list of ports. The IPortsEnum interface permits to access
elements of list. The IPortsEnum interface derives from IEnumerator interface. See Microsoft MSDN for a
detailed definition on IEnumerator interface
Parameters:
Function return parameter:
GetEnumerator IPortsEnum interface
C++ version:
Prototype:
IPortsEnumPtr GetEnumerator()
Parameters:
Function return parameter:
pVal IPortsEnum interface
5.28.7 IndexOf
Prototype:
int IndexOf(Port port)
Description:
It returns the index where the given port is stored in the list.
Parameters:
port Port
Function return parameter:
IndexOf Index in the list
C++ version:
Prototype:
long IndexOf( struct IPort * port )
Parameters:
port Port
Function return parameter:
IndexOf Index in the list
5.28.8 Insert
Prototype:
void Insert(int index, Port port)
Description:
It inserts the port in the list at given index.
Parameters:
index Index in the list
port Port
Function return parameter:
C++ version:
Prototype:
HRESULT Insert( long index, struct IPort * port )
Parameters:
index Index in the list
port Port
Function return parameter:
HRESULT COM return code
5.28.9 IsReadOnly
Prototype:
bool IsReadOnly() {get;}
Description:
It returns False. The access to the list is not complete.
Parameters:
Function return parameter:
False The access to the list is limited
C++ version:
Prototype:
VARIANT_BOOL IsReadOnly
VARIANT_BOOL GetIsReadOnly()
HRESULT get_IsReadOnly( VARIANT_BOOL * pVal )
Parameters:
Function return parameter:
VARIANT_FALSE The access to the list is limited
5.28.10 Remove
Prototype:
bool Remove(Port port)
Description:
It removes the port from the list.
Parameters:
port Port to remove
Function return parameter:
True Successful operation
False Failed operation
See also:
C++ version:
Prototype:
VARIANT_BOOL Remove( struct IPort * port )
Parameters:
port Port to remove
Function return parameter:
VARIANT_TRUE Successful operation
VARIANT_FALSE Failed operation
5.28.11 RemoveAt
Prototype:
void RemoveAt(int index)
Description:
It removes theport from the list at given index
Parameters:
index Index of port to remove
Function return parameter:
See also:
C++ version:
Prototype:
HRESULT RemoveAt( long index )
Parameters:
index Index of port to remove
Function return parameter:
HRESULT COM return code
5.28.12 This[index]
Prototype:
Port This[int index] {get; set;}
Description:
It returns/sets the Port specified by the given index.
Parameters:
index Index in the list
Function return parameter:
Port Port
C++ version:
Prototype:
IPortPtr Item[]
IPortPtr GetItem( long index )
HRESULT get_Item( long index, struct IPort * * pVal )
Parameters:
index Index in the list
pVal Port
Function return parameter:
Prototype:
IPortPtr Item[]
void PutItem( long index, struct IPort * newVal )
HRESULT putref_Item( long index, struct IPort * newVal )
Parameters:
index Index in the list
newVal Port
Function return parameter:
5.29.1 Current
Prototype:
Port Current() {get;}
Description:
It returns the current element from the list.
Parameters:
Function return parameter:
Current Current port from list
C++ version:
Prototype:
IPortPtr Current
IPortPtr GetCurrent()
HRESULT get_Count(struct IPort * * pVal )
Parameters:
Function return parameter:
pVal Current port from list
5.29.2 MoveNext
Prototype:
bool MoveNext()
Description:
It moves to the next port in the list.
Parameters:
Function return parameter:
True Successful operation
See also:
C++ version:
Prototype:
VARIANT_BOOL MoveNext()
Parameters:
Function return parameter:
VARIANT_TRUE Successful operation
VARIANT_FALSE Failed operation: current element is the last element
of the list
5.29.3 Reset
Prototype:
void Reset()
Description:
It sets the enumerator pointer to initial position (before the first element of the list).
Parameters:
Function return parameter:
See also:
C++ version:
Prototype:
HRESULT Reset()
Parameters:
Function return parameter:
HRESULT COM return code
5.30.1 GetAvailableSerialPorts
Prototype:
PortList GetAvailableSerialPorts()
Description:
It retrieves the list of serial COM ports available in the system.
Parameters:
Function return parameter:
GetAvailableSerialPorts Serial COM port list
See also:
C++ version:
Prototype:
IPortListPtr GetAvailableSerialPorts()
Parameters:
Function return parameter:
pVal Serial COM ports
5.31.2 CalculateValue
Prototype:
float CalculateValue( long sampleIx, float value )
Description:
It applied the processing to the sample value for the given index.
Parameters:
sampleIx Sample index
value Sample value
Function return parameter:
pVal Processed sample value.
See also:
C++ version:
Prototype:
float CalculateValue( __int64 sampleIx, float value )
Parameters:
sampleIx Sample index
value Sample value
Function return parameter:
pVal Processed sample value.
5.31.1 Type
Prototype:
ProcessorType Type {get;}
Description:
It retrieves the type of processor.
Parameters:
Function return parameter:
C++ version:
Prototype:
ProcessorType Type
ProcessorType GetType()
HRESULT get_Type( ProcessorType * pVal )
Parameters:
Function return parameter:
pVal Type of processor
5.31.2 Write
Prototype:
bool Write( long sampleIx, float value, Queue<DataSample> queue )
Description:
It writes the sample value for the given index in the “queue” object after real‐time processing provided by
the processor.
Parameters:
sampleIx Sample index
value Sample value
queue Queue object where data is saved
Function return parameter:
True Successful operation
False Failed operation
See also:
C++ version:
Prototype:
VARIANT_BOOL Write( __int64 sampleIx, float value, ? queue )
Parameters:
sampleIx Sample index
value Sample value
queue Queue object where data is saved
NOTE:
In the protocol the EMG channels must be set before the EGN channels and/or FSW channels.
If you use a protocol with FSW channels, it is necessary that channel with SensorChannelIndex = 0 has the
following properties: it is an enabled channel and it belongs to the protocol.
5.32.1 Add
Prototype:
void Add(ProtocolItem protocolItem)
Description:
It adds a new protocol item to the list.
Parameters:
protocolItem Protocol item to add
Function return parameter:
See also:
C++ version:
Prototype:
5.32.2 Count
Prototype:
int Count()
Description:
It retrieves the number of protocol items in the list.
Parameters:
Function return parameter:
Count Number of elements
C++ version:
Prototype:
long Count()
Parameters:
Function return parameter:
pVal Number of elements
5.32.3 Clear
Prototype:
void Clear()
Description:
It deletes all items form the list.
Parameters:
Function return parameter:
See also:
C++ version:
Prototype:
HRESULT Clear()
Parameters:
Function return parameter:
HRESULT COM return code
5.32.4 IndexOf
Prototype:
int IndexOf ( ProtocolItem protocolItem )
Description:
It returns the index where the given protocol item is stored in the list.
Parameters:
protocolItem Protocol item
Function return parameter:
IndexOf Index in the list
C++ version:
Prototype:
long IndexOf( struct IProtocolItem * protocolItem )
Parameters:
ProtocolItem Protocol item
Function return parameter:
IndexOf Index in the list
5.32.5 Insert
Prototype:
bool Insert(int index, ProtocolItem protocolItem)
Description:
It inserts the port in the list at given index.
Parameters:
index Index in the list
protocolItem Protocol item
C++ version:
Prototype:
VARIANT_BOOL Insert( long index, struct IProtocolItem * protocolItem )
Parameters:
index Index in the list
protocolItem Protocol item
Function return parameter:
VARIANT_TRUE Successful operation
VARIANT_FALSE Failed operation
5.32.6 Item
Prototype:
ProtocolItem Item ( int index )
Description:
It retrieves the protocol item object for a given index from the list.
Parameters:
index Index in the list
Function return parameter:
Item Protocol item
C++ version:
Prototype:
IProtocolItemPtr Item( long index )
Parameters:
index Index in the list
Function return parameter:
Item Protocol item
5.32.7 Load
Prototype:
bool Load ( String protocolFileName )
Description:
It loads the protocol from the specified file. Method NOT implemented.
Parameters:
protocolFileName Full path file name
Function return parameter:
True Successful operation
False Failed operation
C++ version:
Prototype:
VARIANT_BOOL Load( _bstr_t protocolFileName )
Parameters:
protocolFileName Full path file name
Function return parameter:
VARIANT_TRUE Successful operation
VARIANT_FALSE Failed operation
5.32.8 Remove
Prototype:
bool Remove(ProtocolItem protocolItem)
Description:
It removes the given protocol item from the list.
Parameters:
protocolItem Protocol item to remove
Function return parameter:
True Successful operation
False Failed operation
See also:
C++ version:
Prototype:
VARIANT_BOOL Remove( struct IProtocolItem * protocolItem )
Parameters:
protocolItem Protocol item to remove
Function return parameter:
VARIANT_TRUE Successful operation
VARIANT_FALSE Failed operation
5.32.9 Save
Prototype:
bool Save ( String protocolFileName )
Description:
It saves the protocol in a specified file. Method NOT implemented.
Parameters:
protocolFileName Full path file name
Function return parameter:
True Successful operation
False Failed operation
C++ version:
Prototype:
VARIANT_BOOL Save( _bstr_t protocolFileName )
Parameters:
protocolFileName Full path file name
Function return parameter:
VARIANT_TRUE Successful operation
VARIANT_FALSE Failed operation
5.33.2 Channel
Prototype:
Channel Channel {get;}
Description:
It retrieves the channel related to the protocol item.
Parameters:
Function return parameter:
Channel Channel
C++ version:
Prototype:
IChannelPtr Channel
IChannelPtr GetChannel()
HRESULT get_Channel( struct IChannel * * pVal )
Parameters:
Function return parameter:
pVal Channel
5.33.3 ChannelName
Prototype:
C++ version:
Prototype:
_bstr_t ChannelName
_bstr_t GetChannelName()
HRESULT get_ChannelName( BSTR * pVal )
Parameters:
pVal Name of channel
Function return parameter:
Prototype:
_bstr_t ChannelName
void PutChannelName( _bstr_t newVal )
HRESULT putref_ChannelName( BSTR newVal )
Parameters:
newVal Name of channel
Function return parameter:
5.33.4 ChannelType
Prototype:
ChannelType ChannelType {get; set;}
Description:
It retrieves/sets the channel type (EMG; EGN or FSW).
Parameters:
Function return parameter:
C++ version:
Prototype:
ChannelType ChannelType
ChannelType GetChannelType()
HRESULT get_ChannelType( ChannelType * pVal )
Parameters:
pVal Type of channel
Function return parameter:
Prototype:
ChannelType ChannelType
void PutChannelType( ChannelType newVal )
HRESULT putref_ChannelType( ChannelType newVal )
Parameters:
newVal Type of channel
Function return parameter:
5.33.5 SensorChannelIndex
Prototype:
int SensorChannelIndex {get; set;}
Description:
It retrieves/sets the index of channel inside the related sensor.
Parameters:
Function return parameter:
C++ version:
Prototype:
long SensorChannelIndex
long GetSensorChannelIndex()
HRESULT get_SensorChannelIndex( long * pVal )
Parameters:
pVal Index of channel inside the related sensor
Function return parameter:
Prototype:
long SensorChannelIndex
void PutSensorChannelIndex( long newVal )
HRESULT putref_SensorChannelIndex( long newVal )
Parameters:
newVal Index of channel inside the related sensor
Function return parameter:
5.33.6 SensorColor
Prototype:
System.Drawing.Color SensorColor {get; set;}
Description:
It retrieves/sets the sensor color. The sensor is related to the protocol item.
Parameters:
Function return parameter:
C++ version:
Prototype:
OLE_COLOR SensorColor
OLE_COLOR GetSensorColor()
HRESULT get_SensorColor( OLE_COLOR * pVal )
Parameters:
pVal Sensor color
Function return parameter:
Prototype:
OLE_COLOR SensorColor
void PutSensorColor( OLE_COLOR newVal )
HRESULT putref_SensorColor( OLE_COLOR newVal )
Parameters:
newVal Sensor color
Function return parameter:
5.33.7 SensorLabel
Prototype:
String SensorLabel {get; set;}
Description:
It retrieves/sets the sensor label. The sensor is related to the protocol item.
Parameters:
Function return parameter:
C++ version:
Prototype:
_bstr_t SensorLabel
_bstr_t GetSensorLabel()
HRESULT get_SensorLabel( BSTR * pVal )
Parameters:
pVal Sensor label
Function return parameter:
Prototype:
_bstr_t SensorLabel
void PutSensorLabel( _bstr_t newVal )
HRESULT putref_SensorLabel( BSTR newVal )
Parameters:
newVal Sensor label
Function return parameter:
5.33.8 SensorReference
Prototype:
SensorView SensorReference {get;}
Description:
It retrieves the sensor related to the protocol item.
Parameters:
Function return parameter:
Sensor Sensor
C++ version:
Prototype:
ISensorViewPtr SensorReference
ISensorViewPtr GetSensorReference()
HRESULT get_SensorReference( struct ISensorView * * pVal )
Parameters:
Function return parameter:
pVal Sensor
5.33.9 State
Prototype:
ProtocolItemState State {get;}
Description:
It retrieves the state of protocol item.
Parameters:
Function return parameter:
State State
C++ version:
Prototype:
ProtocolItemState State
ProtocolItemState GetState()
HRESULT get_State( ProtocolItemState * pVal )
Parameters:
Function return parameter:
pVal State
5.34.1 Dequeue
Prototype:
SinkExitStatus Dequeue( int chIx, out long sampleIx, out float value )
Description:
It retrieves the first data sample (value, sample index) available from the “Queue” data structure for the
given channel. The data sample is then removed from the “Queue” data structure.
Parameters:
chIx Channel index
sampleIx Sample index
value Sample value
Function return parameter:
SinkExitStatus.Success Success
SinkExitStatus.InvalidOperation Invalid operation
SinkExitStatus.InvalidArgument invalid argument
SinkExitStatus.Error Generic error
See also:
C++ version:
Prototype:
SinkExitStatus Dequeue( long chIx, __int64 * sampleIx, float * value )
Parameters:
chIx Channel index
sampleIx Sample index
value Sample value
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
5.34.2 QueueSize
Prototype:
int QueueSize ( int chIx )
Description:
It retrieves the size of the “Queue” data structure for the given channel.
Parameters:
chIx Channel index
Function return parameter:
QueueSize Size (number of samples)
C++ version:
Prototype:
long QueueSize( long chIx )
Parameters:
chIx Channel index
Function return parameter:
pVal Size (number of samples)
5.34.3 Read
Prototype:
SinkExitStatus Read( int chIx, long sampleIx, out float value )
Description:
It retrieves the sample value of given sample index for the given channel.
Parameters:
chIx Channel index
sampleIx Sample index
value Sample value
Function return parameter:
SinkExitStatus.Success Success
SinkExitStatus.InvalidOperation Invalid operation
SinkExitStatus.InvalidArgument invalid argument
SinkExitStatus.Error Generic error
See also:
C++ version:
Prototype:
5.35.1 WindowSize
Prototype:
uint WindowSize {get; set;}
Description:
It retrieves/sets the window size (number of samples) used to carry‐out the RMS during real‐time data
processing.
Parameters:
Function return parameter:
C++ version:
Prototype:
unsigned long WindowSize
unsigned long GetWindowSize()
HRESULT get_WindowSize( unsigned long * pVal )
Parameters:
pVal Window size
Function return parameter:
Prototype:
unsigned long WindowSize
5.36.1 Color
Prototype:
System.Drawing.Color Color {get; set;}
Description:
It retrieves/sets the color of the sensor.
Parameters:
Function return parameter:
C++ version:
Prototype:
OLECOLOR Color
OLECOLOR GetColor()
HRESULT get_Color( OLE_COLOR * pVal )
Parameters:
Prototype:
OLECOLOR Color
void PutColor( OLECOLOR newVal )
HRESULT putref_Color( OLE_COLOR newVal )
Parameters:
newVal Sensor color
Function return parameter:
5.36.2 Device
Prototype:
SensorType Device {get; set;}
Description:
It retrieves/sets the type of sensor (EMG, AUX, AUXEGN or AUXFSW).
Parameters:
Function return parameter:
C++ version:
Prototype:
SensorType Device
SensorType GetDevice()
HRESULT get_Device( SensorType * pVal )
Parameters:
pVal Type of sensor
Function return parameter:
Prototype:
SensorType Device
void PutDevice( SensorType newVal )
HRESULT putref_Device( SensorType newVal )
Parameters:
5.36.3 LabelCode
Prototype:
byte LabelCode {get; set;}
Description:
It retrieves/sets the label code for the sensor. The label code is a numeral index (from 1 to 255) for EMG
sensor, the label code is alphanumeric index (character “A” is encoded in label code 1, character “B” is
encoded in label code 2, and so on..) for AUX, AUXEGN and AUXFSW sensors.
Parameters:
Function return parameter:
C++ version:
Prototype:
unsigned char LabelCode
unsigned char GetLabelCode()
HRESULT get_LabelCode( unsigned char * pVal )
Parameters:
pVal Label code
Function return parameter:
Prototype:
unsigned char LabelCode
void PutLabelCode( unsigned char newVal )
HRESULT putref_LabelCode( unsigned char newVal )
Parameters:
newVal Label code
Function return parameter:
5.36.4 MACBytes
Prototype:
Byte[] MACBytes {get; set;}
Description:
It retrieves/sets the MAC bytes sequence representing the MAC address. Support class for this type of data
is 64‐bit MAC address utility (EUI‐64). See Microsoft MSDN documentation for further details.
Parameters:
Function return parameter:
C++ version:
Prototype:
SAFEARRAY * MACBytes
SAFEARRAY * GetMACBytes()
HRESULT get_MACBytes( SAFEARRAY * * pVal )
Parameters:
pVal 8 element byte array representing the MAC address
Function return parameter:
Prototype:
SAFEARRAY * MACBytes
void PutMACBytes( SAFEARRAY * newVal )
HRESULT putref_MACBytes( SAFEARRAY * newVal )
Parameters:
newVal 8 element byte array representing the MAC address
Function return parameter:
5.37.1 Add
Prototype:
void add(byte[] mac, SensorId sensor)
Description:
It adds a new sensor to the list.
Parameters:
mac MAC address of sensor to add
sensor Sensor
Function return parameter:
See also:
C++ version:
Prototype:
HRESULT Add( SAFEARRAY * mac, struct SensorId * sensor )
Parameters:
mac MAC address of sensor to add
sensor Sensor
Function return parameter:
HRESULT COM return code
5.37.2 Clear
Prototype:
void clear()
Description:
It removes all sensors from the list.
Parameters:
Function return parameter:
See also:
C++ version:
Prototype:
HRESULT Clear()
Parameters:
Function return parameter:
HRESULT COM return code
5.37.3 Count
Prototype:
int count() {get;}
Description:
It retrieves the number of elements of the list.
Parameters:
Function return parameter:
count Number of elements
C++ version:
Prototype:
long Count
long GetCount()
HRESULT get_Count( long * pVal )
Parameters:
Function return parameter:
pVal Number of elements
5.37.4 Get
Prototype:
SensorId get( byte[] mac )
Description:
It retrieves the sensor for the given MAC address from the list. The sensors collection is a dictionary
structure with MAC address as key field.
Parameters:
mac MAC address of sensor to retrieve
Function return parameter:
get Sensor
See also:
C++ version:
Prototype:
ISensorIdPtr get( SAFEARRAY * mac )
Parameters:
mac MAC address of sensor to retrieve
pVal Sensor
Function return parameter:
5.37.5 Set
Prototype:
void set( SensorId sensor )
Description:
It sets the given sensor in the list. The sensors collection is a dictionary structure with MAC address as key
field.
Parameters:
sensor Sensor to set
Function return parameter:
See also:
C++ version:
Prototype:
HRESULT set( struct ISensorId * sensor )
Parameters:
sensor Sensor to set
newVal Sensor to set
Function return parameter:
HRESULT COM return code
Raw 0 The coding is raw. The sample is acquired from the DAC and it is
converted in the allowed range values.
Envelope 2 The coding is envelope. The sample is acquired from the DAC and
it is processed to get the envelope of the measurement.
BitField 3 The coding is “bit filed”. The sample is acquired from the DAC
and it is interpreted as “bits mask”. This coding is NOT
supported.
5.38.2 SWReleaseType: codici per il tipo di versione di rilascio del software del sensore
The table contains the software release type code for the sensor:
Coding type Value Description
NDEF 0 Software configuration NOT defined. Default value.
Debug 1 Software configuration: Debug (NOT in use).
Release 2 Software configuration: Release (NOT in use).
5.38.3 Bandwidth
Prototype:
byte Bandwidth {get;}
Description:
TODO.
Parameters:
Function return parameter:
Bandwidth 0
C++ version:
Prototype:
unsigned char Bandwith
unsigned char GetBandwith()
HRESULT get_Bandwith( unsigned char * pVal )
Parameters:
Function return parameter:
pVal 0
5.38.4 BattLevel
Prototype:
C++ version:
Prototype:
BattLevel BattLevel
BattLevel GetBattLevel()
HRESULT get_BattLevel( BattLevel * pVal )
Parameters:
Function return parameter:
pVal Battery level
5.38.5 Color
Prototype:
System.Drawing.Color Color {get;}
Description:
It retrieves the color of sensor (black, red, blue, green or yellow).
Parameters:
Function return parameter:
Color Color
C++ version:
Prototype:
OLE_COLOR Color
OLE_COLOR GetColor()
HRESULT get_Color( OLE_COLOR * pVal )
Parameters:
Function return parameter:
pVal Color
5.38.6 Connected
Prototype:
bool Connected {get;}
Description:
It retrieves True if current sensor is configurated and it is belongs to the list of sensors managed from the
BM. The Connected property is checked when the BM is initialized.
Parameters:
Function return parameter:
True Sensor is configurated and connected to the BM
False Sensor is not configurated and connected to the BM
C++ version:
Prototype:
VARIANT_BOOL Connected
VARIANT_BOOL GetConnected()
HRESULT get_Connected( VARIANT_BOOL * pVal )
Parameters:
Function return parameter:
VARIANT_TRUE Sensor is configurated and connected to the BM
VARIANT_FALSE Sensor is not configurated and connected to the BM
5.38.7 Device
Prototype:
SensorType Device {get;}
Description:
It retrieves the type of sensor.
Parameters:
Function return parameter:
Device Type of sensor
C++ version:
Prototype:
SensorType Device
SensorType GetDevice()
HRESULT get_Device( SensorType * pVal )
Parameters:
Function return parameter:
pVal Type of sensor
5.38.8 FWVersion
Prototype:
Version FWVersion() {get;}
Description:
It retrieves the version of firmware loaded in the sensor.
Parameters:
Function return parameter:
FWVersion Version.
C++ version:
Prototype:
mscorlib::_VersionPtr FWVersion
mscorlib::_VersionPtr GetFWVersion()
HRESULT get_FWVersion( mscorlib::_VersionPtr * * pVal )
Parameters:
Function return parameter:
pVal TODO
5.38.9 LabelCode
Prototype:
byte LabelCode {get;}
Description:
It retrieves/sets the label code for the sensor. The label code is a numeral index (from 1 to 255) for EMG
sensor, the label code is alphanumeric index (character “A” is encoded in label code 1, character “B” is
encoded in label code 2, and so on..) for AUX, AUXEGN and AUXFSW sensors.
Parameters:
Function return parameter:
C++ version:
Prototype:
byte LabelCode
byte GetLabelCode()
HRESULT get_LabelCode( unsigned char * pVal )
Parameters:
Function return parameter:
pVal Label code
5.38.10 MACBytes
Prototype:
byte[] MACBytes {get;}
Description:
It retrieves/sets the MAC bytes sequence representing the MAC address. Support class for this type of data
is 64‐bit MAC address utility (EUI‐64). See Microsoft MSDN documentation for further details.
Parameters:
Function return parameter:
MACBytes 8 element byte array representing the MAC address
C++ version:
Prototype:
SAFEARRAY * MACBytes
SAFEARRAY * GetMACBytes()
HRESULT get_MACBytes( SAFEARRAY * * pVal )
Parameters:
Function return parameter:
pVal 8 element byte array representing the MAC address
5.38.11 PlatId
Prototype:
SensorPlatform PlatId {get;}
Description:
It retrieves the platform ID code for the sensor. This parameter is related to the firmware of the sensor.
Parameters:
Function return parameter:
PlatId Platform ID
C++ version:
Prototype:
SensorPlatform PlatId
SensorPlatform GetPlatId()
HRESULT get_PlatId( SensorPlatform * pVal )
Parameters:
Function return parameter:
pVal Platform ID
5.38.12 SWType
Prototype:
SWReleaseType SWType() {get;}
Description:
It retrieves the release version of firmware of sensor.
Parameters:
Function return parameter:
SWType NDEF.
C++ version:
Prototype:
SWReleaseType SWType
SWReleaseType GetSWType()
HRESULT get_SWType( SWReleaseType * pVal )
Parameters:
Function return parameter:
pVal NDEF.
5.38.13 Temperature
Prototype:
C++ version:
Prototype:
unsigned char Temperature
unsigned char GetTemperature()
HRESULT get_Temperature( unsigned char * * pVal)
Parameters:
Function return parameter:
pVal Temperature (°C)
5.39.1 Get
Prototype:
SensorView get( byte[] mac )
Description:
It retrieves the SensorView object for the given MAC address. The sensors collection is a dictionary
structure with MAC address as key field.
Parameters:
mac MAC address of sensor to retrieve
Function return parameter:
get Sensor (SensorView data structure)
See also:
C++ version:
Prototype:
ISensorViewPtr get( SAFEARRAY * mac )
Parameters:
mac MAC address of sensor to retrieve
pVal Sensor (SensorView data structure)
Function return parameter:
5.39.2 GetEnumerator
Prototype:
ISensorViewDictionaryEnum GetEnumerator()
Description:
It returns the ISensorViewDictionaryEnum interface related to the list of sensors. The
ISensorViewDictionaryEnum interface permits to access elements of SensorViewDictionary list. The
ISensorViewDictionaryEnum interface derives from IEnumerator interface. See Microsoft MSDN for a
detailed definition on IEnumerator interface
Parameters:
Function return parameter:
GetEnumerator ISensorViewDictionaryEnum interface
C++ version:
Prototype:
ISensorViewDictionaryEnumPtr GetEnumerator()
Parameters:
Function return parameter:
pVal ISensorViewDictionaryEnum interface
5.39.3 Contains
Prototype:
bool Contains(SensorView sensor)
Description:
It returns True if given sensor belongs to the list.
Parameters:
sensor Sensor (SensorView data structure)
Function return parameter:
See also:
C++ version:
Prototype:
VARIANT_BOOL Contains( struct ISensorView * sensor )
Parameters:
port Sensor (SensorView data structure)
Function return parameter:
VARIANT_TRUE The sensor belongs to the list
VARIANT_FALSE The sensor does not belong to the list
5.39.4 Count
Prototype:
int count {get;}
Description:
It retrieves the number of sensors in the list.
Parameters:
Function return parameter:
count Number of elements
C++ version:
Prototype:
long Count
long GetCount()
HRESULT get_Count( long * pVal )
Parameters:
Function return parameter:
pVal Number of elements
5.40.1 Current
Prototype:
SensorView Current() {get;}
Description:
It returns the current element from the list.
Parameters:
Function return parameter:
Current Current sensor from list
C++ version:
Prototype:
ISensorViewPtr Current
ISensorViewPtr GetCurrent()
HRESULT get_Current( struct ISensorView * * pVal )
Parameters:
Function return parameter:
pVal Current sensor from list
5.40.2 MoveNext
Prototype:
bool MoveNext()
Description:
It moves to the next sensor in the list.
Parameters:
Function return parameter:
True Successful operation
False Failed operation: current element is the last element
of the list
See also:
C++ version:
Prototype:
VARIANT_BOOL MoveNext()
Parameters:
Function return parameter:
VARIANT_TRUE Successful operation
VARIANT_FALSE Failed operation: current element is the last element
of the list
5.40.3 Reset
Prototype:
void Reset()
Description:
It sets the enumerator pointer to initial position (before the first element of the list).
Parameters:
Function return parameter:
See also:
C++ version:
Prototype:
HRESULT Reset()
Parameters:
Function return parameter:
HRESULT COM return code
5.41.1 CreateSink
Prototype:
See also:
C++ version:
Prototype:
IDataSinkPtr CreateSink ( SinkType sinkType )
Parameters:
sinkType Sink type
Function return parameter:
CreateSink Sink (IDataSink interface)
5.42.1 BioDAQStateChangedEventHandler
Call back function to manage the state change of controller.
5.42.2 StateChanged
Prototype:
delegate void StateChanged( object sender, BioDAQStateChangedEventArgs
eventArgs )
Description:
Delegate of state change event.
Parameters:
sender Source of event.
eventArgs Instance containing information about the event.
Function return parameter:
See also:
BioDAQStateChangedEventArgs interface.
C++ version:
Prototype:
HRESULT StateChanged ( const _variant_t & sender, struct
IBioDAQStateChangedEventArgs * eventArgs )
virtual HRESULT __stdcall raw_StateChanged ( VARIANT sender, struct
IBioDAQStateChangedEventArgs * eventArgs )
Parameters:
sender Source of event.
eventArgs Instance containing information about the event.
Function return parameter:
5.43.1 CloseTrial
Prototype:
SinkExitStatus CloseTrial()
Description:
It releases the internal resources to open and manage the information data structure of binary file. The
binary file contains all the acquired data from the BioDAQ by the Disk sink.
Parameters:
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
See also:
C++ version:
Prototype:
SinkExitStatus CloseTrial()
Parameters:
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument invalid argument
SinkExitStatus_Error Generic error
5.43.2 FileName
Prototype:
string FileName {get; set;}
Description:
It retrieves/sets the full path binary file name where data are stored in the disk. The data are encoded in a
custom format.
Parameters:
Function return parameter:
C++ version:
Prototype:
_bstr_t FileName
_bstr_t GetFileName()
HRESULT get_FileName( [out, retval] BSTR * pVal )
Parameters:
pVal Full path file name
Function return parameter:
Prototype:
_bstr_t FileName
void PutFileName( _bstr_t newVal )
HRESULT putref_FileName( BSTR newVal )
Parameters:
newVal Full path file name
Function return parameter:
5.43.3 GetDataRateForType
Prototype:
SinkExitStatus GetDataRateForType( ChannelType type, out int dataRate )
Description:
It retrieves the sampling frequency for the given channel type.
Parameters:
type Channel type.
dataRate Sampling frequency
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
See also:
C++ version:
Prototype:
SinkExitStatus GetDataRateForType( ChannelType type, long * dataRate )
Parameters:
type Channel type
dataRate Sampling frequency
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
5.43.4 GetItemInfo
Prototype:
SinkExitStatus GetItemInfo( int index, out SamplingRate samplingRate, out
int decFactor, out string name, out ChannelType type, out float
convFactor, out int offset, out int numberOfSamples )
Description:
It retrieves all the parameters saved in the binary file for a given channel. See IChannel interface for further
details.
Parameters:
index Channel index
samplingRate Sampling rate
decFctor Decimation factor
name Channel name
type Channel type
convFactor Conversion factor
offset ZeroLogic offset
numberOfSamples Number of samples acquired
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
See also:
C++ version:
Prototype:
SinkExitStatus GetItemInfo( long index, SamplingRate * samplingRate,
float * decFactor, BSTR * name, ChannelType * type, float * convFactor,
long * offset, long * numberOfSamples )
Parameters:
index Channel index
samplingRate Sampling rate
decFctor Decimation factor
name Channel name
type Channel type
convFactor Conversion factor
offset ZeroLogic offset
numberOfSamples Number of samples acquired
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
5.43.5 GetItemSamples
Prototype:
SinkExitStatus GetItemSamples( int index, int startSampleIndex, int
numberOfSamplesToRead, out int numberOfSamplesRead, out float[] samples )
Description:
It retrieves the array of samples acquired for the given channel. The samples are stored in a increased time
index (the older in the initial position, the newer in the last position).
Parameters:
index Channe lindex
startSampleIndex Start index of samples
numberOfSamplesToRead Number of samples to read
numberOfSamplesRead Number of sample read
samples Array containing the data samples
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
See also:
C++ version:
Prototype:
SinkExitStatus GetItemSamples(long index, long startSampleIndex, long
numberOfSamplesToRead, long * numberOfSamplesRead, SAFEARRAY * * samples)
Parameters:
index Channe lindex
startSampleIndex Start index of samples
numberOfSamplesToRead Number of samples to read
numberOfSamplesRead Number of sample read
samples Array containing the data samples
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
5.43.6 GetNumberOfItemsForType
Prototype:
SinkExitStatus GetNumberOfItemsForType( ChannelType type, out int
numberOfItem )
Description:
It retrieves the number of channels stored in the binary file for the given channel type.
Parameters:
type Channel type
numberOfItem Number of channels
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
See also:
C++ version:
Prototype:
SinkExitStatus GetNumberOfSamplesForType( ChannelType type, long *
numberOfItem )
Parameters:
type Channel type
numberOfItem Number of channels
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
5.43.7 GetNumberOfVectorialSamplesForType
Prototype:
SinkExitStatus GetNumberOfVectorialSamplesForType( ChannelType type, out
long numberOfSamples )
Description:
It retrieves the number of samples stored in the binary file for the given channel type.
Parameters:
type Channel type
numberOfSamples Number of array samples
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
See also:
C++ version:
Prototype:
SinkExitStatus GetNumberOfVectorialSamplesForType ( ChannelType type,
__int64 * numberOfSamples )
Parameters:
type Channel type
numberOfSamples Number of array samples
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
5.43.8 NumberOfItems
Prototype:
int NumberOfItems {get;}
Description:
It retrieves the number of channels stored in the binary file.
Parameters:
Function return parameter:
C++ version:
Prototype:
long NumberOfItems
long GetNumberOfItems()
HRESULT get_NumberOfItems( long * pVal )
Parameters:
Function return parameter:
pVal Number of channels
5.43.9 OpenTrial
Prototype:
SinkExitStatus OpenTrial()
Description:
It initializes the internal resources to open the binary file and to manage the data information structure of
binary file. The binary file contains the data acquired from BioDAQ interface by the Disk sink.
Parameters:
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
See also:
C++ version:
Prototype:
SinkExitStatus OpenTrial()
Parameters:
Function return parameter:
SinkExitStatus_Success Success
SinkExitStatus_InvalidOperation Invalid operation
SinkExitStatus_InvalidArgument Invalid argument
SinkExitStatus_Error Generic error
5.43.10 StartTime
Prototype:
C++ version:
Prototype:
float StartTime
float GetStartTime()
HRESULT get_StartTime( float * pVal )
Parameters:
Function return parameter:
pVal First sample index
6 Sample applications
The samples are provided with the installation package. All the samples are gathered in a solution. The
solution is named Samples and it is developed in Microsoft Visual Studio 2010 environment.
C++ projects and C# projects are included in the solution.
6.1 C# samples
The samples developed in C# language are C# console applications and an application with WinForms
objects. In the code are included many comments to help the user in order to make simple the use of
BioDAQ libraries.
7 Technical support
Technical support is available by contacting the Customer Care Unit of BTS S.p.A sending an email to
[email protected] .
Table of Contents
1 Introduction ....................................................................................................................................... 6
1.1 Purpose of reference manual .......................................................................................... 6
1.2 System requirements.............................................................................................................. 6
1.3 Installation .............................................................................................................................. 6
2 Architecture ....................................................................................................................................... 7
3 SDK description ................................................................................................................................ 7
4 Drivers library .............................................................................................................................. 11
4.1 BM command execution status ........................................................................................ 11
4.2 Serial communication errors ........................................................................................ 12
5 Core library ..................................................................................................................................... 12
5.1 BioDAQ interface ................................................................................................................... 13
5.1.1 BioDAQ error codes .......................................................................................................... 13
5.1.2 BioDAQ exit status codes ............................................................................................ 13
5.1.3 BioDAQ state codes .......................................................................................................... 13
5.1.4 BioDAQDownload status codes .................................................................................... 14
5.1.5 Percent codes for the download data operation ......................................... 14
5.1.6 ActiveProtocol.................................................................................................................... 14
5.1.7 Arm .............................................................................................................................................. 15
5.1.8 ArmWithEvents ...................................................................................................................... 15
5.1.9 ApplyConfig ........................................................................................................................... 17
5.1.10 ApplyProfile .................................................................................................................... 17
5.1.11 ApplyProtocol .................................................................................................................. 18
5.1.12 Attach ................................................................................................................................... 19
5.1.13 BmsView ................................................................................................................................ 20
5.1.14 ChannelsView .................................................................................................................... 20
5.1.15 Download .............................................................................................................................. 21
5.1.16 DownloadAbort .................................................................................................................. 22
5.1.17 GetLastError .................................................................................................................... 22
5.1.18 Init ....................................................................................................................................... 23
5.1.19 Ports ..................................................................................................................................... 24
5.1.20 Record ................................................................................................................................... 24
5.1.21 Reset ..................................................................................................................................... 25
5.1.22 SensorsView ....................................................................................................................... 26