8000 DynamicCalculator: Adapter command to assist troubleshooting by StephenCWills · Pull Request #398 · GridProtectionAlliance/gsf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DynamicCalculator: Adapter command to assist troubleshooting #398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2025

Conversation

StephenCWills
Copy link
Member

This PR implements adapter commands to view the actual values of measurements received by the adapter as well as the values of variables used in the calculation of a given result. This is intended to assist with troubleshooting adapter configuration when the result of the calculation doesn't match expectations.


Here is a recommended approach for enabling these messages in a remote console application.

q
filter -include message MYCALC
r
invoke MYCALC RaiseVerboseMessages

Once the console has captured some of the output, you can disable the messages again with these commands.

q
invoke MYCALC StopVerboseMessages

Here is some example output from an adapter using the following calculation:
If(freq >= 45 and freq <= 55 and volt >= 10000, 1, 0)

FYI, the x variable is only included for timing and is not used in the calculation. In this case, the input device is providing frequency/voltage data at half the expected framerate, so the second result includes NaN values as input.

[MYCALC] Calculation details 2025-04-11 16:32:32.8400000:
freq = 49.9941139221191
LOCALTIME = 4/11/2025 6:32:34 PM
SYSTEMNAME = MYSERVER
TIME = 638799859528400000
UTCTIME = 4/11/2025 4:32:34 PM
volt = 408828.156482813
x = 0.244234193695818
Result = 1

[MYCALC] Calculation details 2025-04-11 16:32:32.8600000:
freq = NaN
LOCALTIME = 4/11/2025 6:32:34 PM
SYSTEMNAME = MYSERVER
TIME = 638799859528600000
UTCTIME = 4/11/2025 4:32:34 PM
volt = NaN
x = 0.230035456935892
Result = 0

@StephenCWills StephenCWills force-pushed the calc-verbose-messages branch 4 times, most recently from f4a7c57 to d3cb58a Compare April 15, 2025 18:17
@StephenCWills StephenCWills changed the title [DynamicCalculator] Adapter command to assist troubleshooting DynamicCalculator: Adapter command to assist troubleshooting Apr 15, 2025
@StephenCWills StephenCWills force-pushed the calc-verbose-messages branch from d3cb58a to d9fc6f0 Compare April 16, 2025 14:44
@StephenCWills StephenCWills merged commit c70a785 into master Apr 18, 2025
3 checks passed
@StephenCWills StephenCWills deleted the calc-verbose-messages branch April 18, 2025 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0