scanner_reply_serialization_deserialization.h
Go to the documentation of this file.
1 // Copyright (c) 2020-2021 Pilz GmbH & Co. KG
2 //
3 // This program is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU Lesser General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public License
14 // along with this program. If not, see <https://www.gnu.org/licenses/>.
15 #ifndef PSEN_SCAN_V2_STANDALONE_SCANNER_REPLY_SERIALIZATION_DESERIALIZATION_H
16 #define PSEN_SCAN_V2_STANDALONE_SCANNER_REPLY_SERIALIZATION_DESERIALIZATION_H
17 
18 #include <cstdint>
19 #include <stdexcept>
20 #include <string>
21 #include <sstream>
22 
25 
27 {
28 namespace data_conversion_layer
29 {
30 namespace scanner_reply
31 {
36 class CRCMismatch : public std::runtime_error
37 {
38 public:
39  CRCMismatch(const std::string& msg = "CRC did not match!");
40 };
41 
43 
44 RawData serialize(const Message& reply);
45 RawData serialize(const uint32_t op_code, const uint32_t res_code);
46 
47 } // namespace scanner_reply
48 } // namespace data_conversion_layer
49 } // namespace psen_scan_v2_standalone
50 #endif // PSEN_SCAN_V2_STANDALONE_SCANNER_REPLY_SERIALIZATION_DESERIALIZATION_H
Root namespace in which the software components to communicate with the scanner (firmware-version: 2)...
Definition: udp_client.h:41
Exception thrown if an incorrect CRC is detected during deserialization of a data_conversion_layer::s...
Higher level data type representing a reply message from the scanner.


psen_scan_v2
Author(s): Pilz GmbH + Co. KG
autogenerated on Sat Nov 5 2022 02:13:36