Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
cdy816
Mars
提交
d49a5c68
Mars
项目概览
cdy816
/
Mars
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Mars
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d49a5c68
编写于
7月 01, 2020
作者:
cdy816
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复死区压缩算法的Bug
上级
7674c9b8
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
1507 addition
and
288 deletion
+1507
-288
Common/Cdy.Tag.Common/Common/CustomQueue.cs
Common/Cdy.Tag.Common/Common/CustomQueue.cs
+6
-0
Common/Cdy.Tag.Common/Common/MarshalFixedMemoryBlock.cs
Common/Cdy.Tag.Common/Common/MarshalFixedMemoryBlock.cs
+1
-1
Develop/DBDevelopService/GrpcDBService.cs
Develop/DBDevelopService/GrpcDBService.cs
+8
-1
Develop/DBStudio/Program.cs
Develop/DBStudio/Program.cs
+9
-1
Develop/DBStudio/Properties/launchSettings.json
Develop/DBStudio/Properties/launchSettings.json
+1
-1
Develop/DbManager.Desktop/Properties/launchSettings.json
Develop/DbManager.Desktop/Properties/launchSettings.json
+1
-1
RunTime/DBInRun/Properties/launchSettings.json
RunTime/DBInRun/Properties/launchSettings.json
+1
-1
RunTime/DBRuntime/His/Compress/Special/DeadAreaCompressUnit.cs
...me/DBRuntime/His/Compress/Special/DeadAreaCompressUnit.cs
+675
-6
RunTime/DBRuntime/His/Compress/Special/LosslessCompressUnit.cs
...me/DBRuntime/His/Compress/Special/LosslessCompressUnit.cs
+24
-13
RunTime/DBRuntime/His/Compress/Special/SlopeCompressUnit.cs
RunTime/DBRuntime/His/Compress/Special/SlopeCompressUnit.cs
+780
-262
Tools/HisDataTools/Properties/launchSettings.json
Tools/HisDataTools/Properties/launchSettings.json
+1
-1
未找到文件。
Common/Cdy.Tag.Common/Common/CustomQueue.cs
浏览文件 @
d49a5c68
...
...
@@ -121,6 +121,12 @@ namespace Cdy.Tag
return
mColections
[
index
];
}
public
void
Restet
()
{
WriteIndex
=
0
;
ReadIndex
=
0
;
}
#
endregion
...
Methods
...
#
region
...
Interfaces
...
...
...
Common/Cdy.Tag.Common/Common/MarshalFixedMemoryBlock.cs
浏览文件 @
d49a5c68
...
...
@@ -1231,7 +1231,7 @@ namespace Cdy.Tag
public
virtual
void
Dispose
()
{
Marshal
.
FreeHGlobal
(
mHandles
);
LoggerService
.
Service
.
Erro
(
"MarshalFixedMemoryBlock"
,
Name
+
" Disposed "
);
LoggerService
.
Service
.
Info
(
"MarshalFixedMemoryBlock"
,
Name
+
" Disposed "
,
ConsoleColor
.
Red
);
//GC.Collect();
}
...
...
Develop/DBDevelopService/GrpcDBService.cs
浏览文件 @
d49a5c68
...
...
@@ -53,7 +53,14 @@ namespace DBDevelopService
/// </summary>
public
void
Start
(
int
port
)
{
StartAsync
(
"0.0.0.0"
,
port
);
try
{
StartAsync
(
"0.0.0.0"
,
port
);
}
catch
(
Exception
ex
)
{
LoggerService
.
Service
.
Erro
(
"GrpcDBService"
,
ex
.
Message
);
}
}
/// <summary>
...
...
Develop/DBStudio/Program.cs
浏览文件 @
d49a5c68
...
...
@@ -30,6 +30,9 @@ namespace DBStudio
WindowConsolHelper
.
DisbleQuickEditMode
();
Console
.
CancelKeyPress
+=
Console_CancelKeyPress
;
AppDomain
.
CurrentDomain
.
UnhandledException
+=
CurrentDomain_UnhandledException
;
LogoHelper
.
Print
();
DBDevelopService
.
Service
.
Instanse
.
Start
(
port
,
webPort
);
//OutByLine("", "输入exit退出服务");
...
...
@@ -77,6 +80,11 @@ namespace DBStudio
}
private
static
void
CurrentDomain_UnhandledException
(
object
sender
,
UnhandledExceptionEventArgs
e
)
{
LoggerService
.
Service
.
Erro
(
"GrpcDBService"
,
e
.
ExceptionObject
.
ToString
());
}
/// <summary>
///
...
...
@@ -840,7 +848,7 @@ namespace DBStudio
{
for
(
int
j
=
0
;
j
<
repeat
;
j
++)
{
var
vtag
=
new
Cdy
.
Tag
.
DoubleTag
()
{
Name
=
tag
+
j
,
LinkAddress
=
link
};
var
vtag
=
new
Cdy
.
Tag
.
DoubleTag
()
{
Name
=
tag
+
j
,
LinkAddress
=
link
,
Group
=
""
};
database
.
RealDatabase
.
Append
(
vtag
);
database
.
HisDatabase
.
AddHisTags
(
new
Cdy
.
Tag
.
HisTag
()
{
Id
=
vtag
.
Id
,
TagType
=
TagType
.
Double
,
Type
=
RecordType
.
Timer
,
Circle
=
1000
,
CompressType
=
0
});
}
...
...
Develop/DBStudio/Properties/launchSettings.json
浏览文件 @
d49a5c68
...
...
@@ -2,7 +2,7 @@
"profiles"
:
{
"DBInStudioServer"
:
{
"commandName"
:
"Executable"
,
"executablePath"
:
"C:
\\
Users
\\
cdy81
\\
source
\\
repos
\\
mars
\\
Output
\\
DBInStudioServer.exe"
"executablePath"
:
"C:
\\
Users
\\
Lenovo
\\
source
\\
repos
\\
mars
\\
Output
\\
DBInStudioServer.exe"
}
}
}
\ No newline at end of file
Develop/DbManager.Desktop/Properties/launchSettings.json
浏览文件 @
d49a5c68
...
...
@@ -2,7 +2,7 @@
"profiles"
:
{
"DBInStudio.Desktop"
:
{
"commandName"
:
"Executable"
,
"executablePath"
:
"C:
\\
Users
\\
cdy81
\\
source
\\
repos
\\
mars
\\
Output
\\
DBInStudio.exe"
"executablePath"
:
"C:
\\
Users
\\
Lenovo
\\
source
\\
repos
\\
mars
\\
Output
\\
DBInStudio.exe"
}
}
}
\ No newline at end of file
RunTime/DBInRun/Properties/launchSettings.json
浏览文件 @
d49a5c68
...
...
@@ -2,7 +2,7 @@
"profiles"
:
{
"DBInRun"
:
{
"commandName"
:
"Executable"
,
"executablePath"
:
"C:
\\
Users
\\
cdy81
\\
source
\\
repos
\\
mars
\\
Output
\\
DBInRun.exe"
"executablePath"
:
"C:
\\
Users
\\
Lenovo
\\
source
\\
repos
\\
mars
\\
Output
\\
DBInRun.exe"
}
}
}
\ No newline at end of file
RunTime/DBRuntime/His/Compress/Special/DeadAreaCompressUnit.cs
浏览文件 @
d49a5c68
此差异已折叠。
点击以展开。
RunTime/DBRuntime/His/Compress/Special/LosslessCompressUnit.cs
浏览文件 @
d49a5c68
...
...
@@ -28,7 +28,10 @@ namespace Cdy.Tag
protected
FloatCompressBuffer
mFCompress
;
private
CustomQueue
<
int
>
emptys
=
new
CustomQueue
<
int
>(
604
);
/// <summary>
///
/// </summary>
protected
CustomQueue
<
int
>
emptys
=
new
CustomQueue
<
int
>(
604
);
/// <summary>
///
...
...
@@ -117,8 +120,9 @@ namespace Cdy.Tag
{
int
preids
=
0
;
mVarintMemory
.
Reset
();
emptys
.
WriteIndex
=
0
;
emptyIds
.
ReadIndex
=
0
;
emptys
.
Restet
();
//emptys.WriteIndex = 0;
//emptyIds.ReadIndex = 0;
bool
isFirst
=
true
;
for
(
int
i
=
0
;
i
<
timerVals
.
Count
;
i
++)
{
...
...
@@ -144,12 +148,19 @@ namespace Cdy.Tag
return
mVarintMemory
.
DataBuffer
.
AsMemory
(
0
,
(
int
)
mVarintMemory
.
WritePosition
);
}
protected
Memory
<
byte
>
CompressTimers
(
MarshalMemoryBlock
timerVals
,
long
startaddr
,
int
count
,
CustomQueue
<
int
>
emptyIds
)
/// <summary>
///
/// </summary>
/// <param name="timerVals"></param>
/// <param name="startaddr"></param>
/// <param name="count"></param>
/// <param name="emptyIds"></param>
/// <returns></returns>
protected
virtual
Memory
<
byte
>
CompressTimers
(
MarshalMemoryBlock
timerVals
,
long
startaddr
,
int
count
,
CustomQueue
<
int
>
emptyIds
)
{
int
preids
=
0
;
mVarintMemory
.
Reset
();
emptyIds
.
WriteIndex
=
0
;
emptyIds
.
ReadIndex
=
0
;
emptys
.
Restet
();
bool
isFirst
=
true
;
int
id
=
0
;
...
...
@@ -699,7 +710,7 @@ namespace Cdy.Tag
//using (ProtoMemory memory = new ProtoMemory(qulitys.Length * 2))
mVarintMemory
.
Reset
();
int
ig
=
-
1
;
ig
=
empty
s
.
ReadIndex
<
emptyIds
.
WriteIndex
?
empty
s
.
IncRead
()
:
-
1
;
ig
=
empty
Ids
.
ReadIndex
<
emptyIds
.
WriteIndex
?
emptyId
s
.
IncRead
()
:
-
1
;
//emptyIds.TryDequeue(out ig);
mVarintMemory
.
WriteInt32
(
qus
);
for
(
int
i
=
1
;
i
<
totalcount
;
i
++)
...
...
@@ -721,7 +732,7 @@ namespace Cdy.Tag
}
else
{
ig
=
empty
s
.
ReadIndex
<
emptyIds
.
WriteIndex
?
empty
s
.
IncRead
()
:
-
1
;
ig
=
empty
Ids
.
ReadIndex
<
emptyIds
.
WriteIndex
?
emptyId
s
.
IncRead
()
:
-
1
;
// emptyIds.TryDequeue(out ig);
}
}
...
...
@@ -743,7 +754,7 @@ namespace Cdy.Tag
//using (ProtoMemory memory = new ProtoMemory(qulitys.Length * 2))
mVarintMemory
.
Reset
();
int
ig
=
-
1
;
ig
=
empty
s
.
ReadIndex
<
emptyIds
.
WriteIndex
?
empty
s
.
IncRead
()
:
-
1
;
ig
=
empty
Ids
.
ReadIndex
<
emptyIds
.
WriteIndex
?
emptyId
s
.
IncRead
()
:
-
1
;
mVarintMemory
.
WriteInt32
(
qus
);
for
(
int
i
=
1
;
i
<
qulitys
.
Length
;
i
++)
{
...
...
@@ -763,7 +774,7 @@ namespace Cdy.Tag
}
else
{
ig
=
empty
s
.
ReadIndex
<
emptyIds
.
WriteIndex
?
empty
s
.
IncRead
()
:
-
1
;
ig
=
empty
Ids
.
ReadIndex
<
emptyIds
.
WriteIndex
?
emptyId
s
.
IncRead
()
:
-
1
;
}
}
mVarintMemory
.
WriteInt32
(
count
);
...
...
@@ -781,7 +792,7 @@ namespace Cdy.Tag
byte
bval
=
source
.
ReadByte
(
offset
);
short
scount
=
1
;
int
ig
=
-
1
;
ig
=
empty
s
.
ReadIndex
<
emptyIds
.
WriteIndex
?
empty
s
.
IncRead
()
:
-
1
;
ig
=
empty
Ids
.
ReadIndex
<
emptyIds
.
WriteIndex
?
emptyId
s
.
IncRead
()
:
-
1
;
//emptyIds.TryDequeue(out ig);
short
sval
=
(
short
)(
bval
<<
15
);
...
...
@@ -805,7 +816,7 @@ namespace Cdy.Tag
}
else
{
ig
=
empty
s
.
ReadIndex
<
emptyIds
.
WriteIndex
?
empty
s
.
IncRead
()
:
-
1
;
ig
=
empty
Ids
.
ReadIndex
<
emptyIds
.
WriteIndex
?
emptyId
s
.
IncRead
()
:
-
1
;
// emptyIds.TryDequeue(out ig);
}
}
...
...
@@ -861,7 +872,7 @@ namespace Cdy.Tag
rsize
+=
4
;
rsize
+=
datas
.
Length
;
switch
(
TagT
ype
)
switch
(
t
ype
)
{
case
TagType
.
Bool
:
var
cval
=
CompressBoolValues
(
source
,
count
*
2
+
sourceAddr
,
count
,
emptys
);
...
...
RunTime/DBRuntime/His/Compress/Special/SlopeCompressUnit.cs
浏览文件 @
d49a5c68
此差异已折叠。
点击以展开。
Tools/HisDataTools/Properties/launchSettings.json
浏览文件 @
d49a5c68
...
...
@@ -2,7 +2,7 @@
"profiles"
:
{
"HisDataTools"
:
{
"commandName"
:
"Executable"
,
"executablePath"
:
"C:
\\
Users
\\
cdy81
\\
source
\\
repos
\\
mars
\\
Output
\\
HisDataTools.exe"
"executablePath"
:
"C:
\\
Users
\\
Lenovo
\\
source
\\
repos
\\
mars
\\
Output
\\
HisDataTools.exe"
}
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录