mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Message: Create a type system so non-frame data can be represented
This change breaks existing code, hence the version bump, but it's going to be much less error prone going forward.
This commit is contained in:
@@ -11,13 +11,18 @@ namespace icsneo {
|
||||
|
||||
class VersionMessage : public Message {
|
||||
public:
|
||||
VersionMessage(bool main) : MainChip(main) { network = Network::NetID::Main51; }
|
||||
enum Chip : uint8_t {
|
||||
MainChip,
|
||||
SecondaryChips
|
||||
};
|
||||
|
||||
// If true, the included version is for the main chip
|
||||
const bool MainChip;
|
||||
VersionMessage(Chip chip) : Message(Message::Type::DeviceVersion), ForChip(chip) {}
|
||||
|
||||
// nullopt here indicates invalid
|
||||
std::vector< optional<DeviceAppVersion> > Versions;
|
||||
|
||||
// What chips the versions are for
|
||||
const Chip ForChip;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user