mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
* Allow the raw structure to be manipulated from C and Legacy APIs * Structure is now split between what's on the device and what's on the client so changes will not be visible from read methods until apply() * Allow devices to connect which have slightly different firmware versions than the settings structure
30 lines
663 B
C++
30 lines
663 B
C++
#ifndef __VALUECAN4_1_SETTINGS_H_
|
|
#define __VALUECAN4_1_SETTINGS_H_
|
|
|
|
#include "icsneo/device/valuecan4/settings/valuecan4-1-2settings.h"
|
|
|
|
#ifdef __cplusplus
|
|
|
|
namespace icsneo {
|
|
|
|
class ValueCAN4_1Settings : public ValueCAN4_1_2Settings {
|
|
public:
|
|
ValueCAN4_1Settings(std::shared_ptr<Communication> com) : ValueCAN4_1_2Settings(com) {}
|
|
const CAN_SETTINGS* getCANSettingsFor(Network net) const override {
|
|
auto cfg = getStructurePointer<valuecan4_1_2_settings_t>();
|
|
if(cfg == nullptr)
|
|
return nullptr;
|
|
switch(net.getNetID()) {
|
|
case Network::NetID::HSCAN:
|
|
return &(cfg->can1);
|
|
default:
|
|
return nullptr;
|
|
}
|
|
}
|
|
};
|
|
|
|
}
|
|
|
|
#endif // __cplusplus
|
|
|
|
#endif |