#pragma once #include #include #include #include #include class vrpn_Connection; class vrpn_Button_Server; namespace OpenViBE { namespace SSVEP { class CApplication; class CVRPNServer { public: static CVRPNServer* getInstance(CApplication* application); ~CVRPNServer() = default; void processFrame(); void addButton(const CString& name, int buttonCount); void changeButtonState(const std::string& name, int index, int state); int getButtonState(const std::string& name, const int index) { return m_buttonCache[name][index]; } private: static CVRPNServer* m_vrpnServerInstance; static CApplication* m_application; explicit CVRPNServer(CApplication* application); vrpn_Connection* m_connection = nullptr; std::map m_buttonServer; std::map> m_buttonCache; }; } // namespace SSVEP } // namespace OpenViBE