ChimeraTK-DeviceAccess  03.18.00
DummyProtocolImplementor.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 <cstdint>
6 #include <vector>
7 
10  virtual void singleWordWrite(std::vector<uint32_t>& buffer) = 0;
11  virtual void multiWordRead(std::vector<uint32_t>& buffer) = 0;
12  // returns a new state: it might be that the next packet is still from the
13  // same write operation, so we are not ready for a new command.
14  virtual uint32_t multiWordWrite(std::vector<uint32_t>& buffer) = 0;
15  virtual uint32_t continueMultiWordWrite(std::vector<uint32_t>& buffer) = 0;
16 
17  virtual void hello(std::vector<uint32_t>& buffer) = 0;
18  virtual void ping(std::vector<uint32_t>& buffer) = 0;
20  virtual uint32_t protocolVersion() const = 0;
21 
22  virtual ~DummyProtocolImplementor() = default;
23 };
DummyProtocolImplementor::multiWordWrite
virtual uint32_t multiWordWrite(std::vector< uint32_t > &buffer)=0
DummyProtocolImplementor::continueMultiWordWrite
virtual uint32_t continueMultiWordWrite(std::vector< uint32_t > &buffer)=0
DummyProtocolImplementor
Only put commands which don't exist in all versions, or behave differently.
Definition: DummyProtocolImplementor.h:9
DummyProtocolImplementor::hello
virtual void hello(std::vector< uint32_t > &buffer)=0
DummyProtocolImplementor::ping
virtual void ping(std::vector< uint32_t > &buffer)=0
DummyProtocolImplementor::singleWordWrite
virtual void singleWordWrite(std::vector< uint32_t > &buffer)=0
DummyProtocolImplementor::~DummyProtocolImplementor
virtual ~DummyProtocolImplementor()=default
DummyProtocolImplementor::protocolVersion
virtual uint32_t protocolVersion() const =0
implement this for EVERY protocol version
DummyProtocolImplementor::multiWordRead
virtual void multiWordRead(std::vector< uint32_t > &buffer)=0