ChimeraTK-DeviceAccess  03.18.00
ChimeraTK::RebotDummySession Class Reference

#include <RebotDummyServer.h>

+ Inheritance diagram for ChimeraTK::RebotDummySession:
+ Collaboration diagram for ChimeraTK::RebotDummySession:

Public Member Functions

 RebotDummySession (unsigned int protocolVersion, ip::tcp::socket socket, std::shared_ptr< DummyBackend > regsiterSpace)
 
void start ()
 
virtual ~RebotDummySession ()
 
void processReceivedPackage (std::vector< uint32_t > &buffer)
 
void writeWordToRequestedAddress (std::vector< uint32_t > &buffer)
 
void readRegisterAndSendData (std::vector< uint32_t > &buffer)
 
void sendSingleWord (int32_t response)
 
void acceptHandler (const boost::system::error_code &error)
 
void doRead ()
 
void doWrite ()
 
void write (std::vector< uint32_t > data)
 

Public Attributes

uint32_t _state
 
std::atomic< uint32_t > _heartbeatCount
 
std::atomic< uint32_t > _helloCount
 
std::atomic< bool > _dont_answer
 
std::shared_ptr< DummyBackend_registerSpace
 
std::vector< uint32_t > _dataBuffer
 
unsigned int _serverPort
 
unsigned int _protocolVersion
 
ip::tcp::socket _currentClientConnection
 
std::unique_ptr< DummyProtocolImplementor_protocolImplementor
 

Static Public Attributes

static const int BUFFER_SIZE_IN_WORDS = 256
 
static const int32_t READ_SUCCESS_INDICATION = 1000
 
static const int32_t WRITE_SUCCESS_INDICATION = 1001
 
static const uint32_t PONG = 1005
 
static const int32_t TOO_MUCH_DATA_REQUESTED = -1010
 
static const int32_t UNKNOWN_INSTRUCTION = -1040
 
static const uint32_t SINGLE_WORD_WRITE = 1
 
static const uint32_t MULTI_WORD_WRITE = 2
 
static const uint32_t MULTI_WORD_READ = 3
 
static const uint32_t HELLO = 4
 
static const uint32_t PING = 5
 
static const uint32_t REBOT_MAGIC_WORD = 0x72626f74
 
static const uint32_t ACCEPT_NEW_COMMAND = 1
 
static const uint32_t INSIDE_MULTI_WORD_WRITE = 2
 

Detailed Description

Definition at line 24 of file RebotDummyServer.h.

Constructor & Destructor Documentation

◆ RebotDummySession()

ChimeraTK::RebotDummySession::RebotDummySession ( unsigned int  protocolVersion,
ip::tcp::socket  socket,
std::shared_ptr< DummyBackend regsiterSpace 
)

Definition at line 18 of file RebotDummyServer.cc.

◆ ~RebotDummySession()

ChimeraTK::RebotDummySession::~RebotDummySession ( )
virtual

Definition at line 164 of file RebotDummyServer.cc.

Member Function Documentation

◆ acceptHandler()

void ChimeraTK::RebotDummySession::acceptHandler ( const boost::system::error_code &  error)

◆ doRead()

void ChimeraTK::RebotDummySession::doRead ( )

Definition at line 39 of file RebotDummyServer.cc.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doWrite()

void ChimeraTK::RebotDummySession::doWrite ( )

Definition at line 55 of file RebotDummyServer.cc.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processReceivedPackage()

void ChimeraTK::RebotDummySession::processReceivedPackage ( std::vector< uint32_t > &  buffer)

Definition at line 77 of file RebotDummyServer.cc.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readRegisterAndSendData()

void ChimeraTK::RebotDummySession::readRegisterAndSendData ( std::vector< uint32_t > &  buffer)

Definition at line 132 of file RebotDummyServer.cc.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sendSingleWord()

void ChimeraTK::RebotDummySession::sendSingleWord ( int32_t  response)

Definition at line 158 of file RebotDummyServer.cc.

+ Here is the caller graph for this function:

◆ start()

void ChimeraTK::RebotDummySession::start ( )

Definition at line 35 of file RebotDummyServer.cc.

+ Here is the call graph for this function:

◆ write()

void ChimeraTK::RebotDummySession::write ( std::vector< uint32_t >  data)

Definition at line 152 of file RebotDummyServer.cc.

+ Here is the caller graph for this function:

◆ writeWordToRequestedAddress()

void ChimeraTK::RebotDummySession::writeWordToRequestedAddress ( std::vector< uint32_t > &  buffer)

Definition at line 119 of file RebotDummyServer.cc.

+ Here is the caller graph for this function:

Member Data Documentation

◆ _currentClientConnection

ip::tcp::socket ChimeraTK::RebotDummySession::_currentClientConnection

Definition at line 67 of file RebotDummyServer.h.

◆ _dataBuffer

std::vector<uint32_t> ChimeraTK::RebotDummySession::_dataBuffer

Definition at line 63 of file RebotDummyServer.h.

◆ _dont_answer

std::atomic<bool> ChimeraTK::RebotDummySession::_dont_answer

Definition at line 61 of file RebotDummyServer.h.

◆ _heartbeatCount

std::atomic<uint32_t> ChimeraTK::RebotDummySession::_heartbeatCount

Definition at line 58 of file RebotDummyServer.h.

◆ _helloCount

std::atomic<uint32_t> ChimeraTK::RebotDummySession::_helloCount

Definition at line 59 of file RebotDummyServer.h.

◆ _protocolImplementor

std::unique_ptr<DummyProtocolImplementor> ChimeraTK::RebotDummySession::_protocolImplementor

Definition at line 68 of file RebotDummyServer.h.

◆ _protocolVersion

unsigned int ChimeraTK::RebotDummySession::_protocolVersion

Definition at line 66 of file RebotDummyServer.h.

◆ _registerSpace

std::shared_ptr<DummyBackend> ChimeraTK::RebotDummySession::_registerSpace

Definition at line 62 of file RebotDummyServer.h.

◆ _serverPort

unsigned int ChimeraTK::RebotDummySession::_serverPort

Definition at line 65 of file RebotDummyServer.h.

◆ _state

uint32_t ChimeraTK::RebotDummySession::_state

Definition at line 56 of file RebotDummyServer.h.

◆ ACCEPT_NEW_COMMAND

const uint32_t ChimeraTK::RebotDummySession::ACCEPT_NEW_COMMAND = 1
static

Definition at line 51 of file RebotDummyServer.h.

◆ BUFFER_SIZE_IN_WORDS

const int ChimeraTK::RebotDummySession::BUFFER_SIZE_IN_WORDS = 256
static

Definition at line 36 of file RebotDummyServer.h.

◆ HELLO

const uint32_t ChimeraTK::RebotDummySession::HELLO = 4
static

Definition at line 46 of file RebotDummyServer.h.

◆ INSIDE_MULTI_WORD_WRITE

const uint32_t ChimeraTK::RebotDummySession::INSIDE_MULTI_WORD_WRITE = 2
static

Definition at line 53 of file RebotDummyServer.h.

◆ MULTI_WORD_READ

const uint32_t ChimeraTK::RebotDummySession::MULTI_WORD_READ = 3
static

Definition at line 45 of file RebotDummyServer.h.

◆ MULTI_WORD_WRITE

const uint32_t ChimeraTK::RebotDummySession::MULTI_WORD_WRITE = 2
static

Definition at line 44 of file RebotDummyServer.h.

◆ PING

const uint32_t ChimeraTK::RebotDummySession::PING = 5
static

Definition at line 47 of file RebotDummyServer.h.

◆ PONG

const uint32_t ChimeraTK::RebotDummySession::PONG = 1005
static

Definition at line 39 of file RebotDummyServer.h.

◆ READ_SUCCESS_INDICATION

const int32_t ChimeraTK::RebotDummySession::READ_SUCCESS_INDICATION = 1000
static

Definition at line 37 of file RebotDummyServer.h.

◆ REBOT_MAGIC_WORD

const uint32_t ChimeraTK::RebotDummySession::REBOT_MAGIC_WORD = 0x72626f74
static

Definition at line 48 of file RebotDummyServer.h.

◆ SINGLE_WORD_WRITE

const uint32_t ChimeraTK::RebotDummySession::SINGLE_WORD_WRITE = 1
static

Definition at line 43 of file RebotDummyServer.h.

◆ TOO_MUCH_DATA_REQUESTED

const int32_t ChimeraTK::RebotDummySession::TOO_MUCH_DATA_REQUESTED = -1010
static

Definition at line 40 of file RebotDummyServer.h.

◆ UNKNOWN_INSTRUCTION

const int32_t ChimeraTK::RebotDummySession::UNKNOWN_INSTRUCTION = -1040
static

Definition at line 41 of file RebotDummyServer.h.

◆ WRITE_SUCCESS_INDICATION

const int32_t ChimeraTK::RebotDummySession::WRITE_SUCCESS_INDICATION = 1001
static

Definition at line 38 of file RebotDummyServer.h.


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