238 << setw(8) << si->product_code << endl |
238 << setw(8) << si->product_code << endl |
239 << " Revision number: 0x" |
239 << " Revision number: 0x" |
240 << setw(8) << si->revision_number << endl |
240 << setw(8) << si->revision_number << endl |
241 << " Serial number: 0x" |
241 << " Serial number: 0x" |
242 << setw(8) << si->serial_number << endl; |
242 << setw(8) << si->serial_number << endl; |
243 |
|
244 cout << "Ports:" << endl; |
|
245 for (i = 0; i < EC_MAX_PORTS; i++) { |
|
246 cout << " " << i << ": "; |
|
247 switch (si->ports[i]) { |
|
248 case EC_PORT_NOT_IMPLEMENTED: |
|
249 cout << "Not implemented."; |
|
250 break; |
|
251 case EC_PORT_NOT_CONFIGURED: |
|
252 cout << "Not configured."; |
|
253 break; |
|
254 case EC_PORT_EBUS: |
|
255 cout << "EBUS."; |
|
256 break; |
|
257 case EC_PORT_MII: |
|
258 cout << "MII."; |
|
259 break; |
|
260 default: |
|
261 cout << "???"; |
|
262 } |
|
263 cout << endl; |
|
264 } |
|
265 |
243 |
266 cout << "DL information:" << endl |
244 cout << "DL information:" << endl |
267 << " FMMU bit operation: " |
245 << " FMMU bit operation: " |
268 << (si->fmmu_bit ? "yes" : "no") << endl |
246 << (si->fmmu_bit ? "yes" : "no") << endl |
269 << " Distributed clocks: "; |
247 << " Distributed clocks: "; |
278 cout << "64 bit"; |
256 cout << "64 bit"; |
279 break; |
257 break; |
280 default: |
258 default: |
281 cout << "???"; |
259 cout << "???"; |
282 } |
260 } |
|
261 cout << endl; |
283 } else { |
262 } else { |
284 cout << "yes, delay measurement only"; |
263 cout << "yes, delay measurement only" << endl; |
285 } |
264 } |
286 } else { |
265 } else { |
287 cout << "no"; |
266 cout << "no" << endl; |
288 } |
267 } |
|
268 |
|
269 cout << "Port Type Link Loop Signal"; |
|
270 if (si->dc_supported) |
|
271 cout << " RxTime Diff"; |
289 cout << endl; |
272 cout << endl; |
|
273 |
|
274 for (i = 0; i < EC_MAX_PORTS; i++) { |
|
275 cout << " " << i << " " << setfill(' ') << left << setw(4); |
|
276 switch (si->port_descs[i]) { |
|
277 case EC_PORT_NOT_IMPLEMENTED: |
|
278 cout << "N/A"; |
|
279 break; |
|
280 case EC_PORT_NOT_CONFIGURED: |
|
281 cout << "N/C"; |
|
282 break; |
|
283 case EC_PORT_EBUS: |
|
284 cout << "EBUS"; |
|
285 break; |
|
286 case EC_PORT_MII: |
|
287 cout << "MII"; |
|
288 break; |
|
289 default: |
|
290 cout << "???"; |
|
291 } |
|
292 |
|
293 cout << " " << setw(4) |
|
294 << (si->ports[i].dl_link ? "up" : "down") |
|
295 << " " << setw(6) |
|
296 << (si->ports[i].dl_loop ? "closed" : "open") |
|
297 << " " << setw(3) |
|
298 << (si->ports[i].dl_signal ? "yes" : "no"); |
|
299 |
|
300 if (si->dc_supported) { |
|
301 cout << " " << setw(10) << right; |
|
302 if (si->ports[i].dl_signal) { |
|
303 cout << dec << si->dc_receive_times[i]; |
|
304 } else { |
|
305 cout << "-"; |
|
306 } |
|
307 cout << " " << setw(10); |
|
308 if (si->ports[i].dl_signal) { |
|
309 cout << si->dc_receive_times[i] - si->dc_receive_times[0]; |
|
310 } else { |
|
311 cout << "-"; |
|
312 } |
|
313 } |
|
314 |
|
315 cout << endl; |
|
316 } |
290 |
317 |
291 if (si->mailbox_protocols) { |
318 if (si->mailbox_protocols) { |
292 list<string> protoList; |
319 list<string> protoList; |
293 list<string>::const_iterator protoIter; |
320 list<string>::const_iterator protoIter; |
294 |
321 |