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
4e2d0641
Commit
4e2d0641
authored
Jun 26, 2025
by
黄谋临
Browse files
添加DTO对象
parent
a4a03037
Changes
26
Expand all
Show whitespace changes
Inline
Side-by-side
src/main/java/com/cusc/adas/v2x/utils/Parse.java
View file @
4e2d0641
This diff is collapsed.
Click to expand it.
src/main/java/com/cusc/adas/v2x/utils/SM4Utils.java
View file @
4e2d0641
...
...
@@ -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
);
...
...
src/main/java/com/cusc/adas/v2x/vehiclesubscribe/vo/VehicleSubscribeMessageBody.java
View file @
4e2d0641
package
com.cusc.adas.v2x.vehiclesubscribe.vo
;
public
class
VehicleSubscribeMessageBody
{
import
com.cusc.adas.v2x.utils.FieldDef
;
import
com.cusc.adas.v2x.utils.NumFlag
;
import
com.cusc.adas.v2x.utils.Order
;
import
com.cusc.adas.v2x.utils.RefNumFlag
;
public
class
VehicleSubscribeMessageBody
{
@Order
(
1
)
@FieldDef
(
type
=
"BYTE"
,
isArray
=
true
,
length
=
8
)
private
String
vehicleId
;
private
byte
subsLen
;
private
Byte
[]
funcSubscribe
;
@Order
(
2
)
@NumFlag
private
short
subsLen
;
@Order
(
3
)
@RefNumFlag
(
value
=
"subsLen"
)
@FieldDef
(
type
=
"BYTE[N]"
,
isArray
=
true
)
private
byte
[]
funcSubscribe
;
...
...
src/main/java/com/cusc/adas/v2x/vo/DynamicsClassMap.java
0 → 100644
View file @
4e2d0641
package
com.cusc.adas.v2x.vo
;
import
java.util.HashMap
;
import
java.util.Map
;
import
com.cusc.adas.v2x.assist.vo.TrafficLight
;
import
com.cusc.adas.v2x.clouddecision.vo.AbnormalVehicle
;
import
com.cusc.adas.v2x.clouddecision.vo.AutoSpeedLimit
;
import
com.cusc.adas.v2x.clouddecision.vo.EmergencyVehicle
;
import
com.cusc.adas.v2x.clouddecision.vo.FawWarnning
;
import
com.cusc.adas.v2x.clouddecision.vo.RSIWarnning
;
import
com.cusc.adas.v2x.clouddecision.vo.TrafficLightInfo
;
public
class
DynamicsClassMap
{
private
static
Map
<
String
,
Map
<
Short
,
Class
>>
map
=
new
HashMap
<>();
static
{
Map
<
Short
,
Class
>
cloundDecisionsubMap
=
new
HashMap
<>();
// 参考 adviceType 列表定义
cloundDecisionsubMap
.
put
((
short
)
1
,
TrafficLightInfo
.
class
);
//信号灯路口车速引导功能指令
cloundDecisionsubMap
.
put
((
short
)
5
,
AutoSpeedLimit
.
class
);
//动态车道级限速指令
cloundDecisionsubMap
.
put
((
short
)
9
,
FawWarnning
.
class
);
//前向碰撞预警
cloundDecisionsubMap
.
put
((
short
)
11
,
AbnormalVehicle
.
class
);
//异常车辆预警
cloundDecisionsubMap
.
put
((
short
)
13
,
EmergencyVehicle
.
class
);
//紧急车辆预警
cloundDecisionsubMap
.
put
((
short
)
17
,
RSIWarnning
.
class
);
//通用 RSI 预警
map
.
put
(
"CloudDecision"
,
cloundDecisionsubMap
);
Map
<
Short
,
Class
>
assistSubMap
=
new
HashMap
<>();
assistSubMap
.
put
((
short
)
7
,
TrafficLight
.
class
);
map
.
put
(
"assist"
,
assistSubMap
);
}
public
static
Class
get
(
String
classtype
,
Short
classkey
)
{
Map
<
Short
,
Class
>
subMap
=
map
.
get
(
classtype
);
return
subMap
.
get
(
classkey
);
}
}
src/main/java/com/cusc/adas/v2x/vo/VehicleMessageBody.java
View file @
4e2d0641
...
...
@@ -8,9 +8,9 @@ public class VehicleMessageBody {
@Order
(
1
)
private
VehicleInfo
vehicleInfo
;
/****车辆辅助驾驶信息及状态信息*/
//
@Order(2)
//
private VehicleStatusInfo vehicleStatusInfo;
@Order
(
2
)
private
VehicleStatusInfo
vehicleStatusInfo
;
// //车辆自动驾驶信息
//
@Order(3)
//
private AutomaticDriveInfo automaticDriveInfo;
@Order
(
3
)
private
AutomaticDriveInfo
automaticDriveInfo
;
}
src/main/java/com/cusc/adas/v2x/vo/VehicleStatusInfo.java
View file @
4e2d0641
...
...
@@ -110,11 +110,11 @@ public class VehicleStatusInfo {
//数据偏移量 200,表示-200.00 m/s~200.00 m/s,
@Order
(
27
)
@RefNumFlag
(
value
=
"wheelNum"
)
private
int
[]
wheelVelocity
;
private
List
<
Integer
>
wheelVelocity
;
//胎压
@Order
(
28
)
@RefNumFlag
(
value
=
"wheelNum"
)
private
int
[]
tirePressure
;
private
List
<
Integer
>
tirePressure
;
//车灯状态 BIT2 = 左转灯 BIT3 = 右转灯
@Order
(
30
)
private
int
lights
;
...
...
Prev
1
2
Next
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