HDK
|
#include <MC_MocapStreamImpl.h>
Public Member Functions | |
ServerState () | |
bool | connected () |
Whether a connection is currently established. More... | |
void | setConnected (bool connected) |
bool | killed () |
Whether the connection has been killed. More... | |
void | setKilled (bool killed) |
bool | portOpened () |
void | setPortOpened (bool port_opened) |
void | setError (const char *msg) |
bool | getError (UT_StringHolder &res) const |
Reads the error message if one has been added. More... | |
void | resetError () |
Resets the error state. More... | |
void | reset () |
Resets the server state to its default values. More... | |
void | gotPacket (UT_StringHolder &&packet) |
Public Attributes | |
UT_ConcurrentQueue< std::pair < UT_StringHolder, fpreal64 > > | myPackets |
UT_ConcurrentQueue < UT_Function< void(void *)> > | myTasks |
Keeps track of the state of a mocap stream server and is used as a method of communcating between a server function and the base class.
For thread safety, the server function should only call setConnected(), setPortOpened(), setError(), gotPacket(), and killed(). While the server function is running, it should be the only thread calling these methods.
Definition at line 115 of file MC_MocapStreamImpl.h.
|
inline |
Definition at line 119 of file MC_MocapStreamImpl.h.
|
inline |
Whether a connection is currently established.
Definition at line 123 of file MC_MocapStreamImpl.h.
|
inline |
Reads the error message if one has been added.
Definition at line 147 of file MC_MocapStreamImpl.h.
|
inline |
Called in the server function to pass a packet along to be parsed once it has been received.
Definition at line 177 of file MC_MocapStreamImpl.h.
|
inline |
Whether the connection has been killed.
Definition at line 127 of file MC_MocapStreamImpl.h.
|
inline |
Whether the port for receiving data has been opened. setPortOpened(True) must be called for the data to begin parsing.
Definition at line 132 of file MC_MocapStreamImpl.h.
|
inline |
Resets the server state to its default values.
Definition at line 164 of file MC_MocapStreamImpl.h.
|
inline |
Resets the error state.
Definition at line 158 of file MC_MocapStreamImpl.h.
|
inline |
Definition at line 124 of file MC_MocapStreamImpl.h.
|
inline |
Sends an error message from the server function to be added to the log.
Definition at line 137 of file MC_MocapStreamImpl.h.
|
inline |
Definition at line 128 of file MC_MocapStreamImpl.h.
|
inline |
Definition at line 133 of file MC_MocapStreamImpl.h.
UT_ConcurrentQueue<std::pair<UT_StringHolder, fpreal64> > MC_MocapStreamImpl::ServerState::myPackets |
Definition at line 116 of file MC_MocapStreamImpl.h.
UT_ConcurrentQueue<UT_Function<void(void*)> > MC_MocapStreamImpl::ServerState::myTasks |
Definition at line 117 of file MC_MocapStreamImpl.h.