LibMultiSense
LibMultiSense Documentation
Loading...
Searching...
No Matches
SysFlashResponseMessage.hh
Go to the documentation of this file.
1
40#ifndef LibMultiSense_SysFlashResponseMessage
41#define LibMultiSense_SysFlashResponseMessage
42
44
45namespace crl {
46namespace multisense {
47namespace details {
48namespace wire {
49
51public:
54
55 //
56 // Parameters representing the desired flash operation
57
58 static CRL_CONSTEXPR uint32_t STATUS_IDLE = 0;// no operation in progress or requested
59 static CRL_CONSTEXPR uint32_t STATUS_SUCCESS = 1;// requested operation succeeded/started
60 static CRL_CONSTEXPR uint32_t STATUS_FAILURE = 2;// requested operation failed
61 static CRL_CONSTEXPR uint32_t STATUS_ERASE_IN_PROGRESS = 3;// operation not possible
62
63 uint32_t status;
64
65 //
66 // Only for ERASE_IN_PROGRESS status
67
69
70 //
71 // Constructors
72
75
76 //
77 // Serialization routine
78
79 template<class Archive>
80 void serialize(Archive& message,
81 const VersionType version)
82 {
83 (void) version;
84 message & status;
85 message & erase_progress;
86
87 switch(status) {
88 case STATUS_IDLE:
89 case STATUS_SUCCESS:
90 case STATUS_FAILURE:
92 break;
93 default:
94 CRL_EXCEPTION("unknown status (%d)", (int)status);
95 }
96 }
97};
98
99}}}} // namespaces
100
101#endif
#define CRL_EXCEPTION(fmt,...)
Definition Exception.hh:85
Macros and symbols to help portability between different compiler versions.
#define CRL_CONSTEXPR
void serialize(Archive &message, const VersionType version)
SysFlashResponse(utility::BufferStreamReader &r, VersionType v)
static CRL_CONSTEXPR IdType ID_DATA_SYS_FLASH_RESPONSE
Definition Protocol.hh:212