GetVariables
Reads device model variables. Replaces 1.6's GetConfiguration.
- Version
- OCPP 2.0.1
- Direction
- CSMS → Charge Point
- Functional block
- Provisioning
The read counterpart to SetVariables, addressed the same way. Unlike 1.6's GetConfiguration there is no 'return everything' form — enumerating a station's device model is GetBaseReport's job.
Request
| Field | Type | Required | Description |
|---|---|---|---|
getVariableData | GetVariableDataType[] | Required | One entry per variable: component, variable, and an optional attributeType. |
json
[2, "19223201", "GetVariables", {
"getVariableData": [{
"component": { "name": "OCPPCommCtrlr" },
"variable": { "name": "HeartbeatInterval" }
}]
}]Response
| Field | Type | Required | Description |
|---|---|---|---|
getVariableResult | GetVariableResultType[] | Required | One result per requested variable, each with attributeStatus and attributeValue. |
json
[3, "19223201", {
"getVariableResult": [{
"attributeStatus": "Accepted",
"attributeValue": "300",
"component": { "name": "OCPPCommCtrlr" },
"variable": { "name": "HeartbeatInterval" }
}]
}]Values
GetVariableStatusEnumType
| Value | Meaning |
|---|---|
Accepted | Read successfully. |
Rejected | The read was refused. |
UnknownComponent | No such component. |
UnknownVariable | No such variable on that component. |
NotSupportedAttributeType | That attribute type is not supported for this variable. |
Implementation notes
There is no way to ask for everything here. Use GetBaseReport with reportBase: "FullInventory" to discover what a station has.
ItemsPerMessageGetVariables on the DeviceDataCtrlr component limits how many variables fit in one request. Read it before sending large batches.