Commit 2a8e3c518d6ba3db1fad47d04736b0c816d0df99
1 parent
302ac454
Exists in
develop
实验参数类扩展
Showing
4 changed files
with
61 additions
and
13 deletions
Show diff stats
src/main/java/com/example/mina/client/base/ExperimentOptions.java
1 | 1 | package com.example.mina.client.base; |
2 | 2 | |
3 | -import lombok.Data; | |
4 | - | |
5 | 3 | import java.time.ZonedDateTime; |
4 | +import java.util.List; | |
5 | +import lombok.Data; | |
6 | 6 | |
7 | 7 | @Data |
8 | 8 | public abstract class ExperimentOptions { |
9 | - private String experimentId; | |
9 | + protected String experimentId; | |
10 | + | |
11 | + protected Integer startAttenuation; | |
12 | + | |
13 | + protected Integer endAttenuation; | |
10 | 14 | |
11 | - private int startAttenuation; | |
15 | + protected Integer step; | |
12 | 16 | |
13 | - private int endAttenuation; | |
17 | + /** | |
18 | + * 每次发送指令的 时间间隔 | |
19 | + */ | |
20 | + protected Integer period; | |
14 | 21 | |
15 | - private int step; | |
22 | + /** | |
23 | + * 单次从 start --> end 一个周期后的 暂停时间 | |
24 | + */ | |
25 | + protected Integer pause; | |
16 | 26 | |
17 | - private int pause; | |
27 | + /** | |
28 | + * 最大循环次数 | |
29 | + */ | |
30 | + protected Integer maxIterCount; | |
18 | 31 | |
19 | - private int maxIterCount; | |
32 | + protected ZonedDateTime finishAt; | |
20 | 33 | |
21 | - private ZonedDateTime finishAt; | |
34 | + protected List<ExperimentOptionsPair> pairs; | |
22 | 35 | |
23 | - abstract boolean checkOptions(); | |
36 | + protected abstract boolean checkOptions(); | |
24 | 37 | } | ... | ... |
src/main/java/com/example/mina/client/base/ExperimentOptionsPair.java
0 → 100644
... | ... | @@ -0,0 +1,21 @@ |
1 | +package com.example.mina.client.base; | |
2 | + | |
3 | +import java.util.List; | |
4 | +import lombok.Data; | |
5 | + | |
6 | +/** | |
7 | + * 输入输出端口 | |
8 | + * @author BenJin Yin | |
9 | + * @date 2021/4/2 | |
10 | + */ | |
11 | +@Data | |
12 | +public class ExperimentOptionsPair { | |
13 | + /** | |
14 | + * 输入端口 | |
15 | + */ | |
16 | + private Integer out; | |
17 | + /** | |
18 | + * 输出端口 | |
19 | + */ | |
20 | + private List<Integer> inList; | |
21 | +} | ... | ... |
src/main/java/com/example/mina/client/base/MatrixConnectConfig.java
... | ... | @@ -20,11 +20,11 @@ public class MatrixConnectConfig { |
20 | 20 | |
21 | 21 | private Integer port; |
22 | 22 | |
23 | - private Integer rows; | |
23 | +// private Integer rows; | |
24 | 24 | |
25 | - private Integer cols; | |
25 | +// private Integer cols; | |
26 | 26 | |
27 | - private Integer maxAttenuation; | |
27 | +// private Integer maxAttenuation; | |
28 | 28 | |
29 | 29 | private Map<String, Object> options; |
30 | 30 | } | ... | ... |
src/main/java/com/example/mina/client/experiment/HandOverExperimentOptions.java
0 → 100644
... | ... | @@ -0,0 +1,14 @@ |
1 | +package com.example.mina.client.experiment; | |
2 | + | |
3 | +import com.example.mina.client.base.ExperimentOptions; | |
4 | +import lombok.Data; | |
5 | + | |
6 | +@Data | |
7 | +public class HandOverExperimentOptions extends ExperimentOptions { | |
8 | + | |
9 | + | |
10 | + @Override | |
11 | + protected boolean checkOptions() { | |
12 | + return true; | |
13 | + } | |
14 | +} | ... | ... |