Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zhmes-agecal
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
zhmes-agecal
Commits
ae6876e7
Commit
ae6876e7
authored
Sep 17, 2025
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 扫托盘 上料 测试
parent
de5e66bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
NettyUdpServerHandler.java
...om/zehong/system/netty/handler/NettyUdpServerHandler.java
+3
-4
RobotArmCommandServiceImpl.java
...ehong/system/service/impl/RobotArmCommandServiceImpl.java
+1
-1
No files found.
zhmes-agecal-system/src/main/java/com/zehong/system/netty/handler/NettyUdpServerHandler.java
View file @
ae6876e7
...
...
@@ -50,7 +50,7 @@ public class NettyUdpServerHandler extends SimpleChannelInboundHandler<DatagramP
/**
* 当前正在处理的指令信息
*/
private
final
Map
<
S
ocketAddress
,
CommandExecution
>
currentCommands
=
new
ConcurrentHashMap
<>();
private
final
Map
<
S
tring
,
CommandExecution
>
currentCommands
=
new
ConcurrentHashMap
<>();
// 线程安全锁,确保文件写入安全
private
final
ReentrantLock
fileLock
=
new
ReentrantLock
();
...
...
@@ -140,8 +140,7 @@ public class NettyUdpServerHandler extends SimpleChannelInboundHandler<DatagramP
// 处理指令完成
if
(
status
.
isFullyIdle
())
{
log
.
info
(
"处理指令完成跟踪: {}"
,
sender
);
CommandExecution
execution
=
currentCommands
.
get
(
sender
);
CommandExecution
execution
=
currentCommands
.
get
(
"127.0.0.1"
);
if
(
execution
!=
null
)
{
robotArmCommandService
.
completeCommand
(
execution
.
commandId
);
currentCommands
.
remove
(
sender
);
...
...
@@ -159,7 +158,7 @@ public class NettyUdpServerHandler extends SimpleChannelInboundHandler<DatagramP
/**
* 记录当前执行的指令
*/
public
void
registerCommandExecution
(
S
ocketAddress
address
,
Long
commandId
)
{
public
void
registerCommandExecution
(
S
tring
address
,
Long
commandId
)
{
CommandExecution
execution
=
new
CommandExecution
();
execution
.
commandId
=
commandId
;
execution
.
startTime
=
System
.
currentTimeMillis
();
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/RobotArmCommandServiceImpl.java
View file @
ae6876e7
...
...
@@ -130,7 +130,7 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
);
// 注册指令跟踪
nettyUdpServerHandler
.
registerCommandExecution
(
address
,
command
.
getRobotArmCommandId
());
nettyUdpServerHandler
.
registerCommandExecution
(
"127.0.0.1"
,
command
.
getRobotArmCommandId
());
}
/**
...
...
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