38 lines
694 B
C
38 lines
694 B
C
|
|
#ifndef __HSCONFIG__
|
||
|
|
#define __HSCONFIG__
|
||
|
|
|
||
|
|
#include <vector>
|
||
|
|
#include <base/MatrixFile.h>
|
||
|
|
#include <stdlib.h>
|
||
|
|
#include <stdio.h>
|
||
|
|
#include <string.h>
|
||
|
|
|
||
|
|
using namespace baosight;
|
||
|
|
struct MemStruct
|
||
|
|
{
|
||
|
|
char table[48];
|
||
|
|
char block[48];
|
||
|
|
unsigned int saddr; /* table start address */
|
||
|
|
unsigned int eaddr; /* table end address */
|
||
|
|
size_t size;
|
||
|
|
};
|
||
|
|
|
||
|
|
class HSConfig
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
HSConfig( );
|
||
|
|
virtual ~HSConfig();
|
||
|
|
private:
|
||
|
|
vector<MemStruct> vhscfg;
|
||
|
|
static MemStruct nullstruct;
|
||
|
|
int ReadConfig();
|
||
|
|
MatrixFile *pp;
|
||
|
|
public:
|
||
|
|
size_t count() const;
|
||
|
|
const MemStruct& operator[]( int elem) ;
|
||
|
|
const MemStruct& operator[]( const string& name) ;
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
#endif
|