1 #ifndef _NETWORKTABLE_H_
2 #define _NETWORKTABLE_H_
10 #include "tables/ITable.h"
11 #include "tables/IRemote.h"
12 #include "networktables2/thread/NTThreadManager.h"
13 #include "networktables2/NetworkTableEntry.h"
14 #include "networktables2/util/StringCache.h"
15 #include "networktables/NetworkTableProvider.h"
16 #include "networktables/NetworkTableMode.h"
17 #include "networktables2/thread/DefaultThreadManager.h"
18 #include "networktables/NetworkTableConnectionListenerAdapter.h"
19 #include "networktables/NetworkTableListenerAdapter.h"
20 #include "tables/IRemoteConnectionListener.h"
30 const std::string path;
36 std::string Calc(
const std::string& key);
42 map<std::string, NetworkTableEntry*> cache;
59 static void* streamFactory;
63 static std::string ipAddress;
76 map<IRemoteConnectionListener*, NetworkTableConnectionListenerAdapter*> connectionListenerMap;
77 multimap<ITableListener*, ITableListener*> listenerMap;
79 static void CheckInit();
85 static const char PATH_SEPARATOR_CHAR;
99 static void Initialize();
100 static void Shutdown();
112 static void SetClientMode();
118 static void SetServerMode();
125 static void SetTeam(
int team);
129 static void SetIPAddress(
const char* address);
162 void AddTableListener(
ITableListener* listener,
bool immediateNotify);
163 void AddTableListener(std::string key,
ITableListener* listener,
bool immediateNotify);
187 bool ContainsKey(std::string key);
189 bool ContainsSubTable(std::string key);
201 void PutNumber(std::string key,
double value);
212 double GetNumber(std::string key);
224 double GetNumber(std::string key,
double defaultValue);
236 void PutString(std::string key, std::string value);
247 std::string GetString(std::string key);
259 std::string GetString(std::string key, std::string defaultValue);
271 void PutBoolean(std::string key,
bool value);
282 bool GetBoolean(std::string key);
294 bool GetBoolean(std::string key,
bool defaultValue);
300 void RetrieveValue(std::string key,
ComplexData& externalValue);
310 void PutValue(std::string key,
ComplexData& value);
static const std::string PATH_SEPARATOR
static const int DEFAULT_PORT