ChimeraTK-DeviceAccess  03.18.00
DummyProtocol1.h
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 #pragma once
4 
5 #include "DummyProtocol0.h"
6 
7 namespace ChimeraTK {
8 
9  class RebotDummySession;
10 
12  struct DummyProtocol1 : public DummyProtocol0 {
14 
16  void multiWordRead(std::vector<uint32_t>& buffer) override;
17 
19  uint32_t multiWordWrite(std::vector<uint32_t>& buffer) override;
20  uint32_t continueMultiWordWrite(std::vector<uint32_t>& buffer) override;
21 
23  void hello(std::vector<uint32_t>& buffer) override;
24 
25  uint32_t protocolVersion() const override { return 1; }
26 
27  // part of the multi word write across many packets
29  uint32_t _nWordsLeft;
30 
31  static const uint64_t BAR = 0;
32  };
33 
34 } // namespace ChimeraTK
ChimeraTK::RebotDummySession
Definition: RebotDummyServer.h:24
ChimeraTK::DummyProtocol1::_nextAddressInWords
uint32_t _nextAddressInWords
Definition: DummyProtocol1.h:28
ChimeraTK::DummyProtocol1::hello
void hello(std::vector< uint32_t > &buffer) override
First protocol version that implements hello.
Definition: DummyProtocol1.cc:19
ChimeraTK::DummyProtocol0
Only put commands which don't exist in all versions, or behave differently.
Definition: DummyProtocol0.h:12
ChimeraTK::DummyProtocol1::multiWordRead
void multiWordRead(std::vector< uint32_t > &buffer) override
The multi word read is not limited in the size any more.
Definition: DummyProtocol1.cc:15
ChimeraTK::DummyProtocol1::_nWordsLeft
uint32_t _nWordsLeft
Definition: DummyProtocol1.h:29
ChimeraTK::DummyProtocol1::DummyProtocol1
DummyProtocol1(RebotDummySession &parent)
Definition: DummyProtocol1.cc:12
ChimeraTK::DummyProtocol1::multiWordWrite
uint32_t multiWordWrite(std::vector< uint32_t > &buffer) override
First protocol version that implements hello.
Definition: DummyProtocol1.cc:26
ChimeraTK::DummyProtocol1::protocolVersion
uint32_t protocolVersion() const override
implement this for EVERY protocol version
Definition: DummyProtocol1.h:25
ChimeraTK::DummyProtocol1::continueMultiWordWrite
uint32_t continueMultiWordWrite(std::vector< uint32_t > &buffer) override
Definition: DummyProtocol1.cc:49
DummyProtocol0.h
ChimeraTK::DummyProtocol1
Only put commands which don't exist in all versions, or behave differently.
Definition: DummyProtocol1.h:12
ChimeraTK::DummyProtocol1::BAR
static const uint64_t BAR
Definition: DummyProtocol1.h:31
ChimeraTK
Definition: DummyBackend.h:16