Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
cdy816
Mars
提交
d4331b76
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 搜索 >>
提交
d4331b76
编写于
9月 08, 2020
作者:
cdy816
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Spider 接口 Bug 修改
上级
0a1b7b8f
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
41 addition
and
32 deletion
+41
-32
Common/Cdy.Tag.Common/Cdy.Tag.Common.csproj
Common/Cdy.Tag.Common/Cdy.Tag.Common.csproj
+2
-0
Common/Cdy.Tag/Cdy.Tag.csproj
Common/Cdy.Tag/Cdy.Tag.csproj
+3
-0
Develop/DBDevelopClientWebApi/DBDevelopClientWebApi.csproj
Develop/DBDevelopClientWebApi/DBDevelopClientWebApi.csproj
+6
-0
Develop/DBStudio/Program.cs
Develop/DBStudio/Program.cs
+1
-1
Develop/DbManager.Desktop/View/TagGroupDetailView.xaml
Develop/DbManager.Desktop/View/TagGroupDetailView.xaml
+2
-2
Develop/DbManager.Desktop/View/TagGroupDetailView.xaml.cs
Develop/DbManager.Desktop/View/TagGroupDetailView.xaml.cs
+2
-1
Driver/SimDriver/Driver.cs
Driver/SimDriver/Driver.cs
+6
-21
Driver/SpiderDriver.ClientApi/DriverProxy.cs
Driver/SpiderDriver.ClientApi/DriverProxy.cs
+1
-1
Driver/SpiderDriver.ClientApi/SpiderDriver.ClientApi.csproj
Driver/SpiderDriver.ClientApi/SpiderDriver.ClientApi.csproj
+2
-0
Driver/SpiderDriver/Config/SpiderDriver.cfg
Driver/SpiderDriver/Config/SpiderDriver.cfg
+1
-1
Driver/SpiderDriver/RealDataServerProcess.cs
Driver/SpiderDriver/RealDataServerProcess.cs
+1
-0
Driver/SpiderDriver/SpiderDriver.csproj
Driver/SpiderDriver/SpiderDriver.csproj
+1
-1
Driver/SpiderDriver/TagInfoServerProcess.cs
Driver/SpiderDriver/TagInfoServerProcess.cs
+5
-3
Example/Producter/SpiderDriverDemo/MainWindow.xaml
Example/Producter/SpiderDriverDemo/MainWindow.xaml
+1
-1
Example/Producter/SpiderDriverDemo/MainWindow.xaml.cs
Example/Producter/SpiderDriverDemo/MainWindow.xaml.cs
+7
-0
未找到文件。
Common/Cdy.Tag.Common/Cdy.Tag.Common.csproj
浏览文件 @
d4331b76
...
...
@@ -2,6 +2,8 @@
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<PackageProjectUrl>https://github.com/cdy816/mars</PackageProjectUrl>
<Authors>Cdy</Authors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
...
...
Common/Cdy.Tag/Cdy.Tag.csproj
浏览文件 @
d4331b76
...
...
@@ -2,6 +2,9 @@
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Authors>Cdy</Authors>
<PackageProjectUrl>https://github.com/cdy816/mars</PackageProjectUrl>
<Description>Mars</Description>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
...
...
Develop/DBDevelopClientWebApi/DBDevelopClientWebApi.csproj
浏览文件 @
d4331b76
...
...
@@ -2,6 +2,12 @@
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Authors>Cdy</Authors>
<Product>Mars</Product>
<PackageId>Mars.DBDevelopClientWebApi</PackageId>
<PackageProjectUrl>https://github.com/cdy816/mars</PackageProjectUrl>
<Description>DBDevelop Server WebApi SDK</Description>
<Copyright />
</PropertyGroup>
<ItemGroup>
...
...
Develop/DBStudio/Program.cs
浏览文件 @
d4331b76
...
...
@@ -1406,7 +1406,7 @@ namespace DBStudio
}
catch
(
Exception
ex
)
{
Console
.
WriteLine
(
"CheckStart "
+
name
+
" failed."
+
ex
.
Message
+
" "
+
ex
.
StackTrace
);
//
Console.WriteLine("CheckStart " + name + " failed." + ex.Message + " " + ex.StackTrace);
return
false
;
}
}
...
...
Develop/DbManager.Desktop/View/TagGroupDetailView.xaml
浏览文件 @
d4331b76
...
...
@@ -256,7 +256,7 @@
</DataGridTemplateColumn.CellTemplate>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox Padding="5,0" Loaded="ComboBox_Loaded" Background="#1FFFFFFF" SelectionChanged="Type_SelectionChanged" Margin="0" VerticalContentAlignment="Center" BorderThickness="0" ItemsSource="{Binding DriverList}" IsEditable="
True" Text
="{Binding DriverName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
<ComboBox Padding="5,0" Loaded="ComboBox_Loaded" Background="#1FFFFFFF" SelectionChanged="Type_SelectionChanged" Margin="0" VerticalContentAlignment="Center" BorderThickness="0" ItemsSource="{Binding DriverList}" IsEditable="
False" SelectedItem
="{Binding DriverName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
</DataGridTemplateColumn>
...
...
@@ -268,7 +268,7 @@
</DataGridTemplateColumn.CellTemplate>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox Padding="5,0" Loaded="ComboBox_Loaded" Background="#1FFFFFFF" SelectionChanged="Type_SelectionChanged" Margin="0" VerticalContentAlignment="Center" BorderThickness="0" ItemsSource="{Binding RegistorList}" IsEditable="True" Text="{Binding RegistorName,Mode=TwoWay,UpdateSourceTrigger=
PropertyChanged
}" />
<ComboBox Padding="5,0" Loaded="ComboBox_Loaded" Background="#1FFFFFFF" SelectionChanged="Type_SelectionChanged" Margin="0" VerticalContentAlignment="Center" BorderThickness="0" ItemsSource="{Binding RegistorList}" IsEditable="True" Text="{Binding RegistorName,Mode=TwoWay,UpdateSourceTrigger=
LostFocus
}" />
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
</DataGridTemplateColumn>
...
...
Develop/DbManager.Desktop/View/TagGroupDetailView.xaml.cs
浏览文件 @
d4331b76
...
...
@@ -97,7 +97,8 @@ namespace DBInStudio.Desktop.View
{
if
((
sender
as
FrameworkElement
).
IsLoaded
)
{
dg
.
CommitEdit
();
if
(!(
sender
as
ComboBox
).
IsEditable
)
dg
.
CommitEdit
();
}
}
...
...
Driver/SimDriver/Driver.cs
浏览文件 @
d4331b76
...
...
@@ -125,20 +125,7 @@ namespace SimDriver
{
while
(!
mIsClosed
)
{
//mTickCount++;
DateTime
time
=
DateTime
.
Now
;
//if (mTickCount < 5)
//{
// mIsBusy = false;
// Thread.Sleep(100);
// continue;
//}
//else
//{
// mTickCount = 0;
//}
//LoggerService.Service.Info("Sim Driver", "Sart: " + time,ConsoleColor.DarkMagenta);
if
((
mLastProcessTime
-
time
).
TotalSeconds
>
1000
)
{
...
...
@@ -163,14 +150,10 @@ namespace SimDriver
double
fval
=
Math
.
Cos
(
mNumber
/
180.0
*
Math
.
PI
);
double
sval
=
Math
.
Sin
(
mNumber
/
180.0
*
Math
.
PI
);
//#if DEBUG
//if(mNumber%10==0)
//Log("Sim:Sin " + fval + " " + "Sim:Cos " + sval + " " + "Sim:step " + mNumber + " " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"));
#if DEBUG
Stopwatch
sw
=
new
Stopwatch
();
sw
.
Start
();
//
#endif
#endif
System
.
Threading
.
Tasks
.
Parallel
.
ForEach
(
mTagIdCach
,
(
vv
)
=>
...
...
@@ -197,15 +180,17 @@ namespace SimDriver
}
});
mTagService
.
SubmiteNotifyChanged
();
sw
.
Stop
();
int
delay
=
(
int
)(
500
-
(
DateTime
.
Now
-
mLastProcessTime
).
TotalMilliseconds
);
if
(
delay
<
0
)
{
delay
=
1
;
}
if
(
mNumber
%
10
==
0
)
#if DEBUG
sw
.
Stop
();
if
(
mNumber
%
10
==
0
)
LoggerService
.
Service
.
Info
(
"Sim Driver"
,
"set value elapsed:"
+
sw
.
ElapsedMilliseconds
);
#endif
Thread
.
Sleep
(
delay
);
}
}
...
...
Driver/SpiderDriver.ClientApi/DriverProxy.cs
浏览文件 @
d4331b76
...
...
@@ -590,7 +590,7 @@ namespace SpiderDriver.ClientApi
{
}
return
null
;
return
re
;
}
/// <summary>
...
...
Driver/SpiderDriver.ClientApi/SpiderDriver.ClientApi.csproj
浏览文件 @
d4331b76
...
...
@@ -7,6 +7,8 @@
<Product>Mars</Product>
<PackageProjectUrl>https://github.com/cdy816/mars</PackageProjectUrl>
<Version>1.0.3</Version>
<AssemblyVersion>1.0.4.0</AssemblyVersion>
<FileVersion>1.0.4.0</FileVersion>
</PropertyGroup>
<ItemGroup>
...
...
Driver/SpiderDriver/Config/SpiderDriver.cfg
浏览文件 @
d4331b76
<?xml version="1.0" encoding="utf-8" ?>
<Config>
<Server
StartPort=
"
3600"
EndPort=
"36
01"
/>
<Server
StartPort=
"
8800"
EndPort=
"88
01"
/>
</Config>
\ No newline at end of file
Driver/SpiderDriver/RealDataServerProcess.cs
浏览文件 @
d4331b76
...
...
@@ -104,6 +104,7 @@ namespace SpiderDriver
ProcessSetRealData
(
client
,
data
);
break
;
case
APIConst
.
SetTagValueAndQualityFun
:
ProcessSetRealDataAndQuality
(
client
,
data
);
break
;
case
APIConst
.
RegistorTag
:
ProcessValueChangeNotify
(
client
,
data
);
...
...
Driver/SpiderDriver/SpiderDriver.csproj
浏览文件 @
d4331b76
...
...
@@ -26,7 +26,7 @@
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="copy "$(TargetPath)" "$(SolutionDir)\Output" /y
copy "$(TargetDir)Config\SpiderDrivercfg" "$(SolutionDir)\Output\Config" /y
if exist "$(TargetDir)$(TargetName).XML" copy "$(TargetDir)$(TargetName).XML" "$(SolutionDir)\Output\Xml" /y
if exist "$(TargetDir)$(TargetName).pdb" copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)\Output" /y" />
<Exec Command="copy "$(TargetPath)" "$(SolutionDir)\Output" /y
copy "$(TargetDir)Config\SpiderDriver
.
cfg" "$(SolutionDir)\Output\Config" /y
if exist "$(TargetDir)$(TargetName).XML" copy "$(TargetDir)$(TargetName).XML" "$(SolutionDir)\Output\Xml" /y
if exist "$(TargetDir)$(TargetName).pdb" copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)\Output" /y" />
</Target>
</Project>
Driver/SpiderDriver/TagInfoServerProcess.cs
浏览文件 @
d4331b76
...
...
@@ -66,10 +66,12 @@ namespace SpiderDriver
int
count
=
data
.
ReadInt
();
if
(
count
>
0
)
{
var
re
=
BufferManager
.
Manager
.
Allocate
(
APIConst
.
TagInfoRequestFun
,
count
*
4
);
var
re
=
BufferManager
.
Manager
.
Allocate
(
APIConst
.
TagInfoRequestFun
,
(
count
+
1
)
*
4
);
re
.
WriteInt
(
count
);
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
var
ival
=
mm
.
GetTagIdByName
(
data
.
ReadString
());
string
stag
=
data
.
ReadString
();
var
ival
=
mm
.
GetTagIdByName
(
stag
);
if
(
ival
.
HasValue
)
{
re
.
WriteInt
(
ival
.
Value
);
...
...
@@ -135,7 +137,7 @@ namespace SpiderDriver
foreach
(
var
vv
in
tags
)
{
re
.
WriteInt
(
vv
.
Id
);
re
.
WriteString
(
vv
.
Name
);
re
.
WriteString
(
vv
.
Full
Name
);
re
.
WriteByte
((
byte
)
vv
.
Type
);
}
return
re
;
...
...
Example/Producter/SpiderDriverDemo/MainWindow.xaml
浏览文件 @
d4331b76
...
...
@@ -11,7 +11,7 @@
<Label Content="IP:" HorizontalAlignment="Left" Margin="31,33,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="ipt" HorizontalAlignment="Left" Margin="106,38,0,0" Text="127.0.0.1" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
<Label Content="Port:" HorizontalAlignment="Left" Margin="256,33,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="portt" HorizontalAlignment="Left" Margin="317,35,0,0" Text="
36
00" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
<TextBox x:Name="portt" HorizontalAlignment="Left" Margin="317,35,0,0" Text="
88
00" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
<Label Content="Count:" HorizontalAlignment="Left" Margin="30,78,0,0" VerticalAlignment="Top"/>
<Label Content="Sin:" HorizontalAlignment="Left" Margin="30,118,0,0" VerticalAlignment="Top"/>
<Label Content="Cos:" HorizontalAlignment="Left" Margin="31,156,0,0" VerticalAlignment="Top"/>
...
...
Example/Producter/SpiderDriverDemo/MainWindow.xaml.cs
浏览文件 @
d4331b76
...
...
@@ -189,6 +189,13 @@ namespace SpiderDriverDemo
private
void
ReadAllIds
()
{
mAllId
=
driverProxy
.
QueryAllTagIdAndNames
();
var
tagName
=
mAllId
.
First
().
Value
.
Item1
;
var
ids
=
driverProxy
.
QueryTagId
(
new
List
<
string
>()
{
tagName
});
if
(
ids
.
Count
>
0
)
{
//test
}
}
private
void
ProcessSetTagValue
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录