annotate topology/manager/StartTopologyManager.cs @ 71:1169915705ab default tip

fix TopologyNode connect
author KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
date Sun, 06 Feb 2022 16:47:41 +0900
parents 976d43003487
children
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 Christie_net.codegear;
59
c4f8630b7822 topology manager fix
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 58
diff changeset
2 using Christie_net.topology.node;
58
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
59
c4f8630b7822 topology manager fix
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 58
diff changeset
4 namespace Christie_net.topology.manager {
58
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 public class StartTopologyManager : StartCodeGear {
71
1169915705ab fix TopologyNode connect
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
7 public StartTopologyManager(string[] args) :
1169915705ab fix TopologyNode connect
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
8 this(CreateCgm(new TopologyManagerConfig(args).localPort), new TopologyManagerConfig(args)){ }
1169915705ab fix TopologyNode connect
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
9
1169915705ab fix TopologyNode connect
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
10 public StartTopologyManager(TopologyManagerConfig topologyManagerConfig) :
1169915705ab fix TopologyNode connect
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
11 this(CreateCgm(topologyManagerConfig.localPort), topologyManagerConfig){ }
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(CodeGearManager cgm, TopologyManagerConfig topologyManagerConfig) : base(cgm) {
c4f8630b7822 topology manager fix
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 58
diff changeset
14 cgm.Setup(new TopologyManager());
58
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 cgm.GetLocalDGM().Put("topologyManagerConfig", topologyManagerConfig);
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 }
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
71
1169915705ab fix TopologyNode connect
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
18 public StartTopologyManager(TopologyManagerConfig conf, CodeGear startCG) :
1169915705ab fix TopologyNode connect
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
19 this(CreateCgm(conf.localPort), conf, startCG){ }
58
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(CodeGearManager cgm, TopologyManagerConfig conf, CodeGear startCG) : base(cgm) {
c4f8630b7822 topology manager fix
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 58
diff changeset
22 cgm.Setup(new TopologyManager());
58
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 cgm.Setup(new Start());
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 cgm.GetLocalDGM().Put("startCG", startCG);
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 cgm.GetLocalDGM().Put("topologyNodeConfig", conf);
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 }
71
1169915705ab fix TopologyNode connect
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
28
58
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 public static void Main(string[] args) {
59
c4f8630b7822 topology manager fix
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents: 58
diff changeset
30 TopologyManagerConfig topologyManagerConfig = new TopologyManagerConfig(args);
58
0d2c956060d8 add topology manager
KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 new StartTopologyManager(topologyManagerConfig);
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 }