mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Device: RADMoon2ZL: Add TC10 commands
This commit is contained in:
@@ -50,6 +50,7 @@ public:
|
||||
Timeout = 0x1014,
|
||||
WiVINotSupported = 0x1015,
|
||||
RestrictedEntryFlag = 0x1016,
|
||||
NotSupported = 0x1017,
|
||||
|
||||
// Device Events
|
||||
PollingMessageOverflow = 0x2000,
|
||||
|
||||
@@ -56,6 +56,9 @@ enum class ExtendedCommand : uint16_t {
|
||||
SetRootFSEntryFlags = 0x0027,
|
||||
GenericBinaryInfo = 0x0030,
|
||||
LiveData = 0x0035,
|
||||
RequestTC10Wake = 0x003D,
|
||||
RequestTC10Sleep = 0x003E,
|
||||
GetTC10Status = 0x003F,
|
||||
};
|
||||
|
||||
enum class ExtendedResponse : int32_t {
|
||||
|
||||
@@ -38,7 +38,8 @@ public:
|
||||
SupportedFeatures = 0x800d,
|
||||
GenericBinaryStatus = 0x800e,
|
||||
LiveData = 0x800f,
|
||||
HardwareInfo = 0x8010
|
||||
HardwareInfo = 0x8010,
|
||||
TC10Status = 0x8011,
|
||||
};
|
||||
|
||||
Message(Type t) : type(t) {}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#ifndef __TC10STATUSMESSAGE_H
|
||||
#define __TC10STATUSMESSAGE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "icsneo/communication/message/message.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace icsneo
|
||||
{
|
||||
|
||||
enum class TC10WakeStatus : uint8_t {
|
||||
NoWakeReceived,
|
||||
WakeReceived,
|
||||
};
|
||||
|
||||
enum class TC10SleepStatus : uint8_t {
|
||||
NoSleepReceived,
|
||||
SleepReceived,
|
||||
SleepFailed,
|
||||
SleepAborted,
|
||||
};
|
||||
|
||||
class TC10StatusMessage : public Message {
|
||||
public:
|
||||
static std::shared_ptr<TC10StatusMessage> DecodeToMessage(const std::vector<uint8_t>& bytestream);
|
||||
|
||||
TC10StatusMessage(const TC10WakeStatus& wakeStatus, const TC10SleepStatus& sleepStatus) :
|
||||
Message(Type::TC10Status), wakeStatus(wakeStatus), sleepStatus(sleepStatus) {}
|
||||
|
||||
const TC10WakeStatus wakeStatus;
|
||||
const TC10SleepStatus sleepStatus;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "icsneo/communication/message/hardwareinfo.h"
|
||||
#include "icsneo/communication/message/extendeddatamessage.h"
|
||||
#include "icsneo/communication/message/livedatamessage.h"
|
||||
#include "icsneo/communication/message/tc10statusmessage.h"
|
||||
#include "icsneo/communication/packet/genericbinarystatuspacket.h"
|
||||
#include "icsneo/communication/packet/livedatapacket.h"
|
||||
#include "icsneo/device/extensions/flexray/controller.h"
|
||||
@@ -722,6 +723,14 @@ public:
|
||||
|
||||
virtual bool supportsComponentVersions() const { return false; }
|
||||
|
||||
virtual bool supportsTC10() const { return false; }
|
||||
|
||||
bool requestTC10Wake(Network::NetID network);
|
||||
|
||||
bool requestTC10Sleep(Network::NetID network);
|
||||
|
||||
std::optional<TC10StatusMessage> getTC10Status(Network::NetID network);
|
||||
|
||||
protected:
|
||||
bool online = false;
|
||||
int messagePollingCallbackID = 0;
|
||||
|
||||
@@ -18,6 +18,8 @@ public:
|
||||
|
||||
bool supportsComponentVersions() const override { return true; }
|
||||
|
||||
bool supportsTC10() const override { return true; }
|
||||
|
||||
protected:
|
||||
RADMoon2ZL(neodevice_t neodevice, const driver_factory_t& makeDriver) : RADMoon2Base(neodevice) {
|
||||
initialize<RADMoon2Settings>(makeDriver);
|
||||
|
||||
Reference in New Issue
Block a user