mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
LiveData: Initial implementation
Add support for live data subscription via Device::subscribeLiveData() and Device::unsubscribeLiveData(). The live data API can be used to subscribe to individual "signals", a full list of which can be found in LiveDataValueType.
This commit is contained in:
committed by
Kyle Schwarz
parent
018f1fac8e
commit
8d704b1bbb
@@ -35,7 +35,9 @@
|
||||
#include "icsneo/communication/message/supportedfeaturesmessage.h"
|
||||
#include "icsneo/communication/message/genericbinarystatusmessage.h"
|
||||
#include "icsneo/communication/message/extendeddatamessage.h"
|
||||
#include "icsneo/communication/message/livedatamessage.h"
|
||||
#include "icsneo/communication/packet/genericbinarystatuspacket.h"
|
||||
#include "icsneo/communication/packet/livedatapacket.h"
|
||||
#include "icsneo/device/extensions/flexray/controller.h"
|
||||
#include "icsneo/communication/message/flexray/control/flexraycontrolmessage.h"
|
||||
#include "icsneo/communication/message/ethphymessage.h"
|
||||
@@ -561,6 +563,9 @@ public:
|
||||
*/
|
||||
virtual bool supportsWiVI() const { return false; }
|
||||
|
||||
// Returns true if this device supports Live Data subscription
|
||||
virtual bool supportsLiveData() const { return false; }
|
||||
|
||||
std::optional<EthPhyMessage> sendEthPhyMsg(const EthPhyMessage& message, std::chrono::milliseconds timeout = std::chrono::milliseconds(50));
|
||||
|
||||
std::optional<bool> SetCollectionUploaded(uint32_t collectionEntryByteAddress);
|
||||
@@ -570,6 +575,9 @@ public:
|
||||
|
||||
std::optional<size_t> getGenericBinarySize(uint16_t binaryIndex);
|
||||
bool readBinaryFile(std::ostream& stream, uint16_t binaryIndex);
|
||||
bool subscribeLiveData(std::shared_ptr<LiveDataCommandMessage> message);
|
||||
bool unsubscribeLiveData(const LiveDataHandle& handle);
|
||||
bool clearAllLiveData();
|
||||
|
||||
protected:
|
||||
bool online = false;
|
||||
|
||||
@@ -75,6 +75,8 @@ protected:
|
||||
|
||||
bool supportsWiVI() const override { return true; }
|
||||
|
||||
bool supportsLiveData() const override { return true; }
|
||||
|
||||
std::optional<MemoryAddress> getCoreminiStartAddressFlash() const override {
|
||||
return 33*1024*1024;
|
||||
}
|
||||
|
||||
@@ -60,6 +60,8 @@ protected:
|
||||
|
||||
bool supportsWiVI() const override { return true; }
|
||||
|
||||
bool supportsLiveData() const override { return true; }
|
||||
|
||||
std::optional<MemoryAddress> getCoreminiStartAddressFlash() const override {
|
||||
return 33*1024*1024;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user