annotate topology/manager/StartTopologyManager.cs @ 59:c4f8630b7822

topology manager fix
author KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
date Thu, 27 Jan 2022 01:19:51 +0900 (2022-01-26)
parents 0d2c956060d8
children 1a42115e51bb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
58
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 using System;
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 using System.Threading;
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 using Christie_net.annotation;
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 using Christie_net.codegear;
59
c4f8630b7822 topology manager fix
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 58
diff changeset
5 using Christie_net.topology.node;
58
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 using Christie_net.topology.manager;
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
59
c4f8630b7822 topology manager fix
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 58
diff changeset
8 namespace Christie_net.topology.manager {
58
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 public class StartTopologyManager : StartCodeGear {
59
c4f8630b7822 topology manager fix
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 58
diff changeset
11 public StartTopologyManager(string[] args) : this(CreateCgm(new TopologyManagerConfig(args).localPort), new TopologyManagerConfig(args)){
58
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 }
59
c4f8630b7822 topology manager fix
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 58
diff changeset
13 public StartTopologyManager(TopologyManagerConfig topologyManagerConfig) : this(CreateCgm(topologyManagerConfig.localPort), topologyManagerConfig){
58
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 }
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
59
c4f8630b7822 topology manager fix
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 58
diff changeset
16 public StartTopologyManager(CodeGearManager cgm, TopologyManagerConfig topologyManagerConfig) : base(cgm) {
c4f8630b7822 topology manager fix
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 58
diff changeset
17 cgm.Setup(new TopologyManager());
58
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 cgm.GetLocalDGM().Put("topologyManagerConfig", topologyManagerConfig);
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 }
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
59
c4f8630b7822 topology manager fix
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 58
diff changeset
21 public StartTopologyManager(TopologyManagerConfig conf, CodeGear startCG) :this(CreateCgm(conf.localPort), conf, startCG){
58
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 }
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24
59
c4f8630b7822 topology manager fix
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 58
diff changeset
25 public StartTopologyManager(CodeGearManager cgm, TopologyManagerConfig conf, CodeGear startCG) : base(cgm) {
c4f8630b7822 topology manager fix
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 58
diff changeset
26 cgm.Setup(new TopologyManager());
58
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 cgm.Setup(new Start());
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 cgm.GetLocalDGM().Put("startCG", startCG);
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 cgm.GetLocalDGM().Put("topologyNodeConfig", conf);
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 }
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 public static void Main(string[] args) {
59
c4f8630b7822 topology manager fix
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 58
diff changeset
36 TopologyManagerConfig topologyManagerConfig = new TopologyManagerConfig(args);
58
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 new StartTopologyManager(topologyManagerConfig);
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 }
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 }
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 }