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
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
alex037yang
openXG-WIC-Cnf
Commits
ee424024
Commit
ee424024
authored
Aug 25, 2020
by
ymwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
第一次合并尝试
parent
6a1f8be3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
15 deletions
+15
-15
apps/cnf-path-computing/businessInCloud/src/main/java/top/ninwoo/test/BisheTestMain.java
...sInCloud/src/main/java/top/ninwoo/test/BisheTestMain.java
+4
-1
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/businessInCloud/src/main/java/top/ninwoo/test/transfer/impl/TransferServiceImpl.java
...va/top/ninwoo/test/transfer/impl/TransferServiceImpl.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
+2
-0
apps/cnf-path-computing/businessInDocker/src/main/java/com/pitong/business/service/transfer/impl/FindServiceImpl.java
...itong/business/service/transfer/impl/FindServiceImpl.java
+5
-10
apps/cnf-weixingsim/src/test/java/top/ninwoo/WxTests.java
apps/cnf-weixingsim/src/test/java/top/ninwoo/WxTests.java
+1
-1
cnf-edge-center/src/main/java/top/ninwoo/edgecenter/service/LogicTopoService.java
.../java/top/ninwoo/edgecenter/service/LogicTopoService.java
+1
-1
No files found.
apps/cnf-path-computing/businessInCloud/src/main/java/top/ninwoo/test/BisheTestMain.java
View file @
ee424024
...
...
@@ -89,6 +89,9 @@ public class BisheTestMain implements ApplicationRunner {
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
(
"sate0"
)){
route
[
i
][
j
]=
"sate"
+(
i
+
1
);
}
}
}
dataPackage
.
setRoute
(
route
);
...
...
@@ -96,7 +99,7 @@ public class BisheTestMain implements ApplicationRunner {
System
.
out
.
println
(
"========================================"
);
System
.
out
.
println
();
String
file_path
=
"
C:\\Users\\225\\Pictures\\Camera Roll\\
passport.jpg"
;
String
file_path
=
"passport.jpg"
;
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 @
ee424024
...
...
@@ -17,7 +17,7 @@ public class CycleTopo {
ToponetImpl
tp
=
new
ToponetImpl
();
SimData
sd
=
new
SimData
();
//tp.delHistory();
File
file
=
new
File
(
"
D:\\LabratoryJavaPro\\codingDownload\\latestCoding\\
topusim_1.txt"
);
File
file
=
new
File
(
"topusim_1.txt"
);
//D:\LabratoryJavaPro\codingDownload\latestCoding\
List
<
WeiXingData
>
wxData
=
null
;
try
{
...
...
apps/cnf-path-computing/businessInCloud/src/main/java/top/ninwoo/test/transfer/impl/TransferServiceImpl.java
View file @
ee424024
...
...
@@ -27,7 +27,7 @@ public class TransferServiceImpl implements TransferService {
//获取目标节点ip
String
app_name
=
nextHop
;
System
.
out
.
println
(
app_name
);
String
IP
=
"127.0.0.1"
;
//this.getIpByAppName(app_name);
String
IP
=
"127.0.0.1"
;
System
.
out
.
println
(
IP
);
//发送至目标
send
(
dataPackage
,
IP
,
2020
,
startime
);
...
...
apps/cnf-path-computing/businessInDocker/src/main/java/com/pitong/business/Application.java
View file @
ee424024
...
...
@@ -114,7 +114,9 @@ public class Application implements ApplicationRunner {
}
// }
}
else
{
//仅作转发的节点
System
.
out
.
println
(
"only transfer nextHop"
+
findService
.
findNextHop
(
dataPackage
.
getDestinSataHop
(),
route
));
newDataPackage
.
setNextSataHop
(
findService
.
findNextHop
(
dataPackage
.
getDestinSataHop
(),
route
));
System
.
out
.
println
(
"only current nextHop"
+
dataPackage
.
getNextSataHop
());
newDataPackage
.
setCurrentSataHop
(
dataPackage
.
getNextSataHop
());
//创建时间
Date
date
=
new
Date
();
...
...
apps/cnf-path-computing/businessInDocker/src/main/java/com/pitong/business/service/transfer/impl/FindServiceImpl.java
View file @
ee424024
...
...
@@ -4,30 +4,24 @@ import com.pitong.business.service.transfer.FindService;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.concurrent.ConcurrentHashMap
;
@Service
public
class
FindServiceImpl
implements
FindService
{
@Override
public
ArrayList
<
String
>
findDestinSataHops
(
String
[]
pathTable
,
String
currenthop
)
{
ArrayList
<
String
>
destinSataHops
=
new
ArrayList
<
>();
public
ArrayList
<
String
>
findDestinSataHops
(
String
[]
pathTable
,
String
currenthop
)
{
ArrayList
<
String
>
destinSataHops
=
new
ArrayList
<
String
>();
int
j
=
0
;
if
(
pathTable
.
length
==
0
){
System
.
out
.
println
(
"路径表为空"
);
destinSataHops
.
add
(
0
,
"nopara"
);
destinSataHops
.
add
(
"nopara"
);
return
destinSataHops
;
}
for
(
int
i
=
0
;
i
<
pathTable
.
length
;
i
++)
{
//判断本机是否为路径起点
if
(
currenthop
.
equals
(
pathTable
[
i
].
split
(
"->"
)[
0
])){
/* System.out.println(Arrays.toString(pathTable));
System.out.println();
System.out.println(currenthop);
System.out.println("destinSataHops index"+j);
System.out.println("pathTable[i].split(\"->\")[1]"+pathTable[i].split("->")[1]);*/
destinSataHops
.
add
(
j
++,
pathTable
[
i
].
split
(
"->"
)[
1
]);
destinSataHops
.
add
(
pathTable
[
i
].
split
(
"->"
)[
1
]);
}
}
if
(
destinSataHops
.
size
()
==
0
){
...
...
@@ -68,6 +62,7 @@ public class FindServiceImpl implements FindService {
//找到本卫星的路由
private
String
[]
findCurrentRoute
(
String
sataname
,
String
[][]
routeTable
){
int
index
=
Integer
.
parseInt
(
sataname
.
split
(
"sate"
)[
1
]);
System
.
out
.
println
(
index
);
return
routeTable
[
index
-
1
];
}
}
...
...
apps/cnf-weixingsim/src/test/java/top/ninwoo/WxTests.java
View file @
ee424024
...
...
@@ -277,7 +277,7 @@ public class WxTests {
ToponetImpl
tp
=
new
ToponetImpl
();
SimData
sd
=
new
SimData
();
//tp.delHistory();
File
file
=
new
File
(
"
D:\\LabratoryJavaPro\\codingDownload\\latestCoding
\\topusim_1.txt"
);
File
file
=
new
File
(
"
G:\\code\\cnf
\\topusim_1.txt"
);
// D:\LabratoryJavaPro\codingDownload\latestCoding\
List
<
WeiXingData
>
wxData
=
wx
.
iniTopo
(
file
,
sd
.
getZhouqi
());
int
[][]
toponet
=
tp
.
getTopology
(
wxData
,
sd
);
...
...
cnf-edge-center/src/main/java/top/ninwoo/edgecenter/service/LogicTopoService.java
View file @
ee424024
package
top.ninwoo.edgecenter.service
;
import
com.sun.xml.internal.ws.spi.db.DatabindingException
;
//
import com.sun.xml.internal.ws.spi.db.DatabindingException;
import
top.ninwoo.common.entity.NetworkTopology
;
import
java.text.ParseException
;
...
...
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