mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Extensions: Auto-add linked extensions
This commit is contained in:
@@ -157,6 +157,8 @@ public:
|
||||
|
||||
virtual std::vector<std::shared_ptr<FlexRay::Controller>> getFlexRayControllers() const { return {}; }
|
||||
|
||||
void addExtension(std::shared_ptr<DeviceExtension>&& extension);
|
||||
|
||||
/**
|
||||
* For use by extensions only.
|
||||
*/
|
||||
@@ -248,7 +250,6 @@ protected:
|
||||
virtual void setupSupportedTXNetworks(std::vector<Network>&) {}
|
||||
|
||||
virtual void setupExtensions() {}
|
||||
void addExtension(std::shared_ptr<DeviceExtension>&& extension);
|
||||
|
||||
// Hook for devices such as FIRE which need to inject traffic before RequestSerialNumber
|
||||
// Return false to bail
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef __ICSNEO_DEVICE_EXTENSIONS_BUILTIN_H_
|
||||
#define __ICSNEO_DEVICE_EXTENSIONS_BUILTIN_H_
|
||||
|
||||
@LIBICSNEO_EXT_CODE_INCS@
|
||||
#include "icsneo/device/device.h"
|
||||
#include <memory>
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
static void AddBuiltInExtensionsTo([[maybe_unused]] const std::shared_ptr<icsneo::Device>& device) {
|
||||
@LIBICSNEO_EXT_CODE@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user