ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcbIFC3.hpp
Go to the documentation of this file.
1
8#ifndef ngcbIFC3_H
9#define ngcbIFC3_H
10
11
12#ifndef __cplusplus
13#error This is a C++ include file and cannot be used from plain C
14#endif
15
16#include <string>
17#include <ngc/core/ngcbIFC2.hpp>
18
22class ngcbIFC3: public ngcbIFC2
23{
24public:
26 ngcbIFC3();
27
32 explicit ngcbIFC3(const char *name);
33
35 virtual ~ngcbIFC3();
36
41 virtual int Fd() override;
42
49 virtual int Sim(int level) override;
50
57 virtual int Open(const char *name) override;
58
64 virtual int Close() override;
65
71 int Reset() override;
72
79 int Timeout(int seconds) override;
80
88 int SetTime(uint64_t sec, uint64_t nsec) override;
89
100 int RPC(int mod, int target, int req, void *payload, unsigned int size, unsigned int *status) override;
101
112 int ReadAddr(ngcb_route_t route, int addr, int *buffer, int size, int *result) override;
113
124 int WriteAddr(ngcb_route_t route, int addr, const int *buffer, int size, int *result) override;
125
130 int Connected() override;
131
136 ClientConnection *GetConnection() override;
137
138protected:
139
140private:
142 int m_fd;
143
145 ngcbIFC *m_simulator;
146
148 ClientConnection *m_connection;
149
151 void Init();
152
163 int DevReadAddr(ngcb_route_t route, int addr, int *buffer, int size, int *result);
164
175 int DevWriteAddr(ngcb_route_t route, int addr, const int *buffer, int size, int *result);
176
183 void SeqConfig(int mod, int word);
184
191 unsigned int SeqStatus(int mod);
192
198 void SeqStart(int mod);
199
205 void SeqStopAndReset(int mod);
206
212 void SeqBreak(int mod);
213
219 void SeqTrigger(int mod);
220
229 void SetPatRamLow(int mod, unsigned int offset, const int *ram, unsigned int size);
230
239 void GetPatRamLow(int mod, unsigned int offset, int *ram, unsigned int size);
240
249 void SetPatRamHigh(int mod, unsigned int offset, const int *ram, unsigned int size);
250
259 void GetPatRamHigh(int mod, unsigned int offset, int *ram, unsigned int size);
260
269 void SetSeqRam(int mod, unsigned int offset, const int *ram, unsigned int size);
270
279 void GetSeqRam(int mod, unsigned int offset, int *ram, unsigned int size);
280
287 std::string RpcErrorString(unsigned int rpc_status);
288};
289
290#endif
ngcbIFC2()
Constructor without name.
Definition ngcbIFC2.cpp:66
virtual int Sim(int level) override
Definition ngcbIFC3.cpp:43
int Reset() override
Definition ngcbIFC3.cpp:149
ClientConnection * GetConnection() override
Definition ngcbIFC3.cpp:144
ngcbIFC3()
Constructor.
Definition ngcbIFC3.cpp:18
int Connected() override
Definition ngcbIFC3.cpp:140
virtual int Close() override
Definition ngcbIFC3.cpp:113
int ReadAddr(ngcb_route_t route, int addr, int *buffer, int size, int *result) override
Definition ngcbIFC3.cpp:186
virtual ~ngcbIFC3()
Destructor.
Definition ngcbIFC3.cpp:27
int SetTime(uint64_t sec, uint64_t nsec) override
Definition ngcbIFC3.cpp:180
virtual int Fd() override
Definition ngcbIFC3.cpp:39
int WriteAddr(ngcb_route_t route, int addr, const int *buffer, int size, int *result) override
Definition ngcbIFC3.cpp:213
int RPC(int mod, int target, int req, void *payload, unsigned int size, unsigned int *status) override
Definition ngcbIFC3.cpp:513
virtual int Timeout()
Get timeout.
Definition ngcbIFC.cpp:588
int Open()
Open interface with current name.
Definition ngcbIFC.cpp:319
ngcbIFC()
Constructor without device name.
Definition ngcbIFC.cpp:36
Definition ngcbIFC.hpp:78