Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
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
潘栩锋
Thick-Common
Commits
282fc80a
Commit
282fc80a
authored
Mar 30, 2021
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Plain Diff
合并
parents
370f1e72
4398e7f6
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
36 additions
and
304 deletions
+36
-304
FlyAD7.cs
Project.FLY.FlyADBase/FlyADBase/FlyAD7.cs
+4
-3
FlyADBase.csproj
Project.FLY.FlyADBase/FlyADBase/FlyADBase.csproj
+1
-0
FlyADClientAdv.cs
Project.FLY.FlyADBase/FlyADBase/FlyADClientAdv.cs
+3
-0
InitParamServiceClient.cs
...hick.Base/FLY.Thick.Base/Client/InitParamServiceClient.cs
+5
-5
CoatingSegmentPart.cs
...LY.Thick.Base/FLY.Thick.Base/Common/CoatingSegmentPart.cs
+0
-190
ProfileParam.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Common/ProfileParam.cs
+0
-86
FLY.Thick.Base.csproj
Project.FLY.Thick.Base/FLY.Thick.Base/FLY.Thick.Base.csproj
+0
-2
IFlyADService.cs
...t.FLY.Thick.Base/FLY.Thick.Base/IService/IFlyADService.cs
+1
-1
IInitParamService.cs
...Y.Thick.Base/FLY.Thick.Base/IService/IInitParamService.cs
+6
-1
FilmPositionDetect.cs
...LY.Thick.Base/FLY.Thick.Base/Server/FilmPositionDetect.cs
+0
-1
InitParam.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Server/InitParam.cs
+16
-15
No files found.
Project.FLY.FlyADBase/FlyADBase/FlyAD7.cs
View file @
282fc80a
...
...
@@ -241,6 +241,7 @@ namespace FlyADBase
IsReady
=
true
;
return
;
}
void
FlyAD7_PropertyChanged
(
object
sender
,
PropertyChangedEventArgs
e
)
{
if
(
e
.
PropertyName
==
nameof
(
HasCRC
))
...
...
@@ -419,7 +420,6 @@ namespace FlyADBase
isReadyGetPos1AD1
=
true
;
updateIsReady
();
}
break
;
case
FLYAD7_OBJ_INTERFACE
.
FLYADC_OBJ_INTERFACE
.
GET_POS2
:
...
...
@@ -758,8 +758,8 @@ namespace FlyADBase
dt
,
pack
.
istatus
,
pack
.
inChange
,
pack
.
pos1
,
pack
.
pos
2
));
Position
,
Position
2
));
calSpeed
.
SetPos1
(
Now
,
Position
);
calSpeed
.
SetPos2
(
Now
,
Position2
);
...
...
@@ -791,6 +791,7 @@ namespace FlyADBase
{
//怕数据发送出错
dt
=
DateTime
.
Now
;
Now
=
dt
;
}
else
// if (version == 2)
{
...
...
Project.FLY.FlyADBase/FlyADBase/FlyADBase.csproj
View file @
282fc80a
...
...
@@ -57,6 +57,7 @@
<Compile
Include=
"IFlyADClientAdv.cs"
/>
<Compile
Include=
"EventArgs\IStatusChangedEventArgs.cs"
/>
<Compile
Include=
"EventArgs\MiniGridEventArgs.cs"
/>
<Compile
Include=
"EventArgs\PositionChangedEventArgs.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
<Compile
Include=
"SyncOrder.cs"
/>
<Compile
Include=
"EventArgs\TimeGridAdvEventArgs.cs"
/>
...
...
Project.FLY.FlyADBase/FlyADBase/FlyADClientAdv.cs
View file @
282fc80a
...
...
@@ -420,6 +420,9 @@ namespace FlyADBase
void
advGetState
()
{
mTimeGridAdvHelper
.
AddDriveStatus_Default
(
Now
,
DriveOrder
,
DriveStatus
,
Marker
);
}
void
advGetState
()
{
}
void
advPushPos1
()
{
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Client/InitParamServiceClient.cs
View file @
282fc80a
...
...
@@ -39,7 +39,7 @@ namespace FLY.Thick.Base.Client
/// 扫描架长
/// </summary>
public
int
PosLength
{
get
;
set
;
}
=
8900
;
/// <summary>
/// 自动归原点间距
/// </summary>
...
...
@@ -65,7 +65,7 @@ namespace FLY.Thick.Base.Client
/// <summary>
/// 设置的速度,与 实际速度比例
/// </summary>
public
double
Speed1Scale
{
get
;
set
;
}
=
1
;
public
double
Speed1Scale
{
get
;
set
;
}
=
1
;
/// <summary>
/// 线速度来源
...
...
@@ -91,7 +91,7 @@ namespace FLY.Thick.Base.Client
public
double
MmOfR
{
get
;
set
;
}
=
314
;
/// <summary>
/// 数据有效源
/// </summary>
...
...
@@ -144,7 +144,7 @@ namespace FLY.Thick.Base.Client
/// 减速时间
/// </summary>
public
UInt32
DTime
{
get
;
set
;
}
=
200
;
/// <summary>
/// 归0速度1
/// </summary>
...
...
@@ -209,7 +209,7 @@ namespace FLY.Thick.Base.Client
public
string
DbDirPath
{
get
;
set
;
}
#
endregion
public
void
Apply
()
public
void
Apply
()
{
Call
(
nameof
(
Apply
));
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Common/CoatingSegmentPart.cs
deleted
100644 → 0
View file @
370f1e72
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.ComponentModel
;
using
System.Collections.ObjectModel
;
namespace
FLY.Thick.Base.Common
{
public
class
CoatingSegmentPart
:
INotifyPropertyChanged
{
private
double
total
;
//涂长+留白单位mm
public
double
Total
{
get
{
return
total
;
}
set
{
if
(
total
!=
value
)
{
total
=
value
;
NotifyPropertyChanged
(
"Total"
);
}
}
}
private
double
distance
;
public
double
Distance
//留白单位mm
{
get
{
return
distance
;
}
set
{
if
(
distance
!=
value
)
{
distance
=
value
;
NotifyPropertyChanged
(
"Distance"
);
}
}
}
public
CoatingSegmentPart
Clone
()
{
CoatingSegmentPart
p
=
new
CoatingSegmentPart
();
p
.
Total
=
Total
;
p
.
Distance
=
Distance
;
return
p
;
}
public
byte
[]
ToByte
()
{
List
<
byte
>
buf
=
new
List
<
byte
>();
buf
.
AddRange
(
BitConverter
.
GetBytes
(
Total
));
buf
.
AddRange
(
BitConverter
.
GetBytes
(
Distance
));
return
buf
.
ToArray
();
}
/// <summary>
/// 16个字节转换
/// </summary>
/// <param name="value"></param>
/// <param name="offset"></param>
/// <returns></returns>
public
bool
TryParse
(
byte
[]
value
,
int
offset
)
{
if
(
value
.
Length
-
offset
<
16
)
return
false
;
Total
=
BitConverter
.
ToDouble
(
value
,
offset
+
0
);
Distance
=
BitConverter
.
ToDouble
(
value
,
offset
+
8
);
return
true
;
}
protected
void
NotifyPropertyChanged
(
string
propertyName
)
{
if
(
PropertyChanged
!=
null
)
{
PropertyChanged
.
Invoke
(
this
,
new
PropertyChangedEventArgs
(
propertyName
));
}
}
public
event
PropertyChangedEventHandler
PropertyChanged
;
}
public
class
CoatingSegmentProfile
:
INotifyPropertyChanged
{
string
productname
;
/// <summary>
/// 产品名称
/// </summary>
public
string
ProductName
{
get
{
return
productname
;
}
set
{
if
(
productname
!=
value
)
{
productname
=
value
;
NotifyPropertyChanged
(
"ProductName"
);
}
}
}
ObservableCollection
<
CoatingSegmentPart
>
coatingpartlist
=
new
ObservableCollection
<
CoatingSegmentPart
>();
/// <summary>
/// 涂布段长 & 留白
/// </summary>
public
ObservableCollection
<
CoatingSegmentPart
>
CoatingPartList
{
get
{
return
coatingpartlist
;
}
}
public
byte
[]
ToBytes
()
{
List
<
byte
>
buf
=
new
List
<
byte
>();
byte
[]
name_bytes
=
Misc
.
Converter
.
StringToBytes
(
ProductName
);
if
(
name_bytes
==
null
)
{
buf
.
AddRange
(
BitConverter
.
GetBytes
(
0
));
}
else
{
buf
.
AddRange
(
BitConverter
.
GetBytes
((
int
)
name_bytes
.
Length
));
buf
.
AddRange
(
name_bytes
);
}
buf
.
AddRange
(
BitConverter
.
GetBytes
(
CoatingPartList
.
Count
()));
for
(
int
i
=
0
;
i
<
CoatingPartList
.
Count
();
i
++)
buf
.
AddRange
(
CoatingPartList
[
i
].
ToByte
());
return
buf
.
ToArray
();
}
/// <summary>
///
/// </summary>
/// <param name="value"></param>
/// <param name="offset"></param>
/// <param name="cnt"></param>
/// <returns></returns>
public
bool
TryParse
(
byte
[]
value
,
int
offset
,
out
int
cnt
)
{
cnt
=
(
4
+
4
);
if
(
value
.
Length
-
offset
<
cnt
)
return
false
;
int
idx
=
offset
;
int
len
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
cnt
+=
len
;
if
(
value
.
Length
<
cnt
)
return
false
;
byte
[]
bytes
=
new
byte
[
len
];
Array
.
Copy
(
value
,
idx
,
bytes
,
0
,
len
);
idx
+=
len
;
string
name
=
Misc
.
Converter
.
BytesToString
(
bytes
);
int
len2
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
cnt
+=
len2
*
16
;
if
(
value
.
Length
<
cnt
)
return
false
;
CoatingPartList
.
Clear
();
ProductName
=
name
;
for
(
int
i
=
0
;
i
<
len2
;
i
++)
{
CoatingSegmentPart
coatingPart
=
new
CoatingSegmentPart
();
coatingPart
.
TryParse
(
value
,
idx
);
idx
+=
16
;
CoatingPartList
.
Add
(
coatingPart
);
}
return
true
;
}
protected
void
NotifyPropertyChanged
(
string
propertyName
)
{
if
(
PropertyChanged
!=
null
)
{
PropertyChanged
.
Invoke
(
this
,
new
PropertyChangedEventArgs
(
propertyName
));
}
}
public
event
PropertyChangedEventHandler
PropertyChanged
;
}
}
Project.FLY.Thick.Base/FLY.Thick.Base/Common/ProfileParam.cs
deleted
100644 → 0
View file @
370f1e72
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Misc
;
namespace
FLY.Thick.Base.Common
{
public
class
ProfileParam
{
public
string
pname
;
public
int
target
;
public
int
alarm
;
public
double
comp
;
public
int
shift
;
public
int
beginNo
;
public
int
endNo
;
public
int
dataBeginNo
;
public
int
dataEndNo
;
#
region
IPack
成员
public
byte
[]
ToBytes
()
{
List
<
byte
>
buf
=
new
List
<
byte
>();
byte
[]
bs
=
Misc
.
Converter
.
StringToBytes
(
pname
);
buf
.
AddRange
(
BitConverter
.
GetBytes
(
bs
.
Length
));
buf
.
AddRange
(
bs
);
buf
.
AddRange
(
BitConverter
.
GetBytes
(
target
));
buf
.
AddRange
(
BitConverter
.
GetBytes
(
alarm
));
buf
.
AddRange
(
BitConverter
.
GetBytes
(
comp
));
buf
.
AddRange
(
BitConverter
.
GetBytes
(
shift
));
buf
.
AddRange
(
BitConverter
.
GetBytes
(
beginNo
));
buf
.
AddRange
(
BitConverter
.
GetBytes
(
endNo
));
buf
.
AddRange
(
BitConverter
.
GetBytes
(
dataBeginNo
));
buf
.
AddRange
(
BitConverter
.
GetBytes
(
dataEndNo
));
return
buf
.
ToArray
();
}
public
bool
TryParse
(
byte
[]
value
)
{
int
cnt
=
4
+
4
*
2
+
8
+
4
*
5
;
if
(
value
.
Length
<
cnt
)
return
false
;
int
idx
=
0
;
int
len
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
cnt
+=
len
;
if
(
value
.
Length
<
cnt
)
return
false
;
pname
=
Misc
.
Converter
.
BytesToString
(
value
,
idx
,
len
);
idx
+=
len
;
target
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
alarm
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
comp
=
BitConverter
.
ToDouble
(
value
,
idx
);
idx
+=
8
;
shift
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
beginNo
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
endNo
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
dataBeginNo
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
dataEndNo
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
return
true
;
}
#
endregion
}
}
Project.FLY.Thick.Base/FLY.Thick.Base/FLY.Thick.Base.csproj
View file @
282fc80a
...
...
@@ -63,7 +63,6 @@
<Compile
Include=
"Client\ScanCorrServiceClient.cs"
/>
<Compile
Include=
"Client\TDGageServiceClient.cs"
/>
<Compile
Include=
"Common\BorderType.cs"
/>
<Compile
Include=
"Common\CoatingSegmentPart.cs"
/>
<Compile
Include=
"Common\Common.cs"
/>
<Compile
Include=
"Common\CurveCell.cs"
/>
<Compile
Include=
"Common\CurveCore.cs"
/>
...
...
@@ -74,7 +73,6 @@
<Compile
Include=
"Common\FlyAD_Common.cs"
/>
<Compile
Include=
"Common\FlyData_WarningHistory.cs"
/>
<Compile
Include=
"Common\PasswordCommon.cs"
/>
<Compile
Include=
"Common\ProfileParam.cs"
/>
<Compile
Include=
"Common\TimeGridEventArgs.cs"
/>
<Compile
Include=
"IService\IBoltMapService.cs"
/>
<Compile
Include=
"IService\IBorderSearchService.cs"
/>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/IService/IFlyADService.cs
View file @
282fc80a
...
...
@@ -11,7 +11,7 @@ using FObjBase.Reflect;
namespace
FLY.Thick.Base.IService
{
public
interface
IFlyADService
:
INotifyPropertyChanged
public
interface
IFlyADService
:
INotifyPropertyChanged
{
#
region
参数
bool
HasCRC
{
get
;
set
;
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/IService/IInitParamService.cs
View file @
282fc80a
...
...
@@ -10,7 +10,7 @@ namespace FLY.Thick.Base.IService
/// <summary>
/// 硬件配置参数
/// </summary>
public
interface
IInitParamService
:
INotifyPropertyChanged
public
interface
IInitParamService
:
INotifyPropertyChanged
{
/// <summary>
/// 扫描架长
...
...
@@ -96,6 +96,11 @@ namespace FLY.Thick.Base.IService
/// </summary>
bool
HasPunch
{
get
;
set
;
}
/// <summary>
/// 有纵向光纤传感器
/// </summary>
bool
HasVSign
{
get
;
set
;
}
/// <summary>
/// 打孔设备与探头中心偏移,单位mm
/// </summary>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Server/FilmPositionDetect.cs
View file @
282fc80a
...
...
@@ -214,7 +214,6 @@ namespace FLY.Thick.Base.Server
if
(!
Misc
.
MyBase
.
CHECKBIT
(
e
.
IChanged
,
FlyADIODefine
.
Instance
.
InNo_Roll
))
return
;
if
(
Misc
.
MyBase
.
CHECKBIT
(
e
.
IStatus
,
FlyADIODefine
.
Instance
.
InNo_Roll
))
return
;
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Server/InitParam.cs
View file @
282fc80a
...
...
@@ -14,7 +14,7 @@ namespace FLY.Thick.Base.Server
/// <summary>
/// 硬件配置参数
/// </summary>
public
class
InitParam
:
IInitParamService
,
INotifyPropertyChanged
public
class
InitParam
:
IInitParamService
,
INotifyPropertyChanged
{
#
region
属性,成员变量的代理
/// <summary>
...
...
@@ -37,14 +37,14 @@ namespace FLY.Thick.Base.Server
/// 自动归原点间距
/// </summary>
public
int
AutoOrgInterval
{
get
;
set
;
}
=
10
;
/// <summary>
/// 线速度来源
/// </summary>
public
FilmVSRC
FilmVSrc
{
get
;
set
;
}
=
FilmVSRC
.
ROUND
;
/// <summary>
/// 最小线速度 m/min
/// </summary>
...
...
@@ -58,7 +58,7 @@ namespace FLY.Thick.Base.Server
/// </summary>
public
double
Encoder2_mmpp
{
get
;
set
;
}
=
0.1
;
/// <summary>
/// //1圈多少mm
/// </summary>
...
...
@@ -95,27 +95,27 @@ namespace FLY.Thick.Base.Server
/// </summary>
public
UInt32
VAccuracy
{
get
;
set
;
}
=
3000
;
/// <summary>
/// 开始速度 Start Velocity
/// </summary>
public
UInt32
SVelocity
{
get
;
set
;
}
=
500
;
/// <summary>
/// 加速时间
/// </summary>
public
UInt32
ATime
{
get
;
set
;
}
=
200
;
/// <summary>
/// 减速时间
/// </summary>
public
UInt32
DTime
{
get
;
set
;
}
=
200
;
/// <summary>
/// 归0速度1
/// </summary>
public
UInt32
HVelocity1
{
get
;
set
;
}
=
5000
;
/// <summary>
/// 归0速度2
/// </summary>
...
...
@@ -220,10 +220,10 @@ namespace FLY.Thick.Base.Server
/// 加载
/// </summary>
/// <returns></returns>
public
bool
Load
()
public
bool
Load
()
{
//return Misc.SaveToXmlHepler.Load(param_path, this);
if
(!
File
.
Exists
(
param_path
))
if
(!
File
.
Exists
(
param_path
))
{
return
false
;
}
...
...
@@ -232,7 +232,8 @@ namespace FLY.Thick.Base.Server
string
json
=
File
.
ReadAllText
(
param_path
);
Newtonsoft
.
Json
.
JsonConvert
.
PopulateObject
(
json
,
this
);
}
catch
{
catch
{
return
false
;
}
return
true
;
...
...
@@ -240,7 +241,7 @@ namespace FLY.Thick.Base.Server
/// <summary>
/// 保存
/// </summary>
void
Save
()
void
Save
()
{
string
json
=
Newtonsoft
.
Json
.
JsonConvert
.
SerializeObject
(
this
,
Newtonsoft
.
Json
.
Formatting
.
Indented
);
File
.
WriteAllText
(
param_path
,
json
);
...
...
@@ -261,6 +262,6 @@ namespace FLY.Thick.Base.Server
Save
();
}
}
}
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