TOBI SignalServer
0.1
|
Class gathering access to connected hardware. More...
#include <hw_access.h>
Public Member Functions | |
HWAccess (boost::asio::io_service &io_service, XMLParser &x) | |
Constructor. | |
virtual | ~HWAccess () |
Destructor. | |
void | fillDataPacket (tia::DataPacket *packet) |
Fill a DataPacket with data from attached hardware synchronous with the master device. | |
void | startDataAcquisition () |
Starts the data acquisition. | |
void | stopDataAcquisition () |
Stops the data acquisition. | |
std::vector< boost::uint32_t > | getAcquiredSignalTypes () |
Get a vector containing all acquired signaltypes. | |
std::vector< boost::uint16_t > | getBlockSizesPerSignalType () |
Get a vector containing the blocksizes for every acquired signaltype. | |
std::vector< boost::uint16_t > | getNrOfChannelsPerSignalType () |
Get a vector containing the amount of channels for every acquired signaltype. | |
std::vector< boost::uint32_t > | getSamplingRatePerSignalType () |
Get a vector containing the sampling rates for every acquired signaltype. | |
boost::uint16_t | getNrOfChannels () |
Get the total number of acquired channels. | |
std::map< boost::uint32_t, std::vector< std::string > > | getChannelNames () |
Get a map containing the channel-names for every signal type. | |
boost::uint16_t | getNrOfConnectedDevices () |
Get the number of connected devices. | |
boost::uint32_t | getMastersSamplingRate () |
Get the masters sampling rate. | |
boost::uint32_t | getMastersBlocksize () |
Get the masters blocksize. | |
Static Public Member Functions | |
static std::vector< std::string > | getPossibleHardwareNames () |
Get the names to build the respective hardware objects. | |
Private Member Functions | |
void | buildDataInfoMap () |
Builds a map containing information concerning the acquired data. | |
void | buildFsInfoMap () |
Builds a map containing the sampling rate for every signal type. | |
void | doHWSetup () |
Do hardware settings. | |
void | checkIfSingleMaster () |
Checks, if multiple masters are defined. | |
void | setAperiodics () |
Set aperiodic devices in aperiodics_ and remove from slaves_. | |
void | setMasterSlaveRatio () |
Sets a fixed master/slave ratio to ensure a repetitive data stream. | |
void | reportInHomogenousDevice (HWThread *dev) |
Reports inhomogenous device settings. | |
Private Attributes | |
std::vector< HWThread * > | slaves_ |
A vector holding pointers to all connected slave hardware objects. | |
std::vector< HWThread * > | aperiodics_ |
A vector holding pointers to all connected slave hardware objects. | |
HWThread * | master_ |
A pointer to the master-device object. | |
HWThread * | event_listener_ |
A pointer to the event-listener object. | |
std::vector< unsigned int > | fs_ratio_ |
A vector containing sampling rate rations (in unsigned int!!) compared to the master device. | |
std::vector< unsigned int > | sample_it_ |
A vector to iterate up to the desired fs_ratio. | |
std::map< boost::uint32_t, std::pair< boost::uint16_t, boost::uint16_t > > | data_info_ |
map containing ( type, (nr_ch, blocksize) ) | |
std::map< boost::uint32_t, double > | fs_info_ |
map containing ( type, sampling rate ) | |
std::map< boost::uint32_t, std::vector< std::string > > | channel_naming_ |
map containing ( type, channel names ) | |
bool | acqu_running_ |
bool | lpt_flag_ |
Class gathering access to connected hardware.
HWAccess manages every connected hardware and acquires data form master and slaves. It is also responsible for synchronisation between connected devices. It can hold multiple types of hardware objects, derived from HWThread, whereby only ONE master is allowed coincident.
Definition at line 79 of file hw_access.h.