Files
allwpilib/networktables/cpp/include/networktables2/connection/ConnectionMonitorThread.h
Brad Miller 69d9ad70ab CMake Changes
This is the changes made by Patrick Plenefisch converting the native
code to use CMake and the CMake Maven Plugin, as opposed to the
native Maven plugin. This is to allow for compatibility with newer
versions of the GCC toolchain. All the cpp sources were moved from
maven style directories to cpp style directories for CMake.

Change-Id: I67f5e3608948f37c83b0990d232105a3784f8593
2014-04-01 11:18:29 -04:00

46 lines
1.0 KiB
C++

/*
* ConnectionMonitorThread.h
*
* Created on: Sep 22, 2012
* Author: Mitchell Wills
*/
#ifndef CONNECTIONMONITORTHREAD_H_
#define CONNECTIONMONITORTHREAD_H_
class ConnectionMonitorThread;
#include "networktables2/connection/ConnectionAdapter.h"
#include "networktables2/connection/NetworkTableConnection.h"
#include "networktables2/thread/PeriodicRunnable.h"
/**
* A periodic thread that repeatedly reads from a connection
* @author Mitchell
*
*/
class ConnectionMonitorThread : public PeriodicRunnable{
private:
ConnectionAdapter& adapter;
NetworkTableConnection& connection;
public:
/**
* create a new monitor thread
* @param adapter
* @param connection
*/
ConnectionMonitorThread(ConnectionAdapter& adapter, NetworkTableConnection& connection);
//This can be used it identify which connection adapter instance the thread procedure is running (read-only)
const NetworkTableConnection *GetNetworkTableConnection() const {return &connection;}
void run();
};
#endif /* CONNECTIONMONITORTHREAD_H_ */