Skip to content

Commit 6aedcbe

Browse files
committed
Add documentation.
Signed-off-by: Maaike Zijderveld, iolar <git.mail@iolar.nl>
1 parent ffbcce1 commit 6aedcbe

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

doc/v201/ocpp_201_device_model_initialization.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# OCPP 2.0.1: Device model initialization and inserting of config values
1+
# OCPP 2.0.1 and 2.1: Device model initialization and inserting of config values
22

33
If there is no custom database used for the device model, and 'initialize_device_model' is set to true in the
44
constructor of ChargePoint, the device model will be created or updated when ChargePoint is created. This document will
@@ -43,3 +43,16 @@ addition of a new one.
4343
Note: OCPP requires EVSE and Connector numbering starting from 1 counting upwards.
4444

4545
Note: There should be no duplicate components or variables in the component config files.
46+
47+
48+
## Required variables
49+
50+
There are some required Variables, which can be found in the OCPP spec.
51+
Some `Variables` are only required if the `Component` is `Available`, for example `Reservation` and `Smart Charging`.
52+
There are some Components that are always required because that is how libocpp works: `AlignedDataCtrlr` and
53+
`SampledDataCtrlr`.
54+
When libocpp is started and initialized, all required Variables will be checked and an DeviceModelError is thrown if
55+
one of the required Variables is not there.
56+
57+
This also implies, that if you write code that needs a required `Variable`, when trying to get that variable with
58+
`DeviceModel::get_value(...)`, you should first check if the Component that Variable belongs to is `Available`.

0 commit comments

Comments
 (0)