Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
RoboPLC
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
黄新宇
RoboPLC
Commits
5f2cc62a
提交
5f2cc62a
authored
4月 24, 2024
作者:
Serhij S
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
switched to parking_lot_rt fork
上级
6aa18939
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
14 行增加
和
12 行删除
+14
-12
Cargo.toml
Cargo.toml
+1
-1
buf.rs
src/buf.rs
+1
-1
mod.rs
src/comm/mod.rs
+1
-1
serial.rs
src/comm/serial.rs
+1
-1
tcp.rs
src/comm/tcp.rs
+1
-1
controller.rs
src/controller.rs
+1
-1
hub.rs
src/hub.rs
+1
-1
hub_async.rs
src/hub_async.rs
+1
-1
server.rs
src/io/modbus/server.rs
+1
-1
lib.rs
src/lib.rs
+2
-0
pchannel.rs
src/pchannel.rs
+1
-1
pchannel_async.rs
src/pchannel_async.rs
+1
-1
semaphore.rs
src/semaphore.rs
+1
-1
没有找到文件。
Cargo.toml
浏览文件 @
5f2cc62a
...
...
@@ -24,7 +24,6 @@ libc = "0.2.153"
nix
=
{
version
=
"0.27"
,
features
=
["signal"]
}
object-id
=
"0.1.3"
oneshot
=
{
version
=
"0.1.6"
,
default-features
=
false
,
features
=
["std"]
}
parking_lot
=
"0.12.1"
pin-project
=
"1.1.5"
rmodbus
=
{
version
=
"0.9.4"
,
optional
=
true
}
roboplc-derive
=
{
version
=
"0.1"
}
...
...
@@ -43,6 +42,7 @@ env_logger = "0.10"
log
=
"0.4.21"
metrics-exporter-prometheus
=
{
version
=
"0.14.0"
,
optional
=
true
,
default-features
=
false
,
features
=
["http-listener"]
}
metrics
=
{
version
=
"0.22.3"
,
optional
=
true
}
parking_lot_rt
=
"0.12.1"
[features]
eapi
=
[
"eva-common"
,
"eva-sdk"
,
"busrt"
,
"tokio"
,
"hostname"
]
...
...
src/buf.rs
浏览文件 @
5f2cc62a
use
std
::
collections
::
VecDeque
;
use
parking_lot
::
Mutex
;
use
parking_lot
_rt
::
Mutex
;
/// A capacity-limited thread-safe deque-based data buffer
pub
struct
DataBuffer
<
T
>
{
...
...
src/comm/mod.rs
浏览文件 @
5f2cc62a
use
parking_lot
::
MutexGuard
;
use
parking_lot
_rt
::
MutexGuard
;
use
std
::{
io
::{
Read
,
Write
},
net
::
SocketAddr
,
...
...
src/comm/serial.rs
浏览文件 @
5f2cc62a
...
...
@@ -3,7 +3,7 @@ use crate::{Error, Result};
use
super
::
Client
;
use
super
::
Communicator
;
use
super
::
Protocol
;
use
parking_lot
::{
Mutex
,
MutexGuard
};
use
parking_lot
_rt
::{
Mutex
,
MutexGuard
};
use
serial
::
prelude
::
*
;
use
serial
::
SystemPort
;
use
std
::
io
;
...
...
src/comm/tcp.rs
浏览文件 @
5f2cc62a
...
...
@@ -5,7 +5,7 @@ use super::{
ChatFn
,
Client
,
CommReader
,
Communicator
,
ConnectionOptions
,
Protocol
,
Stream
,
Timeouts
,
};
use
core
::
fmt
;
use
parking_lot
::{
Mutex
,
MutexGuard
};
use
parking_lot
_rt
::{
Mutex
,
MutexGuard
};
use
std
::
io
::{
Read
,
Write
};
use
std
::
net
::{
self
,
TcpStream
};
use
std
::
net
::{
SocketAddr
,
ToSocketAddrs
};
...
...
src/controller.rs
浏览文件 @
5f2cc62a
...
...
@@ -15,7 +15,7 @@ use crate::{
thread_rt
::{
Builder
,
RTParams
,
Scheduling
},
DataDeliveryPolicy
,
Error
,
Result
,
};
use
parking_lot
::
RwLock
;
use
parking_lot
_rt
::
RwLock
;
pub
use
roboplc_derive
::
WorkerOpts
;
use
signal_hook
::{
consts
::{
SIGINT
,
SIGTERM
},
...
...
src/hub.rs
浏览文件 @
5f2cc62a
use
std
::
sync
::
Arc
;
use
parking_lot
::
Mutex
;
use
parking_lot
_rt
::
Mutex
;
use
crate
::
pchannel
::{
self
,
Receiver
,
Sender
};
use
crate
::{
DataDeliveryPolicy
,
Error
,
Result
};
...
...
src/hub_async.rs
浏览文件 @
5f2cc62a
use
std
::
future
::
Future
;
use
std
::
sync
::
Arc
;
use
parking_lot
::
Mutex
;
use
parking_lot
_rt
::
Mutex
;
use
crate
::
pchannel_async
::{
self
,
Receiver
,
Sender
};
use
crate
::{
DataDeliveryPolicy
,
Error
,
Result
};
...
...
src/io/modbus/server.rs
浏览文件 @
5f2cc62a
...
...
@@ -5,7 +5,7 @@ use crate::{
Error
,
Result
,
};
use
binrw
::{
BinRead
,
BinWrite
};
use
parking_lot
::
Mutex
;
use
parking_lot
_rt
::
Mutex
;
use
rmodbus
::{
server
::{
context
::
ModbusContext
,
storage
::
ModbusStorage
,
ModbusFrame
},
ModbusFrameBuf
,
ModbusProto
,
...
...
src/lib.rs
浏览文件 @
5f2cc62a
...
...
@@ -11,6 +11,8 @@ use thread_rt::{RTParams, Scheduling};
pub
use
log
::
LevelFilter
;
pub
use
roboplc_derive
::
DataPolicy
;
pub
use
parking_lot_rt
::{
Condvar
,
Mutex
,
Once
,
RwLock
};
#[cfg(feature
=
"metrics"
)]
pub
use
metrics
;
...
...
src/pchannel.rs
浏览文件 @
5f2cc62a
...
...
@@ -2,7 +2,7 @@ use std::{sync::Arc, time::Duration};
use
crate
::{
pdeque
::
Deque
,
DataDeliveryPolicy
,
Error
,
Result
};
use
object_id
::
UniqueId
;
use
parking_lot
::{
Condvar
,
Mutex
};
use
parking_lot
_rt
::{
Condvar
,
Mutex
};
/// An abstract trait for data channels and hubs
pub
trait
DataChannel
<
T
:
DataDeliveryPolicy
>
{
...
...
src/pchannel_async.rs
浏览文件 @
5f2cc62a
...
...
@@ -12,7 +12,7 @@ use std::{
use
crate
::{
pdeque
::
Deque
,
DataDeliveryPolicy
,
Error
,
Result
};
use
object_id
::
UniqueId
;
use
parking_lot
::{
Condvar
,
Mutex
};
use
parking_lot
_rt
::{
Condvar
,
Mutex
};
use
pin_project
::{
pin_project
,
pinned_drop
};
type
ClientId
=
usize
;
...
...
src/semaphore.rs
浏览文件 @
5f2cc62a
use
std
::
sync
::
Arc
;
use
parking_lot
::{
Condvar
,
Mutex
};
use
parking_lot
_rt
::{
Condvar
,
Mutex
};
/// A lightweight real-time safe semaphore
pub
struct
Semaphore
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论