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
This commit is contained in:
Brad Miller
2014-03-24 16:13:08 -04:00
parent 33134bef1d
commit 69d9ad70ab
804 changed files with 586 additions and 9377 deletions

View File

@@ -0,0 +1,57 @@
/**
* An abstraction for the NetworkTable protocol
*
* @author mwills
*
*/
#ifndef NETWORK_TABLE_CONNECTION_H_
#define NETWORK_TABLE_CONNECTION_H_
#include <stdio.h>
#include <stdlib.h>
#include "OSAL/Synchronized.h"
#ifndef _WRS_KERNEL
#include <stdint.h>
#endif
class NetworkTableConnection;
typedef uint16_t ProtocolVersion;
#include "networktables2/connection/DataIOStream.h"
#include "networktables2/NetworkTableEntry.h"
#include "networktables2/type/NetworkTableEntryType.h"
#include "networktables2/type/NetworkTableEntryTypeManager.h"
#include "networktables2/connection/ConnectionAdapter.h"
#include "networktables2/NetworkTableMessageType.h"
class NetworkTableConnection{
public:
static const ProtocolVersion PROTOCOL_REVISION = 0x0200;
NetworkTableConnection(IOStream* stream, NetworkTableEntryTypeManager& typeManager);
~NetworkTableConnection();
void close();
void flush();
void sendKeepAlive();
void sendClientHello();
void sendServerHelloComplete();
void sendProtocolVersionUnsupported();
void sendEntryAssignment(NetworkTableEntry& entry);
void sendEntryUpdate(NetworkTableEntry& entry);
void read(ConnectionAdapter& adapter);
void SetIOStream(IOStream* stream);
private:
NTReentrantSemaphore WRITE_LOCK;
DataIOStream* const ioStream;
NetworkTableEntryTypeManager& typeManager;
bool isValid;
void sendMessageHeader(NetworkTableMessageType messageType);
};
#endif