TINC
Toolkit for Interactive Computation
tinc::TincProtocol Class Referenceabstract

The TincProtocol class. More...

#include <TincProtocol.hpp>

Inheritance diagram for tinc::TincProtocol:
tinc::TincClient tinc::TincServer

Public Types

enum  { CREATE_DATA_SLICE = 0x01 }
 
enum  Status { STATUS_UNKNOWN = 0x00 , STATUS_AVAILABLE = 0x01 , STATUS_BUSY = 0x02 }
 

Public Member Functions

bool registerParameter (al::ParameterMeta &param, al::Socket *src=nullptr)
 register a parameter with this Tinc node More...
 
bool registerParameterSpaceDimension (ParameterSpaceDimension &psd, al::Socket *src=nullptr)
 register a parameter space dimencion with this Tinc node More...
 
bool registerParameterSpace (ParameterSpace &ps, al::Socket *src=nullptr)
 register a parameter space with this Tinc node More...
 
bool registerProcessor (Processor &processor, al::Socket *src=nullptr)
 register a processor with this Tinc node More...
 
bool registerDiskBuffer (DiskBufferAbstract &db, al::Socket *src=nullptr)
 register a disk buffer with this Tinc node More...
 
bool registerDataPool (DataPool &dp, al::Socket *src=nullptr)
 register a data pool with this Tinc node More...
 
TincProtocoloperator<< (al::ParameterMeta &p)
 
TincProtocoloperator<< (ParameterSpace &p)
 
TincProtocoloperator<< (ParameterSpaceDimension &psd)
 
TincProtocoloperator<< (Processor &p)
 
TincProtocoloperator<< (DiskBufferAbstract &db)
 
TincProtocoloperator<< (DataPool &dp)
 
void requestParameters (al::Socket *dst)
 
void requestParameterSpaces (al::Socket *dst)
 
void requestProcessors (al::Socket *dst)
 
void requestDiskBuffers (al::Socket *dst)
 
void requestDataPools (al::Socket *dst)
 
void removeParameter (std::string name, std::string group="", bool invoked=false, al::Socket *src=nullptr)
 
void removeParameterSpace (std::string name, al::Socket *src=nullptr)
 
void removeProcessor (std::string name, al::Socket *src=nullptr)
 
void removeDiskbuffer (std::string name, al::Socket *src=nullptr)
 
void removeDataPool (std::string name, al::Socket *src=nullptr)
 
ParameterSpaceDimensiongetDimension (std::string name, std::string group="")
 get a registered dimension in this Tinc node More...
 
al::ParameterMeta * getParameter (std::string name, std::string group="")
 get a parameter from a registered dimension in this Tinc node More...
 
std::vector< ParameterSpaceDimension * > dimensions ()
 
ParameterSpacegetParameterSpace (std::string name)
 
std::vector< ParameterSpace * > parameterSpaces ()
 
DiskBufferAbstractgetDiskBuffer (std::string name)
 
DataPoolgetDataPool (std::string name)
 
virtual bool barrier (uint32_t group=0, float timeoutsec=0.0)=0
 activate a network barrier More...
 
void setVerbose (bool v)
 
virtual void markBusy ()
 
virtual void markAvailable ()
 
Status getStatus ()
 
void setRootMapEntry (std::string serverPath, std::string clientPath, std::string host="")
 setRootMapEntry More...
 
const std::map< std::string, std::vector< std::pair< std::string, std::string > > > getRootPathMap ()
 
void print (std::ostream &stream=std::cout)
 

Protected Member Functions

void connectParameterCallbacks (al::ParameterMeta &param)
 
void connectDimensionCallbacks (ParameterSpaceDimension &psd)
 
void readRequestMessage (int objectType, std::string objectId, al::Socket *src)
 
void processRequestParameters (al::Socket *dst)
 
void processRequestParameterSpaces (al::Socket *dst)
 
void processRequestProcessors (al::Socket *dst)
 
void processRequestDiskBuffers (al::Socket *dst)
 
void processRequestDataPools (al::Socket *dst)
 
bool readRegisterMessage (int objectType, void *any, al::Socket *src, bool forward=false)
 
bool processRegisterParameter (void *any, al::Socket *src, bool forward=false)
 
bool processRegisterParameterSpace (void *any, al::Socket *src, bool forward=false)
 
bool processRegisterProcessor (void *any, al::Socket *src, bool forward=false)
 
bool processRegisterDiskBuffer (void *any, al::Socket *src, bool forward=false)
 
bool processRegisterDataPool (void *any, al::Socket *src, bool forward=false)
 
bool processConfigureParameterMessage (void *conf, ParameterSpaceDimension *dim, al::Socket *src, bool forward=false)
 
void sendRegisterMessage (ParameterSpaceDimension *dim, al::Socket *dst, al::Socket *src=nullptr)
 
void sendRegisterMessage (ParameterSpace *ps, al::Socket *dst, al::Socket *src=nullptr)
 
void sendRegisterMessage (Processor *p, al::Socket *dst, al::Socket *src=nullptr)
 
void sendRegisterMessage (DiskBufferAbstract *p, al::Socket *dst, al::Socket *src=nullptr)
 
void sendRegisterMessage (DataPool *p, al::Socket *dst, al::Socket *src=nullptr)
 
bool readConfigureMessage (int objectType, void *any, al::Socket *src, bool forward=false)
 
bool processConfigureParameter (void *any, al::Socket *src, bool forward=false)
 
bool processConfigureParameterSpace (void *any, al::Socket *src, bool forward=false)
 
bool processConfigureProcessor (void *any, al::Socket *src, bool forward=false)
 
bool processConfigureDiskBuffer (void *any, al::Socket *src, bool forward=false)
 
bool processConfigureDataPool (void *any, al::Socket *src, bool forward=false)
 
void sendConfigureMessage (ParameterSpaceDimension *dim, al::Socket *dst, al::Socket *src=nullptr)
 
void sendConfigureMessage (ParameterSpace *ps, al::Socket *dst, al::Socket *src=nullptr)
 
void sendConfigureMessage (Processor *p, al::Socket *dst, al::Socket *src=nullptr)
 
void sendConfigureMessage (DataPool *p, al::Socket *dst, al::Socket *src=nullptr)
 
void sendConfigureMessage (DiskBufferAbstract *p, al::Socket *dst, al::Socket *src=nullptr)
 
void sendConfigureParameterSpaceAddDimension (ParameterSpace *ps, ParameterSpaceDimension *dim, al::Socket *dst, al::Socket *src=nullptr)
 
void sendConfigureParameterSpaceRemoveDimension (ParameterSpace *ps, ParameterSpaceDimension *dim, al::Socket *dst, al::Socket *src=nullptr)
 
bool readRemoveMessage (int objectType, void *any, al::Socket *src)
 
bool processRemoveParameter (void *any, al::Socket *src)
 
void sendRemoveMessage (ParameterSpaceDimension *dim, al::Socket *dst, al::Socket *src=nullptr)
 
void sendValueMessage (float value, std::string fullAddress, al::ValueSource *src=nullptr)
 
void sendValueMessage (bool value, std::string fullAddress, al::ValueSource *src=nullptr)
 
void sendValueMessage (int32_t value, std::string fullAddress, al::ValueSource *src=nullptr)
 
void sendValueMessage (uint64_t value, std::string fullAddress, al::ValueSource *src=nullptr)
 
void sendValueMessage (std::string value, std::string fullAddress, al::ValueSource *src=nullptr)
 
void sendValueMessage (al::Vec3f value, std::string fullAddress, al::ValueSource *src=nullptr)
 
void sendValueMessage (al::Vec4f value, std::string fullAddress, al::ValueSource *src=nullptr)
 
void sendValueMessage (al::Color value, std::string fullAddress, al::ValueSource *src=nullptr)
 
void sendValueMessage (al::Pose value, std::string fullAddress, al::ValueSource *src=nullptr)
 
bool readPingMessage (int objectType, void *any, al::Socket *src)
 
bool readCommandMessage (int objectType, void *any, al::Socket *src)
 
bool sendCommandErrorMessage (uint64_t commandId, std::string objectId, std::string errorMessage, al::Socket *src)
 
bool processCommandParameter (void *any, al::Socket *src)
 
bool processCommandParameterSpace (void *any, al::Socket *src)
 
bool processCommandDiskBuffer (void *any, al::Socket *src)
 
bool processCommandDataPool (void *any, al::Socket *src)
 
bool sendProtobufMessage (void *message, al::Socket *dst)
 
std::string mapFromRemotePath (std::string path, al::Socket *src)
 
std::string mapToRemotePath (std::string path, al::Socket *src)
 
virtual bool sendTincMessage (void *msg, al::Socket *dst=nullptr, al::ValueSource *src=nullptr)
 sendTincMessage More...
 

Protected Attributes

std::vector< ParameterSpaceDimension * > mParameterSpaceDimensions
 
std::vector< ParameterSpace * > mParameterSpaces
 
std::vector< Processor * > mProcessors
 
std::vector< DiskBufferAbstract * > mDiskBuffers
 
std::vector< DataPool * > mDataPools
 
std::vector< std::shared_ptr< ParameterSpaceDimension > > mLocalPSDs
 
std::vector< std::shared_ptr< ParameterSpace > > mLocalPSs
 
std::vector< std::shared_ptr< DiskBufferAbstract > > mLocalDBs
 
std::vector< std::shared_ptr< DataPool > > mLocalDPs
 
int barrierWaitGranularTimeMs = 20
 
std::mutex mBusyCountLock
 
uint32_t mBusyCount = 0
 
std::map< std::string, std::vector< std::pair< std::string, std::string > > > mRootPathMap
 
std::map< al::Socket *, std::string > mClientHostnames
 
std::map< al::Socket *, std::vector< uint64_t > > mPongsReceived
 
std::mutex mPongLock
 
bool mVerbose {false}
 

Detailed Description

The TincProtocol class.

This class serves as the basis for TincClient and TincServer classes and provides refence storage and network synchronization

This class registers objects (ParameterSpaceDimension, ParameterSpace, DataPool, etc.), but takes no ownership of them. They are not deallocated when the TincProtocol object is destroyed and the user must guarantee that they are valid for the whole duration of the TincProtocol object's life, or the must be removed from TincProtocol before being destroyed.

When an object is not registered, but created internally, e.g. from a network command, the TincProtocol will destroy the object when it itself is destroyed. So it is the user's responsibility not to destroy the TincProtocol object while still requiring the objects that were provided by it. It might also be the case that the object is destroyed from a network request, so for these types of objects it is always good to request them directly from TincProtocol every time they are used, e.g. using getDimension() and checking for nullptr, instead of storing the pointer.

Definition at line 71 of file TincProtocol.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
CREATE_DATA_SLICE 

Definition at line 74 of file TincProtocol.hpp.

◆ Status

Enumerator
STATUS_UNKNOWN 
STATUS_AVAILABLE 
STATUS_BUSY 

Definition at line 76 of file TincProtocol.hpp.

Member Function Documentation

◆ barrier()

virtual bool tinc::TincProtocol::barrier ( uint32_t  group = 0,
float  timeoutsec = 0.0 
)
pure virtual

activate a network barrier

Parameters
groupgroup to make the barrier for. 0 is all.
timeoutsectimeout in secods
Returns
true if barrier succeeded before timing out

Group support not implemented yet.

Implemented in tinc::TincServer, and tinc::TincClient.

◆ connectDimensionCallbacks()

void tinc::TincProtocol::connectDimensionCallbacks ( ParameterSpaceDimension psd)
protected

◆ connectParameterCallbacks()

void tinc::TincProtocol::connectParameterCallbacks ( al::ParameterMeta &  param)
protected

◆ dimensions()

std::vector<ParameterSpaceDimension *> tinc::TincProtocol::dimensions ( )
inline

Definition at line 206 of file TincProtocol.hpp.

◆ getDataPool()

DataPool* tinc::TincProtocol::getDataPool ( std::string  name)

◆ getDimension()

ParameterSpaceDimension* tinc::TincProtocol::getDimension ( std::string  name,
std::string  group = "" 
)

get a registered dimension in this Tinc node

Parameters
namename (id) of the dimension
group
Returns
a pointer to the dimension or nullptr if not found

If group is empty, the first matching name in any group is returned

It is recommended that you always call this function instead of storing the pointer, as the dimension might be free in some cases, for example if it was created by a network REGISTER command and then destroyed through a network REMOVE command.

◆ getDiskBuffer()

DiskBufferAbstract* tinc::TincProtocol::getDiskBuffer ( std::string  name)

◆ getParameter()

al::ParameterMeta* tinc::TincProtocol::getParameter ( std::string  name,
std::string  group = "" 
)

get a parameter from a registered dimension in this Tinc node

Parameters
namename (id) of the parameter
group
Returns
a pointer to the parameter or nullptr if not found

If group is empty, the first matching name in any group is returned

It is recommended that you always call this function instead of storing the pointer, as the dimension might be free in some cases, for example if it was created by a network REGISTER command and then destroyed through a network REMOVE command.

◆ getParameterSpace()

ParameterSpace* tinc::TincProtocol::getParameterSpace ( std::string  name)

◆ getRootPathMap()

const std::map<std::string, std::vector<std::pair<std::string, std::string> > > tinc::TincProtocol::getRootPathMap ( )
inline

Definition at line 255 of file TincProtocol.hpp.

◆ getStatus()

Status tinc::TincProtocol::getStatus ( )

◆ mapFromRemotePath()

std::string tinc::TincProtocol::mapFromRemotePath ( std::string  path,
al::Socket *  src 
)
protected

◆ mapToRemotePath()

std::string tinc::TincProtocol::mapToRemotePath ( std::string  path,
al::Socket *  src 
)
protected

◆ markAvailable()

virtual void tinc::TincProtocol::markAvailable ( )
virtual

Reimplemented in tinc::TincServer.

◆ markBusy()

virtual void tinc::TincProtocol::markBusy ( )
virtual

Reimplemented in tinc::TincServer.

◆ operator<<() [1/6]

TincProtocol& tinc::TincProtocol::operator<< ( al::ParameterMeta &  p)

◆ operator<<() [2/6]

TincProtocol& tinc::TincProtocol::operator<< ( DataPool dp)

◆ operator<<() [3/6]

TincProtocol& tinc::TincProtocol::operator<< ( DiskBufferAbstract db)

◆ operator<<() [4/6]

TincProtocol& tinc::TincProtocol::operator<< ( ParameterSpace p)

◆ operator<<() [5/6]

TincProtocol& tinc::TincProtocol::operator<< ( ParameterSpaceDimension psd)

◆ operator<<() [6/6]

TincProtocol& tinc::TincProtocol::operator<< ( Processor p)

◆ parameterSpaces()

std::vector<ParameterSpace *> tinc::TincProtocol::parameterSpaces ( )
inline

Definition at line 213 of file TincProtocol.hpp.

◆ print()

void tinc::TincProtocol::print ( std::ostream &  stream = std::cout)

◆ processCommandDataPool()

bool tinc::TincProtocol::processCommandDataPool ( void *  any,
al::Socket *  src 
)
protected

◆ processCommandDiskBuffer()

bool tinc::TincProtocol::processCommandDiskBuffer ( void *  any,
al::Socket *  src 
)
protected

◆ processCommandParameter()

bool tinc::TincProtocol::processCommandParameter ( void *  any,
al::Socket *  src 
)
protected

◆ processCommandParameterSpace()

bool tinc::TincProtocol::processCommandParameterSpace ( void *  any,
al::Socket *  src 
)
protected

◆ processConfigureDataPool()

bool tinc::TincProtocol::processConfigureDataPool ( void *  any,
al::Socket *  src,
bool  forward = false 
)
protected

◆ processConfigureDiskBuffer()

bool tinc::TincProtocol::processConfigureDiskBuffer ( void *  any,
al::Socket *  src,
bool  forward = false 
)
protected

◆ processConfigureParameter()

bool tinc::TincProtocol::processConfigureParameter ( void *  any,
al::Socket *  src,
bool  forward = false 
)
protected

◆ processConfigureParameterMessage()

bool tinc::TincProtocol::processConfigureParameterMessage ( void *  conf,
ParameterSpaceDimension dim,
al::Socket *  src,
bool  forward = false 
)
protected

◆ processConfigureParameterSpace()

bool tinc::TincProtocol::processConfigureParameterSpace ( void *  any,
al::Socket *  src,
bool  forward = false 
)
protected

◆ processConfigureProcessor()

bool tinc::TincProtocol::processConfigureProcessor ( void *  any,
al::Socket *  src,
bool  forward = false 
)
protected

◆ processRegisterDataPool()

bool tinc::TincProtocol::processRegisterDataPool ( void *  any,
al::Socket *  src,
bool  forward = false 
)
protected

◆ processRegisterDiskBuffer()

bool tinc::TincProtocol::processRegisterDiskBuffer ( void *  any,
al::Socket *  src,
bool  forward = false 
)
protected

◆ processRegisterParameter()

bool tinc::TincProtocol::processRegisterParameter ( void *  any,
al::Socket *  src,
bool  forward = false 
)
protected

◆ processRegisterParameterSpace()

bool tinc::TincProtocol::processRegisterParameterSpace ( void *  any,
al::Socket *  src,
bool  forward = false 
)
protected

◆ processRegisterProcessor()

bool tinc::TincProtocol::processRegisterProcessor ( void *  any,
al::Socket *  src,
bool  forward = false 
)
protected

◆ processRemoveParameter()

bool tinc::TincProtocol::processRemoveParameter ( void *  any,
al::Socket *  src 
)
protected

◆ processRequestDataPools()

void tinc::TincProtocol::processRequestDataPools ( al::Socket *  dst)
protected

◆ processRequestDiskBuffers()

void tinc::TincProtocol::processRequestDiskBuffers ( al::Socket *  dst)
protected

◆ processRequestParameters()

void tinc::TincProtocol::processRequestParameters ( al::Socket *  dst)
protected

◆ processRequestParameterSpaces()

void tinc::TincProtocol::processRequestParameterSpaces ( al::Socket *  dst)
protected

◆ processRequestProcessors()

void tinc::TincProtocol::processRequestProcessors ( al::Socket *  dst)
protected

◆ readCommandMessage()

bool tinc::TincProtocol::readCommandMessage ( int  objectType,
void *  any,
al::Socket *  src 
)
protected

◆ readConfigureMessage()

bool tinc::TincProtocol::readConfigureMessage ( int  objectType,
void *  any,
al::Socket *  src,
bool  forward = false 
)
protected

◆ readPingMessage()

bool tinc::TincProtocol::readPingMessage ( int  objectType,
void *  any,
al::Socket *  src 
)
protected

◆ readRegisterMessage()

bool tinc::TincProtocol::readRegisterMessage ( int  objectType,
void *  any,
al::Socket *  src,
bool  forward = false 
)
protected

◆ readRemoveMessage()

bool tinc::TincProtocol::readRemoveMessage ( int  objectType,
void *  any,
al::Socket *  src 
)
protected

◆ readRequestMessage()

void tinc::TincProtocol::readRequestMessage ( int  objectType,
std::string  objectId,
al::Socket *  src 
)
protected

◆ registerDataPool()

bool tinc::TincProtocol::registerDataPool ( DataPool dp,
al::Socket *  src = nullptr 
)

register a data pool with this Tinc node

Parameters
dpthe data pool to register
srcthe source socket of the request

If src is not nullptr, network notification of registration will be blocked for that destination.

◆ registerDiskBuffer()

bool tinc::TincProtocol::registerDiskBuffer ( DiskBufferAbstract db,
al::Socket *  src = nullptr 
)

register a disk buffer with this Tinc node

Parameters
dbthe disk buffer to register
srcthe source socket of the request

If src is not nullptr, network notification of registration will be blocked for that destination.

◆ registerParameter()

bool tinc::TincProtocol::registerParameter ( al::ParameterMeta &  param,
al::Socket *  src = nullptr 
)

register a parameter with this Tinc node

Parameters
paramthe parameter to register
srcthe source socket of the request
Returns
true if successfully registered

If src is not nullptr, network notification of registration will be blocked for that destination. This is equivalent to registerParameterSpaceDimension() and will internally wrap the parameter in a dimension. TincClient does not take ownership of the param object, and does not free it when destroyed.

◆ registerParameterSpace()

bool tinc::TincProtocol::registerParameterSpace ( ParameterSpace ps,
al::Socket *  src = nullptr 
)

register a parameter space with this Tinc node

Parameters
psdthe parameter space dimension to register
srcthe source socket of the request
Returns
true if successfully registered

If src is not nullptr, network notification of registration will be blocked for that destination.

◆ registerParameterSpaceDimension()

bool tinc::TincProtocol::registerParameterSpaceDimension ( ParameterSpaceDimension psd,
al::Socket *  src = nullptr 
)

register a parameter space dimencion with this Tinc node

Parameters
psthe parameter space to register
srcthe source socket of the request
Returns
true if successfully registered dimension

If src is not nullptr, network notification of registration will be blocked for that destination. TincClient does not take ownership of the psd object, and does not free it when destroyed.

◆ registerProcessor()

bool tinc::TincProtocol::registerProcessor ( Processor processor,
al::Socket *  src = nullptr 
)

register a processor with this Tinc node

Parameters
processorthe processor to register
srcthe source socket of the request

If src is not nullptr, network notification of registration will be blocked for that destination.

◆ removeDataPool()

void tinc::TincProtocol::removeDataPool ( std::string  name,
al::Socket *  src = nullptr 
)

◆ removeDiskbuffer()

void tinc::TincProtocol::removeDiskbuffer ( std::string  name,
al::Socket *  src = nullptr 
)

◆ removeParameter()

void tinc::TincProtocol::removeParameter ( std::string  name,
std::string  group = "",
bool  invoked = false,
al::Socket *  src = nullptr 
)

◆ removeParameterSpace()

void tinc::TincProtocol::removeParameterSpace ( std::string  name,
al::Socket *  src = nullptr 
)

◆ removeProcessor()

void tinc::TincProtocol::removeProcessor ( std::string  name,
al::Socket *  src = nullptr 
)

◆ requestDataPools()

void tinc::TincProtocol::requestDataPools ( al::Socket *  dst)

◆ requestDiskBuffers()

void tinc::TincProtocol::requestDiskBuffers ( al::Socket *  dst)

◆ requestParameters()

void tinc::TincProtocol::requestParameters ( al::Socket *  dst)

◆ requestParameterSpaces()

void tinc::TincProtocol::requestParameterSpaces ( al::Socket *  dst)

◆ requestProcessors()

void tinc::TincProtocol::requestProcessors ( al::Socket *  dst)

◆ sendCommandErrorMessage()

bool tinc::TincProtocol::sendCommandErrorMessage ( uint64_t  commandId,
std::string  objectId,
std::string  errorMessage,
al::Socket *  src 
)
protected

◆ sendConfigureMessage() [1/5]

void tinc::TincProtocol::sendConfigureMessage ( DataPool p,
al::Socket *  dst,
al::Socket *  src = nullptr 
)
protected

◆ sendConfigureMessage() [2/5]

void tinc::TincProtocol::sendConfigureMessage ( DiskBufferAbstract p,
al::Socket *  dst,
al::Socket *  src = nullptr 
)
protected

◆ sendConfigureMessage() [3/5]

void tinc::TincProtocol::sendConfigureMessage ( ParameterSpace ps,
al::Socket *  dst,
al::Socket *  src = nullptr 
)
protected

◆ sendConfigureMessage() [4/5]

void tinc::TincProtocol::sendConfigureMessage ( ParameterSpaceDimension dim,
al::Socket *  dst,
al::Socket *  src = nullptr 
)
protected

◆ sendConfigureMessage() [5/5]

void tinc::TincProtocol::sendConfigureMessage ( Processor p,
al::Socket *  dst,
al::Socket *  src = nullptr 
)
protected

◆ sendConfigureParameterSpaceAddDimension()

void tinc::TincProtocol::sendConfigureParameterSpaceAddDimension ( ParameterSpace ps,
ParameterSpaceDimension dim,
al::Socket *  dst,
al::Socket *  src = nullptr 
)
protected

◆ sendConfigureParameterSpaceRemoveDimension()

void tinc::TincProtocol::sendConfigureParameterSpaceRemoveDimension ( ParameterSpace ps,
ParameterSpaceDimension dim,
al::Socket *  dst,
al::Socket *  src = nullptr 
)
protected

◆ sendProtobufMessage()

bool tinc::TincProtocol::sendProtobufMessage ( void *  message,
al::Socket *  dst 
)
protected

◆ sendRegisterMessage() [1/5]

void tinc::TincProtocol::sendRegisterMessage ( DataPool p,
al::Socket *  dst,
al::Socket *  src = nullptr 
)
protected

◆ sendRegisterMessage() [2/5]

void tinc::TincProtocol::sendRegisterMessage ( DiskBufferAbstract p,
al::Socket *  dst,
al::Socket *  src = nullptr 
)
protected

◆ sendRegisterMessage() [3/5]

void tinc::TincProtocol::sendRegisterMessage ( ParameterSpace ps,
al::Socket *  dst,
al::Socket *  src = nullptr 
)
protected

◆ sendRegisterMessage() [4/5]

void tinc::TincProtocol::sendRegisterMessage ( ParameterSpaceDimension dim,
al::Socket *  dst,
al::Socket *  src = nullptr 
)
protected

◆ sendRegisterMessage() [5/5]

void tinc::TincProtocol::sendRegisterMessage ( Processor p,
al::Socket *  dst,
al::Socket *  src = nullptr 
)
protected

◆ sendRemoveMessage()

void tinc::TincProtocol::sendRemoveMessage ( ParameterSpaceDimension dim,
al::Socket *  dst,
al::Socket *  src = nullptr 
)
protected

◆ sendTincMessage()

virtual bool tinc::TincProtocol::sendTincMessage ( void *  msg,
al::Socket *  dst = nullptr,
al::ValueSource *  src = nullptr 
)
inlineprotectedvirtual

sendTincMessage

Parameters
msgThe encoded message to send
dstthe socket to send meessage to. If nullptr send to all
srcinformation of source. If passed block sending to this location.
Returns
true on succesful send.

Reimplemented in tinc::TincServer, and tinc::TincClient.

Definition at line 394 of file TincProtocol.hpp.

◆ sendValueMessage() [1/9]

void tinc::TincProtocol::sendValueMessage ( al::Color  value,
std::string  fullAddress,
al::ValueSource *  src = nullptr 
)
protected

◆ sendValueMessage() [2/9]

void tinc::TincProtocol::sendValueMessage ( al::Pose  value,
std::string  fullAddress,
al::ValueSource *  src = nullptr 
)
protected

◆ sendValueMessage() [3/9]

void tinc::TincProtocol::sendValueMessage ( al::Vec3f  value,
std::string  fullAddress,
al::ValueSource *  src = nullptr 
)
protected

◆ sendValueMessage() [4/9]

void tinc::TincProtocol::sendValueMessage ( al::Vec4f  value,
std::string  fullAddress,
al::ValueSource *  src = nullptr 
)
protected

◆ sendValueMessage() [5/9]

void tinc::TincProtocol::sendValueMessage ( bool  value,
std::string  fullAddress,
al::ValueSource *  src = nullptr 
)
protected

◆ sendValueMessage() [6/9]

void tinc::TincProtocol::sendValueMessage ( float  value,
std::string  fullAddress,
al::ValueSource *  src = nullptr 
)
protected

◆ sendValueMessage() [7/9]

void tinc::TincProtocol::sendValueMessage ( int32_t  value,
std::string  fullAddress,
al::ValueSource *  src = nullptr 
)
protected

◆ sendValueMessage() [8/9]

void tinc::TincProtocol::sendValueMessage ( std::string  value,
std::string  fullAddress,
al::ValueSource *  src = nullptr 
)
protected

◆ sendValueMessage() [9/9]

void tinc::TincProtocol::sendValueMessage ( uint64_t  value,
std::string  fullAddress,
al::ValueSource *  src = nullptr 
)
protected

◆ setRootMapEntry()

void tinc::TincProtocol::setRootMapEntry ( std::string  serverPath,
std::string  clientPath,
std::string  host = "" 
)
inline

setRootMapEntry

Parameters
serverPath
clientPath
hostThis function is only generally useful if set for the server.

Definition at line 248 of file TincProtocol.hpp.

◆ setVerbose()

void tinc::TincProtocol::setVerbose ( bool  v)
inline

Definition at line 232 of file TincProtocol.hpp.

Member Data Documentation

◆ barrierWaitGranularTimeMs

int tinc::TincProtocol::barrierWaitGranularTimeMs = 20
protected

Definition at line 414 of file TincProtocol.hpp.

◆ mBusyCount

uint32_t tinc::TincProtocol::mBusyCount = 0
protected

Definition at line 417 of file TincProtocol.hpp.

◆ mBusyCountLock

std::mutex tinc::TincProtocol::mBusyCountLock
protected

Definition at line 416 of file TincProtocol.hpp.

◆ mClientHostnames

std::map<al::Socket *, std::string> tinc::TincProtocol::mClientHostnames
protected

Definition at line 422 of file TincProtocol.hpp.

◆ mDataPools

std::vector<DataPool *> tinc::TincProtocol::mDataPools
protected

Definition at line 405 of file TincProtocol.hpp.

◆ mDiskBuffers

std::vector<DiskBufferAbstract *> tinc::TincProtocol::mDiskBuffers
protected

Definition at line 404 of file TincProtocol.hpp.

◆ mLocalDBs

std::vector<std::shared_ptr<DiskBufferAbstract> > tinc::TincProtocol::mLocalDBs
protected

Definition at line 410 of file TincProtocol.hpp.

◆ mLocalDPs

std::vector<std::shared_ptr<DataPool> > tinc::TincProtocol::mLocalDPs
protected

Definition at line 411 of file TincProtocol.hpp.

◆ mLocalPSDs

std::vector<std::shared_ptr<ParameterSpaceDimension> > tinc::TincProtocol::mLocalPSDs
protected

Definition at line 408 of file TincProtocol.hpp.

◆ mLocalPSs

std::vector<std::shared_ptr<ParameterSpace> > tinc::TincProtocol::mLocalPSs
protected

Definition at line 409 of file TincProtocol.hpp.

◆ mParameterSpaceDimensions

std::vector<ParameterSpaceDimension *> tinc::TincProtocol::mParameterSpaceDimensions
protected

Definition at line 401 of file TincProtocol.hpp.

◆ mParameterSpaces

std::vector<ParameterSpace *> tinc::TincProtocol::mParameterSpaces
protected

Definition at line 402 of file TincProtocol.hpp.

◆ mPongLock

std::mutex tinc::TincProtocol::mPongLock
protected

Definition at line 426 of file TincProtocol.hpp.

◆ mPongsReceived

std::map<al::Socket *, std::vector<uint64_t> > tinc::TincProtocol::mPongsReceived
protected

Definition at line 425 of file TincProtocol.hpp.

◆ mProcessors

std::vector<Processor *> tinc::TincProtocol::mProcessors
protected

Definition at line 403 of file TincProtocol.hpp.

◆ mRootPathMap

std::map<std::string, std::vector<std::pair<std::string, std::string> > > tinc::TincProtocol::mRootPathMap
protected

Definition at line 421 of file TincProtocol.hpp.

◆ mVerbose

bool tinc::TincProtocol::mVerbose {false}
protected

Definition at line 428 of file TincProtocol.hpp.


The documentation for this class was generated from the following file: