mirror of
https://github.com/thelsing/knx.git
synced 2025-08-17 13:47:28 +02:00
save work
This commit is contained in:
parent
9a6d5cecf4
commit
b8d938518f
@ -1,39 +0,0 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <cstring>
|
||||
#include "router_object.h"
|
||||
#include "bits.h"
|
||||
#include "data_property.h"
|
||||
|
||||
RouterObject::RouterObject()
|
||||
{
|
||||
initializeProperties(0, nullptr);
|
||||
}
|
||||
|
||||
void RouterObject::initializeProperties(size_t propertiesSize, Property** properties)
|
||||
{
|
||||
Property* ownProperties[] =
|
||||
{
|
||||
};
|
||||
|
||||
uint8_t ownPropertiesCount = sizeof(ownProperties) / sizeof(Property*);
|
||||
|
||||
uint8_t propertyCount = propertiesSize / sizeof(Property*);
|
||||
uint8_t allPropertiesCount = propertyCount + ownPropertiesCount;
|
||||
|
||||
Property* allProperties[allPropertiesCount];
|
||||
if (properties)
|
||||
memcpy(allProperties, properties, propertiesSize);
|
||||
memcpy(allProperties + propertyCount, ownProperties, sizeof(ownProperties));
|
||||
|
||||
InterfaceObject::initializeProperties(sizeof(allProperties), allProperties);
|
||||
}
|
||||
|
||||
void RouterObject::masterReset(EraseCode eraseCode, uint8_t channel)
|
||||
{
|
||||
if (eraseCode == FactoryReset)
|
||||
{
|
||||
// TODO handle different erase codes
|
||||
println("Factory reset of router object requested.");
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "interface_object.h"
|
||||
#include "knx_types.h"
|
||||
|
||||
class RouterObject: public InterfaceObject
|
||||
{
|
||||
public:
|
||||
RouterObject();
|
||||
|
||||
virtual void masterReset(EraseCode eraseCode, uint8_t channel) override;
|
||||
|
||||
protected:
|
||||
void initializeProperties(size_t propertiesSize, Property** properties) override;
|
||||
|
||||
};
|
Loading…
Reference in New Issue
Block a user