ovasCDriverMBTSmarting.h 2.21 KB
Newer Older
1 2 3 4 5 6
#ifndef __OpenViBE_AcquisitionServer_CDriverMBTSmarting_H__
#define __OpenViBE_AcquisitionServer_CDriverMBTSmarting_H__

#include "ovasIDriver.h"
#include "../ovasCHeader.h"
#include <openvibe/ov_all.h>
7

8 9 10
#include "../ovasCSettingsHelper.h"
#include "../ovasCSettingsHelperOperators.h"

11
#include "ovasCSmartingAmp.h"
12 13 14 15 16

namespace OpenViBEAcquisitionServer
{
	/**
	 * \class CDriverMBTSmarting
17 18 19
	 * \author mBrainTrain dev team (mBrainTrain)
	 * \date Tue Oct 14 16:09:43 2014
	 * \brief The CDriverMBTSmarting allows the acquisition server to acquire data from a MBTSmarting device.
20 21 22 23 24 25 26 27 28 29 30 31
	 *
	 * TODO: details
	 *
	 * \sa CConfigurationMBTSmarting
	 */
	class CDriverMBTSmarting : public OpenViBEAcquisitionServer::IDriver
	{
	public:

		CDriverMBTSmarting(OpenViBEAcquisitionServer::IDriverContext& rDriverContext);
		virtual ~CDriverMBTSmarting(void);
		virtual const char* getName(void);
32

33 34 35 36
		virtual OpenViBE::boolean initialize(
			const OpenViBE::uint32 ui32SampleCountPerSentBlock,
			OpenViBEAcquisitionServer::IDriverCallback& rCallback);
		virtual OpenViBE::boolean uninitialize(void);
37

38 39 40
		virtual OpenViBE::boolean start(void);
		virtual OpenViBE::boolean stop(void);
		virtual OpenViBE::boolean loop(void);
41

42 43 44 45 46 47 48
		virtual OpenViBE::boolean isConfigurable(void);
		virtual OpenViBE::boolean configure(void);
		virtual const OpenViBEAcquisitionServer::IHeader* getHeader(void) { return &m_oHeader; }
		
		virtual OpenViBE::boolean isFlagSet(
			const OpenViBEAcquisitionServer::EDriverFlag eFlag) const
		{
49 50 51 52 53
	#ifdef TARGET_OS_Windows
		return false;
	#elif defined TARGET_OS_Linux
		return true;
	#endif
54
		}
55

56 57 58
	protected:
		
		SettingsHelper m_oSettings;
59
		
60 61 62 63 64 65 66 67 68 69 70 71 72
		OpenViBEAcquisitionServer::IDriverCallback* m_pCallback;

		// Replace this generic Header with any specific header you might have written
		OpenViBEAcquisitionServer::CHeader m_oHeader;

		OpenViBE::uint32 m_ui32SampleCountPerSentBlock;
	
	private:

		/*
		 * Insert here all specific attributes, such as USB port number or device ID.
		 * Example :
		 */
73
		OpenViBE::uint32 m_ui32ConnectionID;
74 75 76 77
		SmartingAmp* m_pSmartingAmp;

		std::vector< OpenViBE::float32 > m_vSamples;			        // Buffer sent outwards, size is channels * blocksize

78 79 80
	};
};

81
#endif // __OpenViBE_AcquisitionServer_CDriverMBTSmarting_H__