Skip to content

Commit 34f3fe3

Browse files
committed
add OCPP 2.1
1 parent 2692b96 commit 34f3fe3

182 files changed

Lines changed: 23228 additions & 12 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ocpp-jaxb/pom.xml

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<properties>
1515
<ocpp-1.6-security-schemas-dir>OCPP-1.6_Security_3rd_Edition_schemas</ocpp-1.6-security-schemas-dir>
1616
<ocpp-2.0.1-schemas-dir>OCPP-2.0.1_part3_JSON_schemas</ocpp-2.0.1-schemas-dir>
17+
<ocpp-2.1-schemas-dir>OCPP-2.1_part3_JSON_schemas</ocpp-2.1-schemas-dir>
1718
</properties>
1819

1920
<build>
@@ -106,9 +107,7 @@
106107
<replacements>
107108
<replacement>
108109
<token>"\$schema"</token>
109-
<!-- &#10; is html code for line break -->
110-
<value>"javaInterfaces" : ["de.rwth.idsg.ocpp.jaxb.RequestType"],
111-
"\$schema"</value>
110+
<value>"javaInterfaces" : ["de.rwth.idsg.ocpp.jaxb.RequestType"], "\$schema"</value>
112111
</replacement>
113112
</replacements>
114113
</configuration>
@@ -126,9 +125,7 @@
126125
<replacements>
127126
<replacement>
128127
<token>"\$schema"</token>
129-
<!-- &#10; is html code for line break -->
130-
<value>"javaInterfaces" : ["de.rwth.idsg.ocpp.jaxb.ResponseType"],
131-
"\$schema"</value>
128+
<value>"javaInterfaces" : ["de.rwth.idsg.ocpp.jaxb.ResponseType"], "\$schema"</value>
132129
</replacement>
133130
</replacements>
134131
</configuration>
@@ -147,9 +144,7 @@
147144
<replacements>
148145
<replacement>
149146
<token>"\$schema"</token>
150-
<!-- &#10; is html code for line break -->
151-
<value>"javaInterfaces" : ["de.rwth.idsg.ocpp.jaxb.RequestType"],
152-
"\$schema"</value>
147+
<value>"javaInterfaces" : ["de.rwth.idsg.ocpp.jaxb.RequestType"], "\$schema"</value>
153148
</replacement>
154149
</replacements>
155150
</configuration>
@@ -167,13 +162,49 @@
167162
<replacements>
168163
<replacement>
169164
<token>"\$schema"</token>
170-
<!-- &#10; is html code for line break -->
171-
<value>"javaInterfaces" : ["de.rwth.idsg.ocpp.jaxb.ResponseType"],
172-
"\$schema"</value>
165+
<value>"javaInterfaces" : ["de.rwth.idsg.ocpp.jaxb.ResponseType"], "\$schema"</value>
173166
</replacement>
174167
</replacements>
175168
</configuration>
176169
</execution>
170+
171+
<execution>
172+
<id>add-request-interface-ocpp-2.1</id>
173+
<phase>generate-resources</phase>
174+
<goals>
175+
<goal>replace</goal>
176+
</goals>
177+
<configuration>
178+
<filesToInclude>${basedir}/src/main/resources/${ocpp-2.1-schemas-dir}/*Request.json</filesToInclude>
179+
<preserveDir>false</preserveDir>
180+
<outputDir>${project.build.directory}/generated-resources/${ocpp-2.1-schemas-dir}</outputDir>
181+
<replacements>
182+
<replacement>
183+
<token>"\$schema"</token>
184+
<value>"javaInterfaces" : ["de.rwth.idsg.ocpp.jaxb.RequestType"], "\$schema"</value>
185+
</replacement>
186+
</replacements>
187+
</configuration>
188+
</execution>
189+
<execution>
190+
<id>add-response-interface-ocpp-2.1</id>
191+
<phase>generate-resources</phase>
192+
<goals>
193+
<goal>replace</goal>
194+
</goals>
195+
<configuration>
196+
<filesToInclude>${basedir}/src/main/resources/${ocpp-2.1-schemas-dir}/*Response.json</filesToInclude>
197+
<preserveDir>false</preserveDir>
198+
<outputDir>${project.build.directory}/generated-resources/${ocpp-2.1-schemas-dir}</outputDir>
199+
<replacements>
200+
<replacement>
201+
<token>"\$schema"</token>
202+
<value>"javaInterfaces" : ["de.rwth.idsg.ocpp.jaxb.ResponseType"], "\$schema"</value>
203+
</replacement>
204+
</replacements>
205+
</configuration>
206+
</execution>
207+
177208
</executions>
178209
</plugin>
179210
<plugin>
@@ -220,6 +251,17 @@
220251
<targetPackage>ocpp._2020._03</targetPackage>
221252
</configuration>
222253
</execution>
254+
<execution>
255+
<id>generate-ocpp-2.1</id>
256+
<phase>process-resources</phase>
257+
<goals>
258+
<goal>generate</goal>
259+
</goals>
260+
<configuration>
261+
<sourceDirectory>${project.build.directory}/generated-resources/${ocpp-2.1-schemas-dir}</sourceDirectory>
262+
<targetPackage>ocpp._2025._01</targetPackage>
263+
</configuration>
264+
</execution>
223265
</executions>
224266
<dependencies>
225267
<dependency>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-06/schema#",
3+
"$id": "urn:OCPP:Cp:2:2025:1:AFRRSignalRequest",
4+
"comment": "OCPP 2.1 Edition 1 (c) OCA, Creative Commons Attribution-NoDerivatives 4.0 International Public License",
5+
"definitions": {
6+
"CustomDataType": {
7+
"description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.",
8+
"javaType": "CustomData",
9+
"type": "object",
10+
"properties": {
11+
"vendorId": {
12+
"type": "string",
13+
"maxLength": 255
14+
}
15+
},
16+
"required": [
17+
"vendorId"
18+
]
19+
}
20+
},
21+
"type": "object",
22+
"additionalProperties": false,
23+
"properties": {
24+
"timestamp": {
25+
"description": "Time when signal becomes active.\r\n",
26+
"type": "string",
27+
"format": "date-time"
28+
},
29+
"signal": {
30+
"description": "Value of signal in _v2xSignalWattCurve_. \r\n",
31+
"type": "integer"
32+
},
33+
"customData": {
34+
"$ref": "#/definitions/CustomDataType"
35+
}
36+
},
37+
"required": [
38+
"timestamp",
39+
"signal"
40+
]
41+
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-06/schema#",
3+
"$id": "urn:OCPP:Cp:2:2025:1:AFRRSignalResponse",
4+
"comment": "OCPP 2.1 Edition 1 (c) OCA, Creative Commons Attribution-NoDerivatives 4.0 International Public License",
5+
"definitions": {
6+
"GenericStatusEnumType": {
7+
"javaType": "GenericStatusEnum",
8+
"type": "string",
9+
"additionalProperties": false,
10+
"enum": [
11+
"Accepted",
12+
"Rejected"
13+
]
14+
},
15+
"StatusInfoType": {
16+
"description": "Element providing more information about the status.\r\n",
17+
"javaType": "StatusInfo",
18+
"type": "object",
19+
"additionalProperties": false,
20+
"properties": {
21+
"reasonCode": {
22+
"description": "A predefined code for the reason why the status is returned in this response. The string is case-insensitive.\r\n",
23+
"type": "string",
24+
"maxLength": 20
25+
},
26+
"additionalInfo": {
27+
"description": "Additional text to provide detailed information.\r\n",
28+
"type": "string",
29+
"maxLength": 1024
30+
},
31+
"customData": {
32+
"$ref": "#/definitions/CustomDataType"
33+
}
34+
},
35+
"required": [
36+
"reasonCode"
37+
]
38+
},
39+
"CustomDataType": {
40+
"description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.",
41+
"javaType": "CustomData",
42+
"type": "object",
43+
"properties": {
44+
"vendorId": {
45+
"type": "string",
46+
"maxLength": 255
47+
}
48+
},
49+
"required": [
50+
"vendorId"
51+
]
52+
}
53+
},
54+
"type": "object",
55+
"additionalProperties": false,
56+
"properties": {
57+
"status": {
58+
"$ref": "#/definitions/GenericStatusEnumType"
59+
},
60+
"statusInfo": {
61+
"$ref": "#/definitions/StatusInfoType"
62+
},
63+
"customData": {
64+
"$ref": "#/definitions/CustomDataType"
65+
}
66+
},
67+
"required": [
68+
"status"
69+
]
70+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-06/schema#",
3+
"$id": "urn:OCPP:Cp:2:2025:1:AdjustPeriodicEventStreamRequest",
4+
"comment": "OCPP 2.1 Edition 1 (c) OCA, Creative Commons Attribution-NoDerivatives 4.0 International Public License",
5+
"definitions": {
6+
"PeriodicEventStreamParamsType": {
7+
"javaType": "PeriodicEventStreamParams",
8+
"type": "object",
9+
"additionalProperties": false,
10+
"properties": {
11+
"interval": {
12+
"description": "Time in seconds after which stream data is sent.\r\n",
13+
"type": "integer",
14+
"minimum": 0.0
15+
},
16+
"values": {
17+
"description": "Number of items to be sent together in stream.\r\n",
18+
"type": "integer",
19+
"minimum": 0.0
20+
},
21+
"customData": {
22+
"$ref": "#/definitions/CustomDataType"
23+
}
24+
}
25+
},
26+
"CustomDataType": {
27+
"description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.",
28+
"javaType": "CustomData",
29+
"type": "object",
30+
"properties": {
31+
"vendorId": {
32+
"type": "string",
33+
"maxLength": 255
34+
}
35+
},
36+
"required": [
37+
"vendorId"
38+
]
39+
}
40+
},
41+
"type": "object",
42+
"additionalProperties": false,
43+
"properties": {
44+
"id": {
45+
"type": "integer",
46+
"minimum": 0.0
47+
},
48+
"params": {
49+
"$ref": "#/definitions/PeriodicEventStreamParamsType"
50+
},
51+
"customData": {
52+
"$ref": "#/definitions/CustomDataType"
53+
}
54+
},
55+
"required": [
56+
"id",
57+
"params"
58+
]
59+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-06/schema#",
3+
"$id": "urn:OCPP:Cp:2:2025:1:AdjustPeriodicEventStreamResponse",
4+
"comment": "OCPP 2.1 Edition 1 (c) OCA, Creative Commons Attribution-NoDerivatives 4.0 International Public License",
5+
"definitions": {
6+
"GenericStatusEnumType": {
7+
"description": "Status of operation.\r\n",
8+
"javaType": "GenericStatusEnum",
9+
"type": "string",
10+
"additionalProperties": false,
11+
"enum": [
12+
"Accepted",
13+
"Rejected"
14+
]
15+
},
16+
"StatusInfoType": {
17+
"description": "Element providing more information about the status.\r\n",
18+
"javaType": "StatusInfo",
19+
"type": "object",
20+
"additionalProperties": false,
21+
"properties": {
22+
"reasonCode": {
23+
"description": "A predefined code for the reason why the status is returned in this response. The string is case-insensitive.\r\n",
24+
"type": "string",
25+
"maxLength": 20
26+
},
27+
"additionalInfo": {
28+
"description": "Additional text to provide detailed information.\r\n",
29+
"type": "string",
30+
"maxLength": 1024
31+
},
32+
"customData": {
33+
"$ref": "#/definitions/CustomDataType"
34+
}
35+
},
36+
"required": [
37+
"reasonCode"
38+
]
39+
},
40+
"CustomDataType": {
41+
"description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.",
42+
"javaType": "CustomData",
43+
"type": "object",
44+
"properties": {
45+
"vendorId": {
46+
"type": "string",
47+
"maxLength": 255
48+
}
49+
},
50+
"required": [
51+
"vendorId"
52+
]
53+
}
54+
},
55+
"type": "object",
56+
"additionalProperties": false,
57+
"properties": {
58+
"status": {
59+
"$ref": "#/definitions/GenericStatusEnumType"
60+
},
61+
"statusInfo": {
62+
"$ref": "#/definitions/StatusInfoType"
63+
},
64+
"customData": {
65+
"$ref": "#/definitions/CustomDataType"
66+
}
67+
},
68+
"required": [
69+
"status"
70+
]
71+
}

0 commit comments

Comments
 (0)