ChimeraTK-DeviceAccess  03.18.00
RebotProtocolDefinitions.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 
7 namespace ChimeraTK::Rebot {
8 
9  static const int READ_BLOCK_SIZE = 361;
10  static const int32_t HELLO_TOKEN = 0x00000004;
11  static const uint32_t LENGTH_OF_HELLO_TOKEN_MESSAGE = 3; // 3 words
12  static const int32_t MAGIC_WORD = 0x72626f74; // rbot in ascii.. start from msb
13 
14  static const int32_t SINGLE_WORD_READ = 0;
15  static const int32_t SINGLE_WORD_WRITE = 1;
16  static const int32_t MULTI_WORD_WRITE = 2;
17  static const int32_t MULTI_WORD_READ = 3;
18  static const int32_t PING = 5;
19  static const int32_t SET_SESSION_TIMEOUT = 6;
20 
21  // Most Significant 16 bits == major version
22  // Least Significant 16 bits == minor version
23  static const int32_t CLIENT_PROTOCOL_VERSION = 0x00000001;
24 
25  static const int32_t READ_ACK = 1000;
26  static const int32_t WRITE_ACK = 1001;
27  static const int32_t PONG = 1005;
28  static const int32_t TOO_MUCH_DATA = -1010; // FIXME: use unsigned
29  static const int32_t UNKNOWN_INSTRUCTION = -1040; // FIXME: use unsigned
30 
31  static const unsigned int DEFAULT_SERVER_PORT = 5001;
32  static const int32_t DEFAULT_CONNECTION_TIMEOUT = 10000; // 10 seconds
33 
34 } // namespace ChimeraTK::Rebot
ChimeraTK::Rebot
Definition: RebotBackend.h:26