Device: Implement version handling

This commit is contained in:
Paul Hollinsky
2021-05-05 02:17:38 -04:00
parent 8be3bbaee5
commit 595cc36545
12 changed files with 183 additions and 1 deletions
@@ -0,0 +1,27 @@
#ifndef __VERSIONMESSAGE_H_
#define __VERSIONMESSAGE_H_
#ifdef __cplusplus
#include "icsneo/communication/message/message.h"
#include "icsneo/device/deviceversion.h"
#include "icsneo/platform/optional.h"
namespace icsneo {
class VersionMessage : public Message {
public:
VersionMessage(bool main) : MainChip(main) { network = Network::NetID::Main51; }
// If true, the included version is for the main chip
const bool MainChip;
// nullopt here indicates invalid
std::vector< optional<DeviceAppVersion> > Versions;
};
}
#endif // __cplusplus
#endif