ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcbNET.hpp
Go to the documentation of this file.
1
8#ifndef ngcbNET_H
9#define ngcbNET_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 <ngc/core/ngcbIFC.hpp>
17
18
24 int serNo1;
25
27 int serNo2;
28
31
34
37
40
42 int id;
43
45 int date;
46
48 int type;
49
52
55
58
60 char productString[64];
61
64 serNo1 = 0x0; serNo2 = 0x0;
65 serNoTrans1 = 0x0; serNoTrans2 = 0x0;
66 serNoBack1 = 0x0; serNoBack2 = 0x0;
67 id = 0x0;
68 date = 0x0;
70 version = 0;
71 revision = 0x0;
72 firmware = 0x0;
73 strcpy(productString, "unknown");
74 }
75};
76
83
86
89 int i;
90 numBoard = 0;
91 for (i=0;i<ngcbMAX_MOD;i++)
92 {
93 binfo[i] = NULL;
94 }
95 }
96};
97
98
103public:
106
109
112
115
118
121
124
127
129 ngcbBOARD();
130
132 virtual ~ngcbBOARD();
133
135 int Enable(char *erms);
136
138 int BoardInfo(int *statusReg, char *erms);
139
141 void Dump(FILE *s);
142
144 void Dump(char *s);
145
147 void Dump(ngcb_netinfo_t *netInfo);
148
149protected:
150
151private:
152};
153
157class ngcbNET {
158public:
161
164
167
169 ngcbNET();
170
172 explicit ngcbNET(ngcbIFC *interface);
173
175 virtual ~ngcbNET();
176
178 int Add(ngcb_route_t route, char *erms);
179
181 int Enable(char *erms);
182
184 void Dump(FILE *s);
185
187 void Dump(char *s);
188
190 void Register();
191
193 int Valid();
194
196 int Skip();
197
198protected:
199
200private:
202 void Init_();
203
205 int id_;
206
208 int valid_;
209
211 int minRoute_;
212};
213
214
215#endif
Definition ngcbNET.hpp:102
ngcbBOARD()
Constructor.
Definition ngcbBOARD.cpp:28
int BoardInfo(int *statusReg, char *erms)
Update board information.
Definition ngcbBOARD.cpp:60
int term[ngcbNUM_LINK]
Terminate downlink.
Definition ngcbNET.hpp:117
int numLink
Number of downlinks.
Definition ngcbNET.hpp:114
virtual ~ngcbBOARD()
Destructor.
Definition ngcbBOARD.cpp:46
ngcbBOARD * board[ngcbNUM_LINK]
Boards on downlinks.
Definition ngcbNET.hpp:126
ngcb_route_t route
Route to board.
Definition ngcbNET.hpp:108
int Enable(char *erms)
Enable board.
Definition ngcbBOARD.cpp:977
ngcbIFC * dev
Interface device (passed through)
Definition ngcbNET.hpp:105
ngcb_binfo_t binfo
Board information.
Definition ngcbNET.hpp:120
int boardId
Unique board id within the network.
Definition ngcbNET.hpp:111
void Dump(FILE *s)
Dump board information to stream.
Definition ngcbBOARD.cpp:405
double temperature
Board temperature (degC)
Definition ngcbNET.hpp:123
Definition ngcbIFC.hpp:760
ngcb_netinfo_t netInfo
Network information.
Definition ngcbNET.hpp:166
ngcbNET()
Constructor.
Definition ngcbNET.cpp:28
ngcbIFC * dev
Interface device to access the NGC network.
Definition ngcbNET.hpp:163
void Dump(FILE *s)
Dump network information to stream.
Definition ngcbNET.cpp:154
virtual ~ngcbNET()
Destructor.
Definition ngcbNET.cpp:43
void Register()
Register network information.
Definition ngcbNET.cpp:171
int Add(ngcb_route_t route, char *erms)
Add a route.
Definition ngcbNET.cpp:60
int Valid()
Network valid.
Definition ngcbNET.cpp:184
ngcbBOARD mainBoard
First board in network.
Definition ngcbNET.hpp:160
int Enable(char *erms)
Enable the network.
Definition ngcbNET.cpp:138
int Skip()
Skipped routes.
Definition ngcbNET.cpp:186
#define ngcbNUM_LINK
Definition ngcbAddr.h:22
#define ngcbDFE_TYPE_UNKNOWN
Definition ngcbAddr.h:101
#define ngcbMAX_MOD
Definition ngcbAddr.h:628
Definition ngcbNET.hpp:22
int serNo1
Serial number part 1 (board)
Definition ngcbNET.hpp:24
char productString[64]
Product name.
Definition ngcbNET.hpp:60
int serNoBack2
Serial number part 2 (backplane)
Definition ngcbNET.hpp:39
int serNoTrans1
serial number part 1 (transition board)
Definition ngcbNET.hpp:30
int serNoBack1
Serial number part 1 (backplane)
Definition ngcbNET.hpp:36
int serNo2
Serial number part 2 (board)
Definition ngcbNET.hpp:27
int version
Board version (sub-type)
Definition ngcbNET.hpp:51
int type
Board type.
Definition ngcbNET.hpp:48
ngcb_binfo_t()
Constructor.
Definition ngcbNET.hpp:63
int firmware
Firmware revision.
Definition ngcbNET.hpp:57
int serNoTrans2
serial number part 2 (transition board)
Definition ngcbNET.hpp:33
int date
Date-register content.
Definition ngcbNET.hpp:45
int revision
Hardware revision.
Definition ngcbNET.hpp:54
int id
ID-register content.
Definition ngcbNET.hpp:42
Definition ngcbNET.hpp:80
ngcb_netinfo_t()
Constructor.
Definition ngcbNET.hpp:88
ngcb_binfo_t * binfo[ngcbMAX_MOD]
Array of boards.
Definition ngcbNET.hpp:85
int numBoard
Number of boards.
Definition ngcbNET.hpp:82
Definition ngcbIFC.hpp:78