sunspec / models

SunSpec Model Definitions
Apache License 2.0
93 stars 52 forks source link

AdptCrvRslt (and AdptCtlRslt) needs an initial state #133

Closed jsbosch closed 3 years ago

jsbosch commented 4 years ago

The AdptCrv/CtlRslt point has three states: IN_PROGRESS, COMPLETED, and FAILED.

I think it needs an addition, an initial state of something like NOT_REQUESTED. After all, how can an action be IN_PROGRESS if it was not requested? Also, having IN_PROGRESS as an initial state does not give any transition information from initial state.

bobfox commented 4 years ago

The current behavior is the initial state would be COMPLETED. After any request cycle, the final state should be COMPLETED or FAILED. It seems like an initial state would only be present after initialization and would never be entered again after a request cycle had been processed. Adding an additional state requires understanding how to process it but it doesn't seem like there is any functional processing difference between NOT_REQUESTED and COMPLETED. Looking at the processing steps, it seems an update can be performed regardless of the initial state.

jsbosch commented 4 years ago

The initial state would occur on initialization, true. But wouldn't it also occur if the user were to set AdptCrvReq = 0 to indicate no active curve? Or would you use COMPLETED for that?

Change of state from NOT_REQUESTED (or by a better name) to IN_PROGRESS would give an indicator that the command was accepted. Maybe such information is redundant with the register not being set to FAILED.

bobfox commented 3 years ago

No change.