You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to handle the case when the CP is booted and the first message it sends is not a BootNotification request.
So the procedure from the CSMS side should be :
Check if BootNotification is recorded before or not. I am doing this using a DB call and storing the latest BootNotification call timestamp in it. So if a new CP gets connected and it doesn't send a BootNotification first, then the value is NULL and the CSMS shall raise a SecurityError.
After raising the security error, a CALLERROR is sent to the CP.
And after that, I should be able to call a trigger message somehow.
Can you help me find the place where should I call trigger message function?
I thought of using a @after tag, but the code is unreachable.
That is a good catch! Thanks for opening the issue @jainmohit2001. It's surprising that @after() handlers are not executed if the @on() handler raises an exception. Therefore it's bad API design and should be fixed somehow. Either by making this behavior explicit or changing the behavior.
On the other hand, you could also argue that it makes sense that flow of request handling is stopped when an exception is raised.
I wanted to handle the case when the CP is booted and the first message it sends is not a
BootNotification
request.So the procedure from the CSMS side should be :
Check if
BootNotification
is recorded before or not. I am doing this using a DB call and storing the latestBootNotification
call timestamp in it. So if a new CP gets connected and it doesn't send aBootNotification
first, then the value is NULL and the CSMS shall raise aSecurityError
.After raising the security error, a
CALLERROR
is sent to the CP.And after that, I should be able to call a trigger message somehow.
Can you help me find the place where should I call trigger message function?
I thought of using a
@after
tag, but the code is unreachable.My
@on
(Authorize) codeMy
check_boot_status_accepted()
functionThe reason why
@after
doesn't work: (in thecharge_point.py
file)CSMS log:
CP log:
The text was updated successfully, but these errors were encountered: