Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
p x
earlywarning
Commits
101e1aa2
Commit
101e1aa2
authored
Jun 09, 2025
by
p x
Browse files
进程通信
parent
ca37a52c
Changes
5
Hide whitespace changes
Inline
Side-by-side
build.gradle.kts
View file @
101e1aa2
...
@@ -55,6 +55,9 @@ dependencies {
...
@@ -55,6 +55,9 @@ dependencies {
androidTestImplementation
(
libs
.
androidx
.
espresso
.
core
)
androidTestImplementation
(
libs
.
androidx
.
espresso
.
core
)
api
(
"io.netty:netty-all:4.1.92.Final"
)
api
(
"io.netty:netty-all:4.1.92.Final"
)
//事件分发
api
(
"org.greenrobot:eventbus:3.3.1"
)
implementation
(
"com.alibaba:fastjson:2.0.56"
)
implementation
(
"com.alibaba:fastjson:2.0.56"
)
implementation
(
"org.fusesource.mqtt-client:mqtt-client:1.12"
)
implementation
(
"org.fusesource.mqtt-client:mqtt-client:1.12"
)
implementation
(
"org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5"
)
implementation
(
"org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5"
)
...
...
src/main/java/com/cusc/adas/v2x/dto/VehicleBodyDto.java
View file @
101e1aa2
...
@@ -2,4 +2,9 @@ package com.cusc.adas.v2x.dto;
...
@@ -2,4 +2,9 @@ package com.cusc.adas.v2x.dto;
public
class
VehicleBodyDto
{
public
class
VehicleBodyDto
{
private
VehicleInfoDto
vehicleInfo
;
private
VehicleInfoDto
vehicleInfo
;
public
VehicleInfoDto
getVehicleInfo
()
{
return
vehicleInfo
;
}
}
}
src/main/java/com/cusc/adas/v2x/dto/VehicleInfoDto.java
View file @
101e1aa2
...
@@ -102,13 +102,21 @@ public class VehicleInfoDto {
...
@@ -102,13 +102,21 @@ public class VehicleInfoDto {
@Order
(
24
)
@Order
(
24
)
@RefNumFlag
(
value
=
"passPointsNum"
)
@RefNumFlag
(
value
=
"passPointsNum"
)
private
List
<
Position2DDto
>
passPoints
;
private
List
<
Position2DDto
>
passPoints
;
public
short
getTapPos
()
{
return
tapPos
;
}
public
float
getVelocity
()
{
return
velocity
;
}
public
short
getDriveMode
()
{
return
driveMode
;
}
public
double
getHeading
()
{
return
heading
;
}
}
}
src/main/java/com/cusc/adas/v2x/events/VehicleBodyEvent.kt
0 → 100644
View file @
101e1aa2
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
src/main/java/com/cusc/adas/v2x/utils/SM4Utils.java
View file @
101e1aa2
...
@@ -20,9 +20,9 @@ public class SM4Utils {
...
@@ -20,9 +20,9 @@ public class SM4Utils {
}
}
/**
/**
*
生成
SM4
密钥
*
????
SM4
???
* @return
密钥的
Base64
编码字符串
* @return
?????
Base64
?????????
* @throws Exception
异常
* @throws Exception
??
*/
*/
public
static
String
generateKey
()
throws
Exception
{
public
static
String
generateKey
()
throws
Exception
{
KeyGenerator
kg
=
KeyGenerator
.
getInstance
(
ALGORITHM_NAME
,
"BC"
);
KeyGenerator
kg
=
KeyGenerator
.
getInstance
(
ALGORITHM_NAME
,
"BC"
);
...
@@ -32,11 +32,11 @@ public class SM4Utils {
...
@@ -32,11 +32,11 @@ public class SM4Utils {
}
}
/**
/**
* SM4
加密
* SM4
????
* @param plainText
明文
* @param plainText
????
* @param key
密钥的
Base64
编码字符串
* @param key
?????
Base64
?????????
* @return
密文的
Base64
编码字符串
* @return
?????
Base64
?????????
* @throws Exception
异常
* @throws Exception
??
*/
*/
public
static
String
encrypt
(
String
plainText
,
String
key
)
throws
Exception
{
public
static
String
encrypt
(
String
plainText
,
String
key
)
throws
Exception
{
byte
[]
keyBytes
=
Base64
.
getDecoder
().
decode
(
key
);
byte
[]
keyBytes
=
Base64
.
getDecoder
().
decode
(
key
);
...
@@ -48,11 +48,11 @@ public class SM4Utils {
...
@@ -48,11 +48,11 @@ public class SM4Utils {
}
}
/**
/**
* SM4
解密
* SM4
????
* @param cipherText
密文的
Base64
编码字符串
* @param cipherText
?????
Base64
?????????
* @param key
密钥的
Base64
编码字符串
* @param key
?????
Base64
?????????
* @return
明文
* @return
????
* @throws Exception
异常
* @throws Exception
??
*/
*/
public
static
String
decrypt
(
String
cipherText
,
String
key
)
throws
Exception
{
public
static
String
decrypt
(
String
cipherText
,
String
key
)
throws
Exception
{
byte
[]
keyBytes
=
Base64
.
getDecoder
().
decode
(
key
);
byte
[]
keyBytes
=
Base64
.
getDecoder
().
decode
(
key
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment