Skip to content

Commit 5c3fcae

Browse files
committed
Replace references to trueCall with "ran/RAN"
1 parent 470e092 commit 5c3fcae

File tree

8 files changed

+647
-85
lines changed

8 files changed

+647
-85
lines changed

src/main/java/swim/cellular/agent/ENodeBAgent.java

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,25 @@ public class ENodeBAgent extends AbstractAgent {
3737
ValueLane<Value> status;
3838

3939
/**
40-
* Computed kpis from TrueCall data for this cell site.
40+
* Computed kpis from RAN data for this cell site.
4141
*/
4242
@SwimLane("kpis")
4343
ValueLane<Value> kpis;
4444

4545
/**
46-
* Latest TrueCall data for this cell site, updated by a simulator or other
46+
* Latest RAN data for this cell site, updated by a simulator or other
4747
* driver agent running in the same Swim Node as this eNodeB agent.
4848
*/
49-
@SwimLane("trueCallLatest")
50-
ValueLane<Value> trueCallLatest = this.<Value>valueLane()
51-
.didSet(this::didSetTrueCallLatest);
49+
@SwimLane("ranLatest")
50+
ValueLane<Value> ranLatest = this.<Value>valueLane()
51+
.didSet(this::didSetRanLatest);
5252

5353
/**
54-
* Rolling time series of historical TrueCall samples.
54+
* Rolling time series of historical ran samples.
5555
*/
56-
@SwimLane("trueCallHistory")
57-
MapLane<Long, Value> trueCallHistory = this.<Long, Value>mapLane()
58-
.didUpdate(this::didUpdateTrueCallHistory);
56+
@SwimLane("ranHistory")
57+
MapLane<Long, Value> ranHistory = this.<Long, Value>mapLane()
58+
.didUpdate(this::didUpdateRanHistory);
5959

6060
@SwimLane("summary")
6161
HttpLane<Value> summary = this.<Value>httpLane()
@@ -76,35 +76,35 @@ HttpResponse<?> onRequestSummary(HttpRequest<Value> request) {
7676
}
7777

7878
/**
79-
* Invoked when new TrueCall data is received.
79+
* Invoked when new ran data is received.
8080
*/
81-
void didSetTrueCallLatest(Value newSample, Value oldSample) {
82-
// Extract the recorded timestamp from the TrueCall sample.
81+
void didSetRanLatest(Value newSample, Value oldSample) {
82+
// Extract the recorded timestamp from the RAN sample.
8383
final long timestamp = newSample.get("recorded_time").longValue();
84-
// Record this sample in the TrueCall history lane.
85-
this.trueCallHistory.put(timestamp, newSample);
86-
// Update TrueCall KPIs to account foe the newly received sample.
84+
// Record this sample in the RAN history lane.
85+
this.ranHistory.put(timestamp, newSample);
86+
// Update RAN KPIs to account for the newly received sample.
8787
updateKpis(newSample);
8888
}
8989

9090
/**
91-
* Invoked when a new sample is added to the TrueCall history lane.
91+
* Invoked when a new sample is added to the RAN history lane.
9292
*/
93-
void didUpdateTrueCallHistory(Long timestamp, Value newSample, Value oldSample) {
94-
// Check if the size of the TrueCall history lane exceeds 10 samples,
93+
void didUpdateRanHistory(Long timestamp, Value newSample, Value oldSample) {
94+
// Check if the size of the RAN history lane exceeds 10 samples,
9595
// and drop the oldest excess samples.
96-
final int dropCount = this.trueCallHistory.size() - 10;
96+
final int dropCount = this.ranHistory.size() - 10;
9797
if (dropCount > 0) {
98-
this.trueCallHistory.drop(dropCount);
98+
this.ranHistory.drop(dropCount);
9999
}
100100
}
101101

102102
/**
103-
* Updates TrueCall KPIs with a newly received TrueCall sample.
103+
* Updates RAN KPIs with a newly received RAN sample.
104104
*/
105105
void updateKpis(Value newSample) {
106106
final Value oldKpis = this.kpis.get();
107-
// Get the previous number of TrueCall samples received, initializing to 0.
107+
// Get the previous number of RAN samples received, initializing to 0.
108108
final int oldCount = oldKpis.get("count").intValue(0);
109109

110110
// Compute running avergae of mean ul sinr;

src/main/java/swim/cellular/agent/ENodeBConnectorAgent.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ public class ENodeBConnectorAgent extends AbstractAgent {
1818
private ValueDownlink<Value> statusDownlink;
1919

2020
/**
21-
* A downlink to the trueCallLatest lane of the EnodeBAgent (whose uri is the
21+
* A downlink to the ranLatest lane of the EnodeBAgent (whose uri is the
2222
* same as this agent) hosted on cellular.swim.services. The downlink updates
23-
* whenever the trueCallLatest lane of the EnodeBAgenthosted on
23+
* whenever the ranLatest lane of the EnodeBAgent hosted on
2424
* cellular.swim.services is updated
2525
*/
26-
private ValueDownlink<Value> trueCallLatestDownlink;
26+
private ValueDownlink<Value> ranLatestDownlink;
2727

2828
/**
2929
* Cell site status lane updated by the downlink to the status lane
@@ -35,13 +35,13 @@ public class ENodeBConnectorAgent extends AbstractAgent {
3535
ValueLane<Value> status;
3636

3737
/**
38-
* Latest trueCall data for a cell site updated by the downlink to the
39-
* trueCallLatest lane of the EnodeBAgent hosted on cellular.swim.services,
38+
* Latest RAN data for a cell site updated by the downlink to the
39+
* ranLatest lane of the EnodeBAgent hosted on cellular.swim.services,
4040
* shared with the cell site and eNodeB agents running in the same Swim Node
4141
* as this connector agent.
4242
*/
43-
@SwimLane("trueCallLatest")
44-
ValueLane<Value> trueCallLatest;
43+
@SwimLane("ranLatest")
44+
ValueLane<Value> ranLatest;
4545

4646
/**
4747
* Invoked when new new status data is received from the remote agent
@@ -51,10 +51,10 @@ private void didUpdateStatus(Value newStatus, Value oldStatus) {
5151
}
5252

5353
/**
54-
* Invoked when new new trueCall sample data is received from the remote agent
54+
* Invoked when new new ran sample data is received from the remote agent
5555
*/
56-
private void didUpdateTrueCallLatest(Value newSample, Value oldSample) {
57-
this.trueCallLatest.set(newSample);
56+
private void didUpdateRanLatest(Value newSample, Value oldSample) {
57+
this.ranLatest.set(newSample);
5858
}
5959

6060
/**
@@ -72,13 +72,13 @@ public void didStart() {
7272
.open()
7373
.didSet(this::didUpdateStatus);
7474

75-
// Instantiate the trueCallLatestDownlink
76-
trueCallLatestDownlink = downlinkValue()
75+
// Instantiate the ranLatestDownlink
76+
ranLatestDownlink = downlinkValue()
7777
.hostUri(REMOTE_HOST_URI)
7878
.nodeUri(nodeUri()) // convenience method to get the current agent's URI
79-
.laneUri("trueCallLatest")
79+
.laneUri("ranLatest")
8080
.open()
81-
.didSet(this::didUpdateTrueCallLatest);
81+
.didSet(this::didUpdateRanLatest);
8282
}
8383

8484
/**
@@ -91,9 +91,9 @@ public void willStop() {
9191
statusDownlink.close();
9292
}
9393

94-
// close the trueCallLatestDownlink
95-
if (trueCallLatest != null) {
96-
trueCallLatest.close();
94+
// close the ranLatestDownlink
95+
if (ranLatest != null) {
96+
ranLatest.close();
9797
}
9898
}
9999

src/main/java/swim/cellular/agent/ENodeBSimAgent.java

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
import swim.api.SwimLane;
44
import swim.api.agent.AbstractAgent;
5-
import swim.api.lane.MapLane;
65
import swim.api.lane.ValueLane;
76
import swim.concurrent.TimerRef;
8-
import swim.observable.function.DidUpdateKey;
97
import swim.structure.Record;
108
import swim.structure.Value;
119

@@ -28,12 +26,12 @@ public class ENodeBSimAgent extends AbstractAgent {
2826
ValueLane<Value> status;
2927

3028
/**
31-
* Latest trueCall data for a cell site updated by the simulation, shared
29+
* Latest RAN data for a cell site updated by the simulation, shared
3230
* with the cell site and eNodeB agents running in the same Swim Node as
3331
* this sim agent.
3432
*/
35-
@SwimLane("trueCallLatest")
36-
ValueLane<Value> trueCallLatest;
33+
@SwimLane("ranLatest")
34+
ValueLane<Value> ranLatest;
3735

3836
/**
3937
* Runs a single step of the eNodeB simulation.
@@ -65,14 +63,14 @@ void onSimTick() {
6563
// Generate a random rrc re-establishment failure count between 1 and 9.
6664
final long rrcReestablishmentFailures = (long) (1 + Math.random() * 9);
6765

68-
// Update this eNodeB's trueCallLatest lane with the simulated data.
69-
final Value oldTrueCallLatest = this.trueCallLatest.get();
70-
final Value newTrueCallLatest = oldTrueCallLatest
66+
// Update this eNodeB's ranLatest lane with the simulated data.
67+
final Value oldRanLatest = this.ranLatest.get();
68+
final Value newRanLatest = oldRanLatest
7169
.updated("mean_ul_sinr", meanUlSinr)
7270
.updated("rrc_re_establishment_failures", rrcReestablishmentFailures)
7371
.updated("recorded_time", System.currentTimeMillis());
74-
this.trueCallLatest.set(newTrueCallLatest);
75-
trace(Record.of("simulated true call sample", newTrueCallLatest));
72+
this.ranLatest.set(newRanLatest);
73+
trace(Record.of("simulated RAN sample", newRanLatest));
7674
}
7775

7876
/**

src/main/resources/server-c.recon

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@kernel(class: "swim.store.db.DbStoreKernel", optional: true)
2+
@kernel(class: "swim.cellular.CellularUiRouter")
3+
4+
@web(port: 9009) {
5+
space: "cellular"
6+
@websocket {
7+
serverCompressionLevel: 0# -1 = default; 0 = off; 1-9 = deflate level
8+
clientCompressionLevel: 0# -1 = default; 0 = off; 1-9 = deflate level
9+
}
10+
}
11+
12+
cellular: @fabric {
13+
@node {
14+
pattern: "/site/:id"
15+
@agent(class: "swim.cellular.agent.SiteAgent")
16+
}
17+
18+
@node {
19+
uri: "/country/US/state/:id"
20+
@agent(class: "swim.cellular.agent.RegionAgent") {
21+
seed: "seed/country/US/state/CA.recon"
22+
}
23+
@agent(class: "swim.cellular.agent.RanAgent") {
24+
seed: "seed/country/US/state/CA-ran.recon"
25+
}
26+
}
27+
28+
@node {
29+
uri: "/country/:id"
30+
@agent(class: "swim.cellular.agent.RegionAgent") {
31+
seed: "seed/country/US.recon"
32+
}
33+
}
34+
35+
#@store {
36+
# path: "/tmp/swim-cellular/"
37+
#}
38+
}

0 commit comments

Comments
 (0)