You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ovasCPluginFiddler.h 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #pragma once
  2. /**
  3. * \brief Acquisition Server plugin that tinkers with the signal for P300 debugging purposes
  4. * \version 0.1
  5. * \author Jussi T. Lindgren / Inria
  6. */
  7. #include "ovasIAcquisitionServerPlugin.h"
  8. namespace OpenViBE {
  9. namespace AcquisitionServer {
  10. class CAcquisitionServer;
  11. namespace Plugins {
  12. class CPluginFiddler final : public IAcquisitionServerPlugin
  13. {
  14. // Plugin interface
  15. public:
  16. explicit CPluginFiddler(const Kernel::IKernelContext& ctx);
  17. ~CPluginFiddler() override {}
  18. bool startHook(const std::vector<CString>& selectedChannelNames, const size_t sampling, const size_t nChannel, const size_t nSamplePerSentBlock) override;
  19. void stopHook() override {}
  20. void loopHook(std::deque<std::vector<float>>& buffers, CStimulationSet& stimSet, const uint64_t start, const uint64_t end,
  21. const uint64_t sampleTime) override;
  22. // Plugin implementation
  23. float m_BCI2000VersionFiddlerStrength = 0;
  24. uint64_t m_StartSample = 0;
  25. uint64_t m_EndSample = 0;
  26. size_t m_Sampling = 0;
  27. size_t m_NProcessedSample = 0;
  28. size_t m_LastBufferSize = 0;
  29. size_t m_Counter = 0;
  30. private:
  31. size_t m_nSamplePerSentBlock = 0;
  32. };
  33. } // namespace Plugins
  34. } // namespace AcquisitionServer
  35. } // namespace OpenViBE