Closed crono-melissa closed 3 years ago
@crono-melissa
For the first point, it runs on dummy driver using command line xhptdc8_info_64.exe -tdc=0 -param
on my machine as following:
C:\Users\basse\source\repos\xhptdc8_babel\go\info\src-cgo>xhptdc8_info_64.exe -tdc=0 -param
-----------------------------------------------------------------------------
xHPTDC8 Information Utility Application
-----------------------------------------------------------------------------
Installed Devices Serials for 1 TDC(s):
1 ) index: 0 xHPTDC8 serial 21.108
param_info of xHPTDC8 serial 21.108 at index 0
{
"binsize": 0,
"channels": 8,
"channel_mask": 0,
"total_buffer": 0
}
-----------------------------------------------------------------------------
End of Application
-----------------------------------------------------------------------------
Please try -tdc=0
by index instead of serial number, and let me know. As, it might be related to the second bug reported.
@Bassem-Ramzy this is exactly what I did (if I try to call the device by serial there is absolutely no output).
xHPTDC8 Information Utility Application
Installed Devices Serials for 1 TDC(s): 1 ) index: 0 xHPTDC8 serial 20.000017
End of Application
Each of the other flags creates the intended output (I'm only not sure, if we provide FPGA temperature measurements here):
xHPTDC8 Information Utility Application
Installed Devices Serials for 1 TDC(s): 1 ) index: 0 xHPTDC8 serial 20.000017
End of Application
For point #2 please test using this exe? xhptdc8_info_64.zip It should display the following two lines first for debugging purpose:
C:\Users\basse\source\repos\xhptdc8_babel\go\info\src-cgo>xhptdc8_info_64.exe -tdc=20.277 -param
Serial from device static information: 354133472
Serial Number Entered is < 20.277 >.
Error: Serial number entered < 20.277 > is not found.
-----------------------------------------------------------------------------
xHPTDC8 Information Utility Application
-----------------------------------------------------------------------------
Please share the results when you run it
xHPTDC8 Information Utility Application
Installed Devices Serials for 1 TDC(s): 1 ) index: 0 xHPTDC8 serial 20.000017
About the application Command: xhptdc8_info.exe [TDC] [Flags] Usage: [TDC] is either an integer as the index of the TDC, or a serial number of the TDC [Flags] Can be one or more of the following flags: -tdc=[TDC] is either an integer as the index of the TDC, or a serial number of the TDC -v show size and version information for all selected structures -static show static_info -temp show temperature_info -temperature show_temperature_info -fast show fast_info -param show param_info -clock show clock_info -all show all infos structures -h show this help -d output requested data in JSON only with no headers
End of Application
Powershell seems to set the argument to a different type:
xHPTDC8 Information Utility Application
Installed Devices Serials for 1 TDC(s): 1 ) index: 0 xHPTDC8 serial 20.000017
About the application Command: xhptdc8_info.exe [TDC] [Flags] Usage: [TDC] is either an integer as the index of the TDC, or a serial number of the TDC [Flags] Can be one or more of the following flags: -tdc=[TDC] is either an integer as the index of the TDC, or a serial number of the TDC -v show size and version information for all selected structures -static show static_info -temp show temperature_info -temperature show_temperature_info -fast show fast_info -param show param_info -clock show clock_info -all show all infos structures -h show this help -d output requested data in JSON only with no headers
End of Application
PS C:\Users\Melissa\Desktop\xhptdc8_info_64>
Regarding to PowerShell, that's why I'm using cmd instead.
PowerShell for a reason or another doesn't handle 20.277
as a full float, but processes the .
separately, so, we can use the following with PS, with serial enclosed within two Single quotations:
.\xhptdc8_info_64.exe -tdc='20.277' -param
Will get
PS C:\Users\basse\source\repos\xhptdc8_babel\go\info\src-cgo> .\xhptdc8_info_64.exe -tdc='20.277' -param
Serial from device static information: 354133472
Serial Number Entered is < 20.277 >.
Error: Serial number entered < 20.277 > is not found.
-----------------------------------------------------------------------------
xHPTDC8 Information Utility Application
-----------------------------------------------------------------------------
Good to know, that explains why the input was not considered to be a serial (must contain ".") and caused the 'weirder' error. So there ist probably just an error in copying/converting/parsing the serial. And still param_info is not shown, but that could also belong to driver changes/bugs.
xHPTDC8 Information Utility Application
Installed Devices Serials for 1 TDC(s): 1 ) index: 0 xHPTDC8 serial 20.000017
End of Application
C:\Users\Melissa\Desktop\xhptdc8_info_64>
@crono-melissa Could you please share with me the algorithm/code of converting fixed824 to float and vice versa?
@crono-melissa I've updated the code for the serial number, should be fixed, new exes are found on go/bin/, please check and let me know As for -param, I'll add extra error messages for more clarification
Perfect, the serial-bug is fixed:
xHPTDC8 Information Utility Application
Installed Devices Serials for 1 TDC(s): 1 ) index: 0 xHPTDC8 serial 20.277
End of Application
xHPTDC8 Information Utility Application
Installed Devices Serials for 1 TDC(s): 1 ) index: 0 xHPTDC8 serial 20.277
End of Application
@sulimma In the driver code:
int XHPTDC8::GetParamInfo(xhptdc8_param_info *param_info)
{
if ((state == DeviceState::CREATED) || (state == DeviceState::INITIALIZED)) {
Error("Device is not configured, ParamInfo not yet available.");
return XHPTDC8_WRONG_STATE;
}
.
.
xhptdc8_configure
with default configuration when calling get_param_info
, right?get_param_info
, right?1) Sorry, that is my fault. I did not realize that get_param_info is dependent on the configuration. Please remove the param feature from the info tool. It does not make sense.
2) Yes. Modeling this behavior is easy to do in the dummy library so please add it.
@Bassem-Ramzy : Regarding the serial numer: 8.24 means that there are 8 bits for the year-2000 and 24 bits for the running serial number. 20.277 should be 0x14000115 or decimal 335.544.597. (0x14 is 20 and 0x000115 is 277)
20.017 should be 0x14000011 or decimal 335.544.337
So conversion is: year = serial >> 24 id = serial & 0xffffff
@Bassem-Ramzy : Regarding the serial numer: 8.24 means that there are 8 bits for the year-2000 and 24 bits for the running serial number. 20.277 should be 0x14000115 or decimal 335.544.597. (0x14 is 20 and 0x000115 is 277)
20.017 should be 0x14000011 or decimal 335.544.337
So conversion is: year = serial >> 24 id = serial & 0xffffff
Crystal clear, thanks Kolja
Hey, I finally had time AND equipment to test the info-tool with real hardware (single device) and it mostly works fine. Bugs I found:
This: PS C:\Users\Melissa\Desktop\i_git_t\xhptdc8_babel\go\bin\x64> .\xhptdc8_info_64.exe -tdc=20.277 -all outputs: Error: Board index entered < 20 > is out of bound.