ngc 1.4.0
 
Loading...
Searching...
No Matches
ngcbNET.hpp
Go to the documentation of this file.
1
7#ifndef ngcbNET_H
8#define ngcbNET_H
9
10
11#ifndef __cplusplus
12#error This is a C++ include file and cannot be used from plain C
13#endif
14
15#include <ngc/core/ngcbIFC.hpp>
16
17
23 int serNo1;
24
26 int serNo2;
27
30
33
36
39
41 int id;
42
44 int date;
45
47 int type;
48
51
54
57
59 char productString[64];
60
63 serNo1 = 0x0; serNo2 = 0x0;
64 serNoTrans1 = 0x0; serNoTrans2 = 0x0;
65 serNoBack1 = 0x0; serNoBack2 = 0x0;
66 id = 0x0;
67 date = 0x0;
69 version = 0;
70 revision = 0x0;
71 firmware = 0x0;
72 strcpy(productString, "unknown");
73 }
74};
75
82
85
88 int i;
89 numBoard = 0;
90 for (i=0;i<ngcbMAX_MOD;i++)
91 {
92 binfo[i] = NULL;
93 }
94 }
95};
96
97
102public:
105
108
111
114
117
120
123
126
128 ngcbBOARD();
129
131 virtual ~ngcbBOARD();
132
134 int Enable(char *erms);
135
137 int BoardInfo(int *statusReg, char *erms);
138
140 void Dump(FILE *s);
141
143 void Dump(char *s);
144
146 void Dump(ngcb_netinfo_t *netInfo);
147
148protected:
149
150private:
151};
152
156class ngcbNET {
157public:
160
163
166
168 ngcbNET();
169
171 explicit ngcbNET(ngcbIFC *interface);
172
174 virtual ~ngcbNET();
175
177 int Add(ngcb_route_t route, char *erms);
178
180 int Enable(char *erms);
181
183 void Dump(FILE *s);
184
186 void Dump(char *s);
187
189 void Register();
190
192 int Valid();
193
195 int Skip();
196
197protected:
198
199private:
201 void Init_();
202
204 int id_;
205
207 int valid_;
208
210 int minRoute_;
211};
212
213
214#endif
Definition ngcbNET.hpp:101
ngcbBOARD()
Constructor.
Definition ngcbBOARD.cpp:27
int BoardInfo(int *statusReg, char *erms)
Update board information.
Definition ngcbBOARD.cpp:59
int term[ngcbNUM_LINK]
Terminate downlink.
Definition ngcbNET.hpp:116
int numLink
Number of downlinks.
Definition ngcbNET.hpp:113
virtual ~ngcbBOARD()
Destructor.
Definition ngcbBOARD.cpp:45
ngcbBOARD * board[ngcbNUM_LINK]
Boards on downlinks.
Definition ngcbNET.hpp:125
ngcb_route_t route
Route to board.
Definition ngcbNET.hpp:107
int Enable(char *erms)
Enable board.
Definition ngcbBOARD.cpp:976
ngcbIFC * dev
Interface device (passed through)
Definition ngcbNET.hpp:104
ngcb_binfo_t binfo
Board information.
Definition ngcbNET.hpp:119
int boardId
Unique board id within the network.
Definition ngcbNET.hpp:110
void Dump(FILE *s)
Dump board information to stream.
Definition ngcbBOARD.cpp:404
double temperature
Board temperature (degC)
Definition ngcbNET.hpp:122
Definition ngcbIFC.hpp:754
ngcb_netinfo_t netInfo
Network information.
Definition ngcbNET.hpp:165
ngcbNET()
Constructor.
Definition ngcbNET.cpp:27
ngcbIFC * dev
Interface device to access the NGC network.
Definition ngcbNET.hpp:162
void Dump(FILE *s)
Dump network information to stream.
Definition ngcbNET.cpp:153
virtual ~ngcbNET()
Destructor.
Definition ngcbNET.cpp:42
void Register()
Register network information.
Definition ngcbNET.cpp:170
int Add(ngcb_route_t route, char *erms)
Add a route.
Definition ngcbNET.cpp:59
int Valid()
Network valid.
Definition ngcbNET.cpp:183
ngcbBOARD mainBoard
First board in network.
Definition ngcbNET.hpp:159
int Enable(char *erms)
Enable the network.
Definition ngcbNET.cpp:137
int Skip()
Skipped routes.
Definition ngcbNET.cpp:185
#define ngcbNUM_LINK
Definition ngcbAddr.h:21
#define ngcbDFE_TYPE_UNKNOWN
Definition ngcbAddr.h:100
#define ngcbMAX_MOD
Definition ngcbAddr.h:627
Definition ngcbNET.hpp:21
int serNo1
Serial number part 1 (board)
Definition ngcbNET.hpp:23
char productString[64]
Product name.
Definition ngcbNET.hpp:59
int serNoBack2
Serial number part 2 (backplane)
Definition ngcbNET.hpp:38
int serNoTrans1
serial number part 1 (transition board)
Definition ngcbNET.hpp:29
int serNoBack1
Serial number part 1 (backplane)
Definition ngcbNET.hpp:35
int serNo2
Serial number part 2 (board)
Definition ngcbNET.hpp:26
int version
Board version (sub-type)
Definition ngcbNET.hpp:50
int type
Board type.
Definition ngcbNET.hpp:47
ngcb_binfo_t()
Constructor.
Definition ngcbNET.hpp:62
int firmware
Firmware revision.
Definition ngcbNET.hpp:56
int serNoTrans2
serial number part 2 (transition board)
Definition ngcbNET.hpp:32
int date
Date-register content.
Definition ngcbNET.hpp:44
int revision
Hardware revision.
Definition ngcbNET.hpp:53
int id
ID-register content.
Definition ngcbNET.hpp:41
Definition ngcbNET.hpp:79
ngcb_netinfo_t()
Constructor.
Definition ngcbNET.hpp:87
ngcb_binfo_t * binfo[ngcbMAX_MOD]
Array of boards.
Definition ngcbNET.hpp:84
int numBoard
Number of boards.
Definition ngcbNET.hpp:81
Definition ngcbIFC.hpp:72