-
Notifications
You must be signed in to change notification settings - Fork 58
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
Support OCPP 2.1 variables #988
Changes from all commits
ebd13d4
3f367ab
bddb760
f359fcd
1d48835
842fafd
83bee68
e0947fd
31c84cf
9f6d312
ffbcce1
6aedcbe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ALTER TABLE VARIABLE | ||
Check failure on line 1 in config/v201/device_model_migrations/3_down-variable_required.sql
|
||
ADD REQUIRED INTEGER DEFAULT FALSE; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ALTER TABLE VARIABLE | ||
Check failure on line 1 in config/v201/device_model_migrations/3_up-variable_required.sql
|
||
DROP COLUMN REQUIRED; |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,4 +1,4 @@ | ||||||
# OCPP 2.0.1: Device model initialization and inserting of config values | ||||||
# OCPP 2.0.1 and 2.1: Device model initialization and inserting of config values | ||||||
|
||||||
If there is no custom database used for the device model, and 'initialize_device_model' is set to true in the | ||||||
constructor of ChargePoint, the device model will be created or updated when ChargePoint is created. This document will | ||||||
|
@@ -43,3 +43,16 @@ | |||||
Note: OCPP requires EVSE and Connector numbering starting from 1 counting upwards. | ||||||
|
||||||
Note: There should be no duplicate components or variables in the component config files. | ||||||
|
||||||
|
||||||
## Required variables | ||||||
|
||||||
There are some required Variables, which can be found in the OCPP spec. | ||||||
Some `Variables` are only required if the `Component` is `Available`, for example `Reservation` and `Smart Charging`. | ||||||
Check notice on line 51 in doc/v201/ocpp_201_device_model_initialization.md
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
There are some Components that are always required because that is how libocpp works: `AlignedDataCtrlr` and | ||||||
Check notice on line 52 in doc/v201/ocpp_201_device_model_initialization.md
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
`SampledDataCtrlr`. | ||||||
When libocpp is started and initialized, all required Variables will be checked and an DeviceModelError is thrown if | ||||||
Check notice on line 54 in doc/v201/ocpp_201_device_model_initialization.md
|
||||||
one of the required Variables is not there. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
This also implies, that if you write code that needs a required `Variable`, when trying to get that variable with | ||||||
Check notice on line 57 in doc/v201/ocpp_201_device_model_initialization.md
|
||||||
`DeviceModel::get_value(...)`, you should first check if the Component that Variable belongs to is `Available`. | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.