mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Device: Refactor ComponentVersions
Also: - Add setGenericData() - Add ExtendedResponseFilter
This commit is contained in:
committed by
Kyle Schwarz
parent
b1e875980c
commit
7eeb1b6c38
@@ -570,6 +570,7 @@ public:
|
||||
NODISCARD("If the Lifetime is not held, disconnects will be immediately unsuppressed")
|
||||
Lifetime suppressDisconnects();
|
||||
|
||||
bool refreshComponentVersions();
|
||||
/**
|
||||
* For use by extensions only. A more stable API will be provided in the future.
|
||||
*/
|
||||
@@ -727,7 +728,9 @@ public:
|
||||
|
||||
virtual bool isOnlineSupported() const { return true; }
|
||||
|
||||
virtual bool supportsComponentVersions() const { return false; }
|
||||
virtual bool supportsComponentVersions() const {
|
||||
return !getComponentVersions().empty();
|
||||
}
|
||||
|
||||
virtual bool supportsTC10() const { return false; }
|
||||
|
||||
@@ -743,6 +746,8 @@ public:
|
||||
/* MACsec support */
|
||||
virtual bool writeMACsecConfig(const MACsecMessage& message, uint16_t binaryIndex);
|
||||
|
||||
std::shared_ptr<DeviceExtension> getExtension(const std::string& name) const;
|
||||
|
||||
protected:
|
||||
bool online = false;
|
||||
int messagePollingCallbackID = 0;
|
||||
@@ -824,12 +829,6 @@ protected:
|
||||
|
||||
virtual void setupExtensions() {}
|
||||
|
||||
// Hook for devices such as FIRE which need to inject traffic before RequestSerialNumber
|
||||
// Return false to bail
|
||||
virtual bool afterCommunicationOpen() { return true; }
|
||||
|
||||
virtual bool requiresVehiclePower() const { return true; }
|
||||
|
||||
template<typename Extension>
|
||||
std::shared_ptr<Extension> getExtension() const {
|
||||
std::shared_ptr<Extension> ret;
|
||||
@@ -841,6 +840,12 @@ protected:
|
||||
return ret;
|
||||
}
|
||||
// END Initialization Functions
|
||||
// Hook for devices such as FIRE which need to inject traffic before RequestSerialNumber
|
||||
// Return false to bail
|
||||
virtual bool afterCommunicationOpen() { return true; }
|
||||
|
||||
virtual bool requiresVehiclePower() const { return true; }
|
||||
|
||||
|
||||
void handleInternalMessage(std::shared_ptr<Message> message);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user