TOBI SignalServer  0.1
tobiss::EventListener Class Reference

A temporary class used to inject events into the signal server. More...

#include <event_listener.h>

+ Inheritance diagram for tobiss::EventListener:
+ Collaboration diagram for tobiss::EventListener:

Public Member Functions

 EventListener (boost::asio::io_service &io)
 Constructor.
virtual ~EventListener ()
 Destructor.
virtual SampleBlock< double > getAsyncData ()
 Abstract method to achieve asynchronous data acquisition (method is non-blocking).
virtual void run ()
 Method to start listening for events.
virtual void stop ()
 Method to stop listening for events.

Private Member Functions

virtual SampleBlock< double > getSyncData ()
 Abstract method to achieve synchronous data acquisition (method is blocking).
void listen4Events (const boost::system::error_code &error, std::size_t bytes_transferred)
virtual void setDeviceSettings (ticpp::Iterator< ticpp::Element >const &)
 Set configuration listed in the <device_settings> section in the XML file.
virtual void setChannelSettings (ticpp::Iterator< ticpp::Element >const &)
 Set configuration listed in the <channel_settings> section in the XML file.

Private Attributes

bool initialized_
 to check, if condition variable has been set at least once (otherwise deadlock)
boost::asio::ip::udp::socket event_socket_udp_
boost::mutex sync_mut_
 mutex neede for synchronisation
boost::condition_variable_any cond_
 condition variable to wake up getSyncData()
std::vector< char > buffer_
std::vector< double > events_
 temporary vector holding recent samples of the sine (1 element per channel)

Detailed Description

A temporary class used to inject events into the signal server.

Warning:
This class is planned to be replaced by TOBI Interface D (TiD) and will be removed.

Definition at line 63 of file event_listener.h.


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables