ChimeraTK-DeviceAccess  03.18.00
DummyProtocol0.cc
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Deutsches Elektronen-Synchrotron DESY, MSK, ChimeraTK Project <chimeratk-support@desy.de>
2 // SPDX-License-Identifier: LGPL-3.0-or-later
3 
4 #include "DummyProtocol0.h"
5 
6 #include "RebotDummyServer.h"
7 
8 namespace ChimeraTK {
9 
10  DummyProtocol0::DummyProtocol0(RebotDummySession& parent) : _parent(parent) {}
11 
12  void DummyProtocol0::singleWordWrite(std::vector<uint32_t>& buffer) {
14  // if writeWordToRequestedAddress dosent throw, we can safely assume
15  // write was a success
17  }
18 
19  void DummyProtocol0::multiWordRead(std::vector<uint32_t>& buffer) {
20  uint32_t numberOfWordsToRead = buffer.at(2);
21 
22  if(numberOfWordsToRead > 361) { // not supported
24  }
25  else {
27  }
28  }
29 
30  uint32_t DummyProtocol0::multiWordWrite(std::vector<uint32_t>& /*buffer*/) {
33  }
34 
35  uint32_t DummyProtocol0::continueMultiWordWrite(std::vector<uint32_t>& /*buffer*/) {
36  // we never should end here. Don't do anything
38  }
39 
40  void DummyProtocol0::hello(std::vector<uint32_t>& /*buffer*/) {
42  }
43 
44  void DummyProtocol0::ping(std::vector<uint32_t>& /*buffer*/) {
46  }
47 
48 } // namespace ChimeraTK
RebotDummyServer.h
ChimeraTK::DummyProtocol0::DummyProtocol0
DummyProtocol0(RebotDummySession &parent)
Definition: DummyProtocol0.cc:10
ChimeraTK::RebotDummySession
Definition: RebotDummyServer.h:24
ChimeraTK::DummyProtocol0::_parent
RebotDummySession & _parent
Definition: DummyProtocol0.h:25
ChimeraTK::DummyProtocol0::multiWordRead
virtual void multiWordRead(std::vector< uint32_t > &buffer) override
Definition: DummyProtocol0.cc:19
ChimeraTK::DummyProtocol0::hello
virtual void hello(std::vector< uint32_t > &buffer) override
Definition: DummyProtocol0.cc:40
ChimeraTK::RebotDummySession::TOO_MUCH_DATA_REQUESTED
static const int32_t TOO_MUCH_DATA_REQUESTED
Definition: RebotDummyServer.h:40
ChimeraTK::RebotDummySession::sendSingleWord
void sendSingleWord(int32_t response)
Definition: RebotDummyServer.cc:158
ChimeraTK::DummyProtocol0::singleWordWrite
virtual void singleWordWrite(std::vector< uint32_t > &buffer) override
Definition: DummyProtocol0.cc:12
ChimeraTK::RebotDummySession::UNKNOWN_INSTRUCTION
static const int32_t UNKNOWN_INSTRUCTION
Definition: RebotDummyServer.h:41
ChimeraTK::RebotDummySession::WRITE_SUCCESS_INDICATION
static const int32_t WRITE_SUCCESS_INDICATION
Definition: RebotDummyServer.h:38
ChimeraTK::RebotDummySession::ACCEPT_NEW_COMMAND
static const uint32_t ACCEPT_NEW_COMMAND
Definition: RebotDummyServer.h:51
ChimeraTK::RebotDummySession::writeWordToRequestedAddress
void writeWordToRequestedAddress(std::vector< uint32_t > &buffer)
Definition: RebotDummyServer.cc:119
ChimeraTK::DummyProtocol0::continueMultiWordWrite
virtual uint32_t continueMultiWordWrite(std::vector< uint32_t > &buffer) override
Definition: DummyProtocol0.cc:35
DummyProtocol0.h
ChimeraTK::DummyProtocol0::multiWordWrite
virtual uint32_t multiWordWrite(std::vector< uint32_t > &buffer) override
Definition: DummyProtocol0.cc:30
ChimeraTK::DummyProtocol0::ping
virtual void ping(std::vector< uint32_t > &buffer) override
Definition: DummyProtocol0.cc:44
ChimeraTK
Definition: DummyBackend.h:16
ChimeraTK::RebotDummySession::readRegisterAndSendData
void readRegisterAndSendData(std::vector< uint32_t > &buffer)
Definition: RebotDummyServer.cc:132