Skip to content

Commit e44aa90

Browse files
committed
backend: Export/import the Backend config as JSON
Add a new helper BackEnd::GetJsonConfig() to return a JSON string of the current Backend register configuration and tile data. The parameters are the actual register values to be programmed into the hardware, and currently all dumped as unsigned. Add a new helper BackEnd::SetJsonConfig() to read a JSON string and import the Backend register configuration. Tile data does not get imported, and will need a BackEnd::Prepare() call to re-generate the tile data. Signed-off-by: Naushir Patuck <[email protected]>
1 parent 4b19cee commit e44aa90

File tree

3 files changed

+567
-0
lines changed

3 files changed

+567
-0
lines changed

src/libpisp/backend/backend.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#pragma once
99

1010
#include <map>
11+
#include <string>
1112
#include <vector>
1213

1314
#include "common/shm_mutex.hpp"
@@ -130,6 +131,9 @@ class BackEnd
130131

131132
unsigned int GetMaxDownscale() const;
132133

134+
std::string GetJsonConfig(pisp_be_tiles_config *config);
135+
void SetJsonConfig(const std::string &json_config);
136+
133137
void lock()
134138
{
135139
mutex_.lock();

0 commit comments

Comments
 (0)