Commit 101e1aa2 authored by p x's avatar p x
Browse files

进程通信

parent ca37a52c
......@@ -55,6 +55,9 @@ dependencies {
androidTestImplementation(libs.androidx.espresso.core)
api("io.netty:netty-all:4.1.92.Final")
//事件分发
api("org.greenrobot:eventbus:3.3.1")
implementation("com.alibaba:fastjson:2.0.56")
implementation("org.fusesource.mqtt-client:mqtt-client:1.12")
implementation("org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5")
......
......@@ -2,4 +2,9 @@ package com.cusc.adas.v2x.dto;
public class VehicleBodyDto {
private VehicleInfoDto vehicleInfo;
public VehicleInfoDto getVehicleInfo() {
return vehicleInfo;
}
}
......@@ -102,13 +102,21 @@ public class VehicleInfoDto {
@Order(24)
@RefNumFlag(value="passPointsNum")
private List<Position2DDto> passPoints;
public short getTapPos() {
return tapPos;
}
public float getVelocity() {
return velocity;
}
public short getDriveMode() {
return driveMode;
}
public double getHeading() {
return heading;
}
}
package com.cusc.adas.v2x.events
import com.cusc.adas.v2x.dto.VehicleInfoDto
/**车辆运行状态**/
class VehicleBodyEvent {
var vehicleInfo: VehicleInfoDto? = null
}
\ No newline at end of file
......@@ -20,9 +20,9 @@ public class SM4Utils {
}
/**
* 生成 SM4 密钥
* @return 密钥的 Base64 编码字符串
* @throws Exception 异常
* ???? SM4 ???
* @return ????? Base64 ?????????
* @throws Exception ??
*/
public static String generateKey() throws Exception {
KeyGenerator kg = KeyGenerator.getInstance(ALGORITHM_NAME, "BC");
......@@ -32,11 +32,11 @@ public class SM4Utils {
}
/**
* SM4 加密
* @param plainText 明文
* @param key 密钥的 Base64 编码字符串
* @return 密文的 Base64 编码字符串
* @throws Exception 异常
* SM4 ????
* @param plainText ????
* @param key ????? Base64 ?????????
* @return ????? Base64 ?????????
* @throws Exception ??
*/
public static String encrypt(String plainText, String key) throws Exception {
byte[] keyBytes = Base64.getDecoder().decode(key);
......@@ -48,11 +48,11 @@ public class SM4Utils {
}
/**
* SM4 解密
* @param cipherText 密文的 Base64 编码字符串
* @param key 密钥的 Base64 编码字符串
* @return 明文
* @throws Exception 异常
* SM4 ????
* @param cipherText ????? Base64 ?????????
* @param key ????? Base64 ?????????
* @return ????
* @throws Exception ??
*/
public static String decrypt(String cipherText, String key) throws Exception {
byte[] keyBytes = Base64.getDecoder().decode(key);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment