mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Device: Add sendSPIPortKeyOperation()
This commit is contained in:
committed by
Kyle Schwarz
parent
78c2e3ff89
commit
1dda9f5412
@@ -48,6 +48,7 @@ public:
|
||||
NetworkMutex = 0x8016,
|
||||
ClientId = 0x8017,
|
||||
AllMACAddresses = 0x8018,
|
||||
SPIPortKeyOperation = 0x8019,
|
||||
};
|
||||
|
||||
Message(Type t) : type(t) {}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
#ifndef __SPIPORTKEYMESSAGE_H_
|
||||
#define __SPIPORTKEYMESSAGE_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "icsneo/communication/message/message.h"
|
||||
|
||||
#include <array>
|
||||
#include <memory>
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
class SPIPortKeyMessage : public Message {
|
||||
public:
|
||||
enum class Operation : uint8_t {
|
||||
WriteKey = 0,
|
||||
IsKeySet = 1,
|
||||
ClearKey = 2
|
||||
};
|
||||
|
||||
#pragma pack(push, 2)
|
||||
struct SPIPortKeyPacket
|
||||
{
|
||||
Operation op;
|
||||
uint8_t portIndex;
|
||||
bool isKeyLoaded;
|
||||
uint8_t rsvd;
|
||||
uint8_t key[16];
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
static std::shared_ptr<SPIPortKeyMessage> DecodeToMessage(const std::vector<uint8_t>& bytestream);
|
||||
|
||||
SPIPortKeyMessage() : Message(Type::SPIPortKeyOperation) {}
|
||||
|
||||
bool isKeyLoaded;
|
||||
};
|
||||
|
||||
} // namespace icsneo
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // __SPIPORTKEYMESSAGE_H_
|
||||
Reference in New Issue
Block a user