knx
ETS configurable knx-stack
save_restore.h
Go to the documentation of this file.
1 #pragma once
2 #include <stdint.h>
3 
8 {
9  public:
18  virtual uint8_t* save(uint8_t* buffer)
19  {
20  return buffer;
21  }
22 
31  virtual const uint8_t* restore(const uint8_t* buffer)
32  {
33  return buffer;
34  }
35 
39  virtual uint16_t saveSize()
40  {
41  return 0;
42  }
43 };
Interface for classes that can save and restore data from a buffer.
Definition: save_restore.h:8
virtual uint8_t * save(uint8_t *buffer)
This method is called when the object should save its state to the buffer.
Definition: save_restore.h:18
virtual const uint8_t * restore(const uint8_t *buffer)
This method is called when the object should restore its state from the buffer.
Definition: save_restore.h:31
virtual uint16_t saveSize()
Definition: save_restore.h:39