mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
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
68 lines
1.5 KiB
C++
68 lines
1.5 KiB
C++
/*
|
|
* NetworkTableServer.h
|
|
*
|
|
* Created on: Sep 27, 2012
|
|
* Author: Mitchell Wills
|
|
*/
|
|
|
|
#ifndef NETWORKTABLESERVER_H_
|
|
#define NETWORKTABLESERVER_H_
|
|
|
|
|
|
class NetworkTableServer;
|
|
|
|
#include "networktables2/TransactionDirtier.h"
|
|
#include "networktables2/NetworkTableNode.h"
|
|
#include "networktables2/server/ServerIncomingStreamMonitor.h"
|
|
#include "networktables2/server/ServerIncomingConnectionListener.h"
|
|
#include "networktables2/WriteManager.h"
|
|
#include "networktables2/stream/IOStreamProvider.h"
|
|
#include "networktables2/server/ServerConnectionList.h"
|
|
|
|
/**
|
|
* A server node in NetworkTables 2.0
|
|
*
|
|
* @author Mitchell
|
|
*
|
|
*/
|
|
class NetworkTableServer : public NetworkTableNode, public ServerIncomingConnectionListener{
|
|
private:
|
|
IOStreamProvider& streamProvider;
|
|
ServerIncomingStreamMonitor incomingStreamMonitor;
|
|
ServerConnectionList connectionList;
|
|
WriteManager writeManager;
|
|
TransactionDirtier continuingReceiver;
|
|
|
|
public:
|
|
/**
|
|
* Create a NetworkTable Server
|
|
*
|
|
* @param streamProvider
|
|
* @param threadManager
|
|
* @param transactionPool
|
|
*/
|
|
NetworkTableServer(IOStreamProvider& streamProvider, NetworkTableEntryTypeManager& typeManager, NTThreadManager& threadManager);
|
|
~NetworkTableServer();
|
|
/**
|
|
* Create a NetworkTable Server
|
|
*
|
|
* @param streamProvider
|
|
*/
|
|
NetworkTableServer(IOStreamProvider& streamProvider);
|
|
|
|
void Close();
|
|
|
|
void OnNewConnection(ServerConnectionAdapter& connectionAdapter);
|
|
|
|
|
|
bool IsConnected();
|
|
|
|
|
|
bool IsServer();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* NETWORKTABLESERVER_H_ */
|