Home
Roadside
Carputer
geoHist
software
FRC
Blog
Now you can download a copy of these docs so you can use them offline!
Download now
Main Page
Related Pages
Classes
Files
File List
networktables2
client
ClientConnectionAdapter.h
1
/*
2
* ClientConnectionAdapter.h
3
*
4
* Created on: Nov 2, 2012
5
* Author: Mitchell Wills
6
*/
7
8
#ifndef CLIENTCONNECTIONADAPTER_H_
9
#define CLIENTCONNECTIONADAPTER_H_
10
11
class
ClientConnectionAdapter
;
12
13
#include "networktables2/connection/ConnectionAdapter.h"
14
#include "networktables2/IncomingEntryReceiver.h"
15
#include "networktables2/FlushableOutgoingEntryReceiver.h"
16
#include "networktables2/client/ClientNetworkTableEntryStore.h"
17
#include "networktables2/stream/IOStreamFactory.h"
18
#include "networktables2/thread/NTThreadManager.h"
19
#include "networktables2/thread/NTThread.h"
20
#include "networktables2/client/ClientConnectionState.h"
21
#include "networktables2/client/ClientConnectionListenerManager.h"
22
#include "networktables2/connection/ConnectionMonitorThread.h"
23
24
31
class
ClientConnectionAdapter
:
public
ConnectionAdapter
,
public
IncomingEntryReceiver
,
public
FlushableOutgoingEntryReceiver
{
32
private
:
33
ClientNetworkTableEntryStore
& entryStore;
34
IOStreamFactory
& streamFactory;
35
NTThreadManager
& threadManager;
36
37
ClientConnectionState
* connectionState;
38
ClientConnectionListenerManager
& connectionListenerManager;
39
NTReentrantSemaphore
LOCK;
40
NetworkTableEntryTypeManager
& typeManager;
41
NTThread
* readThread;
42
ConnectionMonitorThread
* monitor;
43
NetworkTableConnection
* connection;
44
45
void
gotoState(
ClientConnectionState
* newState);
46
bool
m_IsConnectionClosed;
//Keep track of when this is closed to issue reconnect
47
public
:
51
ClientConnectionState
*
getConnectionState
();
55
bool
isConnected
();
56
65
ClientConnectionAdapter
(
ClientNetworkTableEntryStore
& entryStore,
NTThreadManager
& threadManager,
IOStreamFactory
& streamFactory,
ClientConnectionListenerManager
& connectionListenerManager,
NetworkTableEntryTypeManager
& typeManager);
66
virtual
~
ClientConnectionAdapter
();
67
68
69
/*
70
* Connection management
71
*/
75
void
reconnect
();
76
80
void
close
();
85
void
close
(
ClientConnectionState
* newState);
86
87
88
89
void
badMessage
(
BadMessageException
& e);
90
91
void
ioException
(
IOException
& e);
92
93
NetworkTableEntry
* GetEntry(EntryId
id
);
94
95
96
bool
keepAlive();
97
98
void
clientHello(ProtocolVersion protocolRevision);
99
100
void
protocolVersionUnsupported(ProtocolVersion protocolRevision);
101
102
void
serverHelloComplete();
103
104
105
void
offerIncomingAssignment(
NetworkTableEntry
* entry);
106
void
offerIncomingUpdate(
NetworkTableEntry
* entry, SequenceNumber sequenceNumber,
EntryValue
value);
107
108
void
offerOutgoingAssignment(
NetworkTableEntry
* entry);
109
110
void
offerOutgoingUpdate(
NetworkTableEntry
* entry);
111
void
flush();
112
void
ensureAlive();
113
114
};
115
116
117
#endif
/* CLIENTCONNECTIONADAPTER_H_ */
ClientConnectionAdapter
Definition:
ClientConnectionAdapter.h:31
NTReentrantSemaphore
Definition:
OSAL/Synchronized.h:43
IncomingEntryReceiver
Definition:
IncomingEntryReceiver.h:14
NTThreadManager
Definition:
NTThreadManager.h:22
ClientConnectionListenerManager
Definition:
ClientConnectionListenerManager.h:17
ClientConnectionAdapter::close
void close()
Definition:
ClientConnectionAdapter.cpp:130
NetworkTableEntryTypeManager
Definition:
NetworkTableEntryTypeManager.h:15
ClientConnectionAdapter::isConnected
bool isConnected()
Definition:
ClientConnectionAdapter.cpp:38
BadMessageException
Definition:
BadMessageException.h:14
FlushableOutgoingEntryReceiver
Definition:
FlushableOutgoingEntryReceiver.h:15
ClientConnectionAdapter::ClientConnectionAdapter
ClientConnectionAdapter(ClientNetworkTableEntryStore &entryStore, NTThreadManager &threadManager, IOStreamFactory &streamFactory, ClientConnectionListenerManager &connectionListenerManager, NetworkTableEntryTypeManager &typeManager)
Definition:
ClientConnectionAdapter.cpp:50
IOException
Definition:
IOException.h:16
ClientConnectionAdapter::getConnectionState
ClientConnectionState * getConnectionState()
Definition:
ClientConnectionAdapter.cpp:32
ConnectionMonitorThread
Definition:
ConnectionMonitorThread.h:26
NTThread
Definition:
NTThread.h:16
NetworkTableEntry
Definition:
NetworkTableEntry.h:30
ConnectionAdapter
Definition:
ConnectionAdapter.h:18
ClientConnectionAdapter::badMessage
void badMessage(BadMessageException &e)
Definition:
ClientConnectionAdapter.cpp:153
NetworkTableConnection
Definition:
NetworkTableConnection.h:30
ClientNetworkTableEntryStore
Definition:
ClientNetworkTableEntryStore.h:25
IOStreamFactory
Definition:
IOStreamFactory.h:19
ClientConnectionState
Definition:
ClientConnectionState.h:25
ClientConnectionAdapter::reconnect
void reconnect()
Definition:
ClientConnectionAdapter.cpp:99
EntryValue
Definition:
ITable.h:13
ClientConnectionAdapter::ioException
void ioException(IOException &e)
Definition:
ClientConnectionAdapter.cpp:158
Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by
1.8.6
© 2006-2009 Dustin Spicuzza. All rights reserved.
Powered by Onnac
I do not condone or encourage graffiti. Please paint responsibly.