Skip to content

Commit ff6eaf7

Browse files
committed
updated doc submodule
1 parent 42c545f commit ff6eaf7

File tree

9 files changed

+37
-38
lines changed

9 files changed

+37
-38
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ cd saic-java-client
3838

3939
Checkout submodules
4040
```bash
41-
git submodule init
42-
git submodule update
41+
git submodule update --init --recursive
4342
```
4443

4544
Build and test

saic-java-api-cli/src/main/java/net/heberling/ismart/cli/GetData.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import net.heberling.ismart.asn1.v1_1.entity.MP_UserLoggingInReq;
2424
import net.heberling.ismart.asn1.v1_1.entity.MP_UserLoggingInResp;
2525
import net.heberling.ismart.asn1.v1_1.entity.VinInfo;
26-
import net.heberling.ismart.asn1.v3_0.entity.OTA_ChrgMangDataResp;
26+
import net.heberling.ismart.asn1.v3_0.entity.OTAChrgMangDataResp;
2727
import org.bn.annotations.ASN1Enum;
2828
import org.bn.annotations.ASN1Sequence;
2929
import org.bn.coders.IASN1PreparedElement;
@@ -89,14 +89,14 @@ public static void main(String[] args) throws IOException {
8989
URI.create("https://tap-eu.soimt.com/TAP.Web/ota.mpv30"),
9090
chargingStatusRequestMessage);
9191

92-
net.heberling.ismart.asn1.v3_0.Message<OTA_ChrgMangDataResp> chargingStatusResponseMessage =
93-
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTA_ChrgMangDataResp.class)
92+
net.heberling.ismart.asn1.v3_0.Message<OTAChrgMangDataResp> chargingStatusResponseMessage =
93+
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTAChrgMangDataResp.class)
9494
.decodeResponse(chargingStatusResponse);
9595

9696
System.out.println(
9797
toJSON(
9898
anonymized(
99-
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTA_ChrgMangDataResp.class),
99+
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTAChrgMangDataResp.class),
100100
chargingStatusResponseMessage)));
101101

102102
// we get an eventId back...
@@ -125,13 +125,13 @@ public static void main(String[] args) throws IOException {
125125
chargingStatusRequestMessage);
126126

127127
chargingStatusResponseMessage =
128-
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTA_ChrgMangDataResp.class)
128+
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTAChrgMangDataResp.class)
129129
.decodeResponse(chargingStatusResponse);
130130

131131
System.out.println(
132132
toJSON(
133133
anonymized(
134-
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTA_ChrgMangDataResp.class),
134+
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTAChrgMangDataResp.class),
135135
chargingStatusResponseMessage)));
136136
}
137137
}

saic-java-api-cli/src/test/java/net/heberling/ismart/asn1/v3_0/MessageCoderTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import static org.junit.jupiter.api.Assertions.*;
44

55
import net.heberling.ismart.asn1.AbstractMessageCoderTest;
6-
import net.heberling.ismart.asn1.v3_0.entity.OTA_ChrgMangDataResp;
6+
import net.heberling.ismart.asn1.v3_0.entity.OTAChrgMangDataResp;
77
import org.bn.coders.IASN1PreparedElement;
88
import org.junit.jupiter.api.Test;
99

@@ -17,7 +17,7 @@ void decodeEncodeRequest_516() {
1717

1818
@Test
1919
void decodeEncodeResponse_516() {
20-
decodeEncode("516_768_response", new MessageCoder<>(OTA_ChrgMangDataResp.class));
20+
decodeEncode("516_768_response", new MessageCoder<>(OTAChrgMangDataResp.class));
2121
}
2222

2323
@Test
@@ -28,6 +28,6 @@ void decodeEncodeRequest_516_with_eventid() {
2828

2929
@Test
3030
void decodeEncodeResponse_516_with_eventid() {
31-
decodeEncode("516_768_response_with_eventid", new MessageCoder<>(OTA_ChrgMangDataResp.class));
31+
decodeEncode("516_768_response_with_eventid", new MessageCoder<>(OTAChrgMangDataResp.class));
3232
}
3333
}

saic-java-api-gateway/src/main/java/net/heberling/ismart/gateway/GetData.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import net.heberling.ismart.asn1.v1_1.MessageCoder;
2121
import net.heberling.ismart.asn1.v1_1.entity.MP_UserLoggingInReq;
2222
import net.heberling.ismart.asn1.v1_1.entity.MP_UserLoggingInResp;
23-
import net.heberling.ismart.asn1.v3_0.entity.OTA_ChrgMangDataResp;
23+
import net.heberling.ismart.asn1.v3_0.entity.OTAChrgMangDataResp;
2424
import org.bn.annotations.ASN1Enum;
2525
import org.bn.coders.IASN1PreparedElement;
2626

@@ -92,8 +92,8 @@ public static String[] startResponse(String[] args) throws IOException {
9292
sendRequest(
9393
URI.create("https://tap-eu.soimt.com/TAP.Web/ota.mpv30"), chargingStatusRequestMessage);
9494

95-
net.heberling.ismart.asn1.v3_0.Message<OTA_ChrgMangDataResp> chargingStatusResponseMessage =
96-
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTA_ChrgMangDataResp.class)
95+
net.heberling.ismart.asn1.v3_0.Message<OTAChrgMangDataResp> chargingStatusResponseMessage =
96+
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTAChrgMangDataResp.class)
9797
.decodeResponse(chargingStatusResponse);
9898

9999
// System.out.println(chargingStatusResponse);
@@ -134,7 +134,7 @@ public static String[] startResponse(String[] args) throws IOException {
134134
chargingStatusRequestMessage);
135135

136136
chargingStatusResponseMessage =
137-
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTA_ChrgMangDataResp.class)
137+
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTAChrgMangDataResp.class)
138138
.decodeResponse(chargingStatusResponse);
139139

140140
// System.out.println(chargingStatusResponse);

saic-java-client/src/main/java/net/heberling/ismart/abrp/ABRP.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import java.util.Objects;
88
import java.util.stream.Collectors;
99
import net.heberling.ismart.asn1.v2_1.entity.OTA_RVMVehicleStatusResp25857;
10-
import net.heberling.ismart.asn1.v3_0.entity.OTA_ChrgMangDataResp;
10+
import net.heberling.ismart.asn1.v3_0.entity.OTAChrgMangDataResp;
1111
import org.apache.hc.client5.http.ClientProtocolException;
1212
import org.apache.hc.client5.http.classic.methods.HttpGet;
1313
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
@@ -27,7 +27,7 @@ public static String updateAbrp(
2727
String abrpApiKey,
2828
String abrpUserToken,
2929
OTA_RVMVehicleStatusResp25857 vehicleStatus,
30-
OTA_ChrgMangDataResp chargeStatus) {
30+
OTAChrgMangDataResp chargeStatus) {
3131
try (CloseableHttpClient httpclient = HttpClients.createDefault()) {
3232
// Request parameters and other properties.
3333
HashMap<String, Object> map = new HashMap<>();

saic-java-mqtt-gateway/src/main/java/net/heberling/ismart/mqtt/ReflectionFeature.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void beforeAnalysis(BeforeAnalysisAccess access) {
3737
register(net.heberling.ismart.asn1.v3_0.MP_DispatcherHeader.class);
3838
register(net.heberling.ismart.asn1.v1_1.entity.StartEndNumber.class);
3939
register(net.heberling.ismart.asn1.v2_1.MP_DispatcherBody.class);
40-
register(net.heberling.ismart.asn1.v3_0.entity.OTA_ChrgMangDataResp.class);
40+
register(net.heberling.ismart.asn1.v3_0.entity.OTAChrgMangDataResp.class);
4141
register(net.heberling.ismart.asn1.v3_0.DataEncodingType.class);
4242
register(net.heberling.ismart.asn1.v1_1.entity.VinInfo.class);
4343
register(net.heberling.ismart.asn1.v1_1.entity.AdvertiseResp.class);

saic-java-mqtt-gateway/src/main/java/net/heberling/ismart/mqtt/VehicleHandler.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
import net.heberling.ismart.asn1.v2_1.entity.OTA_RVMVehicleStatusResp25857;
2222
import net.heberling.ismart.asn1.v2_1.entity.RvcReqParam;
2323
import net.heberling.ismart.asn1.v3_0.Message;
24-
import net.heberling.ismart.asn1.v3_0.entity.OTA_ChrgCtrlReq;
25-
import net.heberling.ismart.asn1.v3_0.entity.OTA_ChrgCtrlStsResp;
26-
import net.heberling.ismart.asn1.v3_0.entity.OTA_ChrgMangDataResp;
24+
import net.heberling.ismart.asn1.v3_0.entity.OTAChrgCtrlReq;
25+
import net.heberling.ismart.asn1.v3_0.entity.OTAChrgCtrlStsResp;
26+
import net.heberling.ismart.asn1.v3_0.entity.OTAChrgMangDataResp;
2727
import org.bn.coders.IASN1PreparedElement;
2828
import org.eclipse.paho.client.mqttv3.IMqttClient;
2929
import org.eclipse.paho.client.mqttv3.MqttException;
@@ -78,7 +78,7 @@ void handleVehicle() throws MqttException, IOException {
7878
OTA_RVMVehicleStatusResp25857 vehicleStatus =
7979
updateVehicleStatus(uid, token, vinInfo.getVin());
8080

81-
OTA_ChrgMangDataResp chargeStatus = updateChargeStatus(uid, token, vinInfo.getVin());
81+
OTAChrgMangDataResp chargeStatus = updateChargeStatus(uid, token, vinInfo.getVin());
8282
final String abrpApiKey = saicMqttGateway.getAbrpApiKey();
8383
final String abrpUserToken = saicMqttGateway.getAbrpUserToken(vinInfo.getVin());
8484
if (abrpApiKey != null && abrpUserToken != null && vehicleStatus != null) {
@@ -194,7 +194,7 @@ private OTA_RVMVehicleStatusResp25857 updateVehicleStatus(String uid, String tok
194194
return vehicleStatusResponseMessage.getApplicationData();
195195
}
196196

197-
private OTA_ChrgMangDataResp updateChargeStatus(String uid, String token, String vin)
197+
private OTAChrgMangDataResp updateChargeStatus(String uid, String token, String vin)
198198
throws IOException, MqttException {
199199
net.heberling.ismart.asn1.v3_0.MessageCoder<IASN1PreparedElement>
200200
chargingStatusRequestMessageEncoder =
@@ -214,14 +214,14 @@ private OTA_ChrgMangDataResp updateChargeStatus(String uid, String token, String
214214
String chargingStatusResponse =
215215
Client.sendRequest(saicUri.resolve("/TAP.Web/ota.mpv30"), chargingStatusRequestMessage);
216216

217-
net.heberling.ismart.asn1.v3_0.Message<OTA_ChrgMangDataResp> chargingStatusResponseMessage =
218-
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTA_ChrgMangDataResp.class)
217+
net.heberling.ismart.asn1.v3_0.Message<OTAChrgMangDataResp> chargingStatusResponseMessage =
218+
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTAChrgMangDataResp.class)
219219
.decodeResponse(chargingStatusResponse);
220220

221221
LOGGER.debug(
222222
SaicMqttGateway.toJSON(
223223
SaicMqttGateway.anonymized(
224-
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTA_ChrgMangDataResp.class),
224+
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTAChrgMangDataResp.class),
225225
chargingStatusResponseMessage)));
226226

227227
// we get an eventId back...
@@ -256,13 +256,13 @@ private OTA_ChrgMangDataResp updateChargeStatus(String uid, String token, String
256256
Client.sendRequest(saicUri.resolve("/TAP.Web/ota.mpv30"), chargingStatusRequestMessage);
257257

258258
chargingStatusResponseMessage =
259-
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTA_ChrgMangDataResp.class)
259+
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTAChrgMangDataResp.class)
260260
.decodeResponse(chargingStatusResponse);
261261

262262
LOGGER.debug(
263263
SaicMqttGateway.toJSON(
264264
SaicMqttGateway.anonymized(
265-
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTA_ChrgMangDataResp.class),
265+
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTAChrgMangDataResp.class),
266266
chargingStatusResponseMessage)));
267267
}
268268
vehicleState.handleChargeStatusMessage(chargingStatusResponseMessage);
@@ -391,29 +391,29 @@ private void sendCharging(boolean state)
391391
TimeoutException,
392392
MqttException,
393393
IOException {
394-
net.heberling.ismart.asn1.v3_0.MessageCoder<OTA_ChrgCtrlReq> otaRvcReqMessageCoder =
395-
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTA_ChrgCtrlReq.class);
394+
net.heberling.ismart.asn1.v3_0.MessageCoder<OTAChrgCtrlReq> otaRvcReqMessageCoder =
395+
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTAChrgCtrlReq.class);
396396

397397
// we send a command end expect the car to wake up
398398
vehicleState.notifyCarActivityTime(OffsetDateTime.now(), false);
399399

400-
OTA_ChrgCtrlReq req = new OTA_ChrgCtrlReq();
400+
OTAChrgCtrlReq req = new OTAChrgCtrlReq();
401401
req.setTboxV2XReq(0);
402402
req.setTboxEleccLckCtrlReq(0);
403403
req.setChrgCtrlReq(state ? 1 : 2);
404404

405-
Message<OTA_ChrgCtrlReq> sendCommandRequest =
405+
Message<OTAChrgCtrlReq> sendCommandRequest =
406406
otaRvcReqMessageCoder.initializeMessage(uid, token, vinInfo.getVin(), "516", 768, 7, req);
407407

408408
String sendCommandRequestMessage = otaRvcReqMessageCoder.encodeRequest(sendCommandRequest);
409409

410410
String sendCommandResponseMessage =
411411
Client.sendRequest(saicUri.resolve("/TAP.Web/ota.mpv30"), sendCommandRequestMessage);
412412

413-
final net.heberling.ismart.asn1.v3_0.MessageCoder<OTA_ChrgCtrlStsResp>
413+
final net.heberling.ismart.asn1.v3_0.MessageCoder<OTAChrgCtrlStsResp>
414414
otaRvcStatus25857MessageCoder =
415-
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTA_ChrgCtrlStsResp.class);
416-
net.heberling.ismart.asn1.v3_0.Message<OTA_ChrgCtrlStsResp> sendCommandReqestMessage =
415+
new net.heberling.ismart.asn1.v3_0.MessageCoder<>(OTAChrgCtrlStsResp.class);
416+
net.heberling.ismart.asn1.v3_0.Message<OTAChrgCtrlStsResp> sendCommandReqestMessage =
417417
otaRvcStatus25857MessageCoder.decodeResponse(sendCommandResponseMessage);
418418

419419
// ... use that to request the data again, until we have it

saic-java-mqtt-gateway/src/main/java/net/heberling/ismart/mqtt/VehicleState.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import net.heberling.ismart.asn1.v1_1.entity.VinInfo;
1515
import net.heberling.ismart.asn1.v2_1.Message;
1616
import net.heberling.ismart.asn1.v2_1.entity.OTA_RVMVehicleStatusResp25857;
17-
import net.heberling.ismart.asn1.v3_0.entity.OTA_ChrgMangDataResp;
17+
import net.heberling.ismart.asn1.v3_0.entity.OTAChrgMangDataResp;
1818
import org.eclipse.paho.client.mqttv3.IMqttClient;
1919
import org.eclipse.paho.client.mqttv3.MqttException;
2020
import org.eclipse.paho.client.mqttv3.MqttMessage;
@@ -395,7 +395,7 @@ private static String toRemoteClimate(Integer remoteClimateStatus) {
395395
}
396396

397397
public void handleChargeStatusMessage(
398-
net.heberling.ismart.asn1.v3_0.Message<OTA_ChrgMangDataResp> chargingStatusResponseMessage)
398+
net.heberling.ismart.asn1.v3_0.Message<OTAChrgMangDataResp> chargingStatusResponseMessage)
399399
throws MqttException {
400400
MqttMessage msg =
401401
new MqttMessage(

0 commit comments

Comments
 (0)