Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-WIC-Cnf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CommunityXG
OpenXG-WIC-Cnf
Commits
75a1d0b1
Commit
75a1d0b1
authored
Aug 26, 2020
by
ymwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并成功版本
parent
ee424024
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
40 deletions
+33
-40
apps/cnf-path-computing/businessInCloud/src/main/java/top/ninwoo/test/BisheTestMain.java
...sInCloud/src/main/java/top/ninwoo/test/BisheTestMain.java
+19
-5
apps/cnf-path-computing/businessInCloud/src/main/java/top/ninwoo/test/doMap/CycleTopo.java
...nCloud/src/main/java/top/ninwoo/test/doMap/CycleTopo.java
+1
-1
apps/cnf-path-computing/businessInDocker/src/main/java/com/pitong/business/Application.java
...Docker/src/main/java/com/pitong/business/Application.java
+13
-5
apps/cnf-path-computing/businessInDocker/src/main/java/com/pitong/business/service/picPro/picImpl/mergePorcess.java
.../pitong/business/service/picPro/picImpl/mergePorcess.java
+0
-28
apps/cnf-weixingsim/src/test/java/top/ninwoo/WxTests.java
apps/cnf-weixingsim/src/test/java/top/ninwoo/WxTests.java
+0
-1
No files found.
apps/cnf-path-computing/businessInCloud/src/main/java/top/ninwoo/test/BisheTestMain.java
View file @
75a1d0b1
...
...
@@ -49,9 +49,9 @@ public class BisheTestMain implements ApplicationRunner {
//子任务依赖关系 边
int
[][]
link
=
{{
0
,
0
,
1
,
2
,
3
,
4
,
5
},
{
1
,
2
,
3
,
4
,
5
,
5
,
6
}};
//task编号
int
[]
func
=
{
2
,
3
,
1
,
1
,
3
,
4
,
5
};
int
[]
func
=
{
2
,
3
,
3
,
1
,
1
,
4
,
5
};
//task列表
String
[]
tasks
=
{
" "
,
"binaryProcess"
,
"cutProcess"
,
"greyProcess"
,
"mergeP
or
cess"
,
"tailorProcess"
};
String
[]
tasks
=
{
" "
,
"binaryProcess"
,
"cutProcess"
,
"greyProcess"
,
"mergeP
ro
cess"
,
"tailorProcess"
};
// //功能分支表
// int[][] branch = {{1, 1},{1, 2},{1, 1},{2, 1},{1, 1}};
...
...
@@ -88,18 +88,32 @@ public class BisheTestMain implements ApplicationRunner {
String
[][]
route
=
new
String
[
lastHop
.
length
][
lastHop
[
0
].
length
];
for
(
int
i
=
0
;
i
<
lastHop
.
length
;
i
++){
for
(
int
j
=
0
;
j
<
lastHop
[
0
].
length
;
j
++){
route
[
i
][
j
]
=
"sate"
+
lastHop
[
i
][
j
]
;
if
(
route
[
i
][
j
].
equals
(
"sate
0
"
)){
route
[
i
][
j
]=
"sate"
+(
i
+
1
);
route
[
i
][
j
]
=
"sate"
+
(
lastHop
[
i
][
j
]+
1
)
;
if
(
route
[
i
][
j
].
equals
(
"sate
1
"
)){
route
[
i
][
j
]=
"sate"
+(
j
+
1
);
}
}
}
boolean
flad
=
false
;
for
(
int
i
=
0
;
i
<
lastHop
.
length
;
i
++){
for
(
int
j
=
0
;
j
<
lastHop
[
0
].
length
;
j
++){
if
(
route
[
i
][
j
].
equals
(
"sate"
+(
i
+
1
))
&&
i
!=
j
){
flad
=
true
;
}
}
}
if
(
flad
==
false
){
System
.
out
.
println
(
"correct"
);
}
dataPackage
.
setRoute
(
route
);
System
.
out
.
println
(
"exec start timestamp: "
+
System
.
currentTimeMillis
());
System
.
out
.
println
(
"========================================"
);
System
.
out
.
println
();
String
file_path
=
"passport.jpg"
;
// G:\code\cnf\
Picture
picture
=
loadPicture
(
file_path
);
dataPackage
.
setPicture
(
picture
);
dataPackage
.
setCurrentSataHop
(
"sate1"
);
...
...
apps/cnf-path-computing/businessInCloud/src/main/java/top/ninwoo/test/doMap/CycleTopo.java
View file @
75a1d0b1
...
...
@@ -18,7 +18,7 @@ public class CycleTopo {
SimData
sd
=
new
SimData
();
//tp.delHistory();
File
file
=
new
File
(
"topusim_1.txt"
);
//
D:\LabratoryJavaPro\codingDownload\latestCoding
\
//
G:\code\cnf
\
List
<
WeiXingData
>
wxData
=
null
;
try
{
wxData
=
wx
.
iniTopo
(
file
,
sd
.
getZhouqi
());
...
...
apps/cnf-path-computing/businessInDocker/src/main/java/com/pitong/business/Application.java
View file @
75a1d0b1
...
...
@@ -35,6 +35,7 @@ public class Application implements ApplicationRunner {
}
Picture
[]
pictures
=
new
Picture
[
2
];
int
flag
=
0
;
@Override
public
void
run
(
ApplicationArguments
args
)
{
ServerSocket
serverSocket
=
null
;
...
...
@@ -55,7 +56,8 @@ public class Application implements ApplicationRunner {
DataPackage
newDataPackage
=
dataPackage
;
//得到本机路由表
String
[]
route
=
findService
.
findRoute
(
dataPackage
.
getCurrentSataHop
(),
dataPackage
.
getRoute
());
int
flag
=
0
;
System
.
out
.
println
(
Arrays
.
toString
(
route
));
System
.
out
.
println
(
"========================"
);
//判断是否为该边的终点,如果是,进行函数计算并创建一个新的数据包,转发
if
(
dataPackage
.
getCurrentSataHop
().
equals
(
dataPackage
.
getDestinSataHop
()))
{
LinkedList
<
Picture
>
picPara
=
new
LinkedList
<>();
...
...
@@ -71,16 +73,20 @@ public class Application implements ApplicationRunner {
case
"greyProcess"
:
picPara
=
new
greyProcess
().
picProcess
(
dataPackage
.
getPicture
());
break
;
case
"mergeP
or
cess"
:
case
"mergeP
ro
cess"
:
if
(
flag
==
0
){
pictures
[
flag
]
=
dataPackage
.
getPicture
();
System
.
out
.
println
(
"pictures1:"
+
pictures
.
length
);
flag
=
1
;
continue
;
}
else
{
pictures
[
flag
]
=
dataPackage
.
getPicture
();
System
.
out
.
println
(
"pictures2:"
+
pictures
.
length
);
flag
=
0
;
}
picPara
=
new
mergePorcess
().
picProcess
(
pictures
);
System
.
out
.
println
(
"merge Operate"
);
System
.
out
.
println
(
pictures
.
length
);
picPara
=
new
mergeProcess
().
picProcess
(
pictures
);
break
;
case
"tailorProcess"
:
picPara
=
new
tailorProcess
().
picProcess
(
dataPackage
.
getPicture
());
...
...
@@ -94,9 +100,11 @@ public class Application implements ApplicationRunner {
//找到目的地卫星数组
ArrayList
<
String
>
destinSataHops
=
findService
.
findDestinSataHops
(
dataPackage
.
getPathTable
(),
dataPackage
.
getCurrentSataHop
());
//最终卫星节点,不做任务处理,仅接受数据
if
(
destinSataHops
.
get
(
0
).
equals
(
"nolast"
)){
System
.
out
.
println
(
"运行完毕"
);
break
;
System
.
out
.
println
(
"pathcomputing end"
);
//todo:输出到服务器指定文件夹
continue
;
}
for
(
String
destinSataHop
:
destinSataHops
)
{
//设置目的地址
...
...
apps/cnf-path-computing/businessInDocker/src/main/java/com/pitong/business/service/picPro/picImpl/mergePorcess.java
deleted
100644 → 0
View file @
ee424024
package
com.pitong.business.service.picPro.picImpl
;
import
com.pitong.business.item.Picture
;
import
com.pitong.business.service.picPro.IPicProcess
;
import
java.io.IOException
;
import
java.util.LinkedList
;
import
static
com
.
pitong
.
business
.
service
.
saveFile
.
Save
.
loadPicture
;
import
static
com
.
pitong
.
business
.
service
.
saveFile
.
Save
.
saveToFile
;
public
class
mergePorcess
implements
IPicProcess
{
public
static
LinkedList
<
Picture
>
picPara
=
new
LinkedList
<>();
@Override
public
LinkedList
<
Picture
>
picProcess
(
Picture
...
pictures
)
{
saveToFile
(
pictures
[
0
],
in_file1
);
saveToFile
(
pictures
[
1
],
in_file2
);
try
{
String
command
=
"python merge-pro.py "
+
in_file1
+
" "
+
in_file2
+
" "
+
out_file
;
Process
process
=
Runtime
.
getRuntime
().
exec
(
command
);
process
.
waitFor
();
}
catch
(
IOException
|
InterruptedException
e
)
{
e
.
printStackTrace
();
}
picPara
.
add
(
loadPicture
(
out_file
));
return
picPara
;
}
}
apps/cnf-weixingsim/src/test/java/top/ninwoo/WxTests.java
View file @
75a1d0b1
...
...
@@ -73,7 +73,6 @@ public class WxTests {
clusterConfig
.
setTopology
(
topo
);
separatedClusterConfig
.
setClusterConfig
(
clusterConfig
);
clusterConfigs
.
add
(
separatedClusterConfig
);
clusterService
.
sendClusterConfigToEdgeNode
(
clusterConfigs
);
}
...
...
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