Skip to content

Commit ef1acea

Browse files
dgnemoAalyria Technologies, Inc
andauthored
Project import generated by Copybara. (#59)
* Project import generated by Copybara. GitOrigin-RevId: e48ee845290e2d1434194daa82843696cd6b4d93 Co-authored-by: Aalyria Technologies, Inc <[email protected]>
1 parent 1fdc706 commit ef1acea

File tree

10 files changed

+94
-97
lines changed

10 files changed

+94
-97
lines changed

api/common/telemetry.proto

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ message BeamStats {
5454

5555
enum ConnectionStatus {
5656
UNKNOWN = 0;
57-
SEEKING = 1;
58-
LOCKED = 2;
57+
SEEKING = 1;
58+
LOCKED = 2;
5959
}
6060

6161
// The progress of establishing a connection with the target specified in
@@ -143,6 +143,10 @@ message ReceiverStats {
143143
// The mean squared error, in dB, of the signal processed by the receiver.
144144
optional double mse_db = 6;
145145

146+
// The carrier to noise plus interference ratio (CINR), in dB, measured
147+
// by the receiver.
148+
optional double carrier_to_noise_plus_interference_db = 7;
149+
146150
reserved 1;
147151
}
148152

@@ -211,8 +215,8 @@ message RadioEvent {
211215
}
212216
enum LinkStatus {
213217
UNKNOWN = 0;
214-
DOWN = 1;
215-
UP = 2;
218+
DOWN = 1;
219+
UP = 2;
216220
}
217221
oneof event {
218222
LinkStatus link_status = 3;
@@ -224,8 +228,8 @@ message PortEvent {
224228
optional string port_id = 1;
225229
enum PortStatus {
226230
UNKNOWN = 0;
227-
DOWN = 1;
228-
UP = 2;
231+
DOWN = 1;
232+
UP = 2;
229233
}
230234
oneof event {
231235
PortStatus port_status = 2;
@@ -237,8 +241,8 @@ message InterfaceEvent {
237241
optional string interface_id = 1;
238242
enum InterfaceStatus {
239243
UNKNOWN = 0;
240-
DISABLED = 1;
241-
ENABLED = 2;
244+
DISABLED = 1;
245+
ENABLED = 2;
242246
}
243247
oneof event {
244248
InterfaceStatus interface_status = 2;

api/common/wireless_modcod.proto

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,30 @@ message AdaptiveDataRateTable {
2828
optional string id = 3; // required.
2929

3030
// Maps a data-rate to the minimum C/(N+I) that is required to maintain it.
31-
message ChannelStateDataRateMapping {
31+
message CarrierToNoisePlusInterferenceDataRateMapping {
3232
// The ratio of the power of the carrier (or signal) at the demod input to
3333
// the noise power of the signal plus the power of the interfering signals,
3434
// commonly abbreviated C/(N+I), in units of dB.
3535
optional double min_carrier_to_noise_plus_interference_db = 1;
3636

37-
// The layer 2 data rate expected, in bps, based on the channel state
38-
// information from the receiver that would be sent back to the transmitter.
37+
// The layer 2 data rate achievable, in bps, provided the receiver receives
38+
// at least the min_carrier_to_noise_plus_interference_db specified above.
3939
optional double tx_data_rate_bps = 2;
4040
}
4141
// Steps should be sorted by C/(N+I) in ascending order.
42-
repeated ChannelStateDataRateMapping step = 2;
42+
repeated CarrierToNoisePlusInterferenceDataRateMapping
43+
carrier_to_noise_plus_interference_steps = 2;
4344

44-
// Deprecated (use step).
45-
message ReceivedSignalLevelDataRateMapping {
46-
optional double min_received_signal_power_dbw = 1 [deprecated = true];
47-
optional double tx_data_rate_bps = 2 [deprecated = true];
45+
// Maps a data-rate to the minimum received signal power, at the receiver
46+
// output, that is required to maintain it.
47+
message ReceivedSignalPowerDataRateMapping {
48+
optional double min_received_signal_power_dbw = 1;
49+
optional double tx_data_rate_bps = 2;
4850
}
49-
repeated ReceivedSignalLevelDataRateMapping steps = 1 [deprecated = true];
51+
// Prefer using `carrier_to_noise_plus_interference_steps`.
52+
// This field is used as fallback if
53+
// `carrier_to_noise_plus_interference_steps` are not provided,
54+
// or if the receiver does not support CNIR.
55+
// Steps should be sorted by min_received_signal_power_dbw in ascending order.
56+
repeated ReceivedSignalPowerDataRateMapping received_signal_power_steps = 1;
5057
}

api/nbi/v1alpha/nbi.proto

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,21 +152,18 @@ message GetEntityRequest {
152152
// The id can be omitted, in which case a unique ID will be generated
153153
// by the backend.
154154
message CreateEntityRequest {
155-
optional string type = 1;
156-
optional Entity entity = 2;
155+
optional Entity entity = 1;
157156
}
158157

159158
// The posted Entity is merged with the existing one. The provided entity should
160159
// only specify the fields to be update, ID and Type should be omited.
161160
message UpdateEntityRequest {
162-
optional string type = 1;
163-
optional string id = 2;
164-
optional Entity entity = 3;
161+
optional Entity entity = 1;
165162
}
166163

167164
message ListEntitiesRequest {
168-
reserved 2, 7 to max; // NEXT_ID: 6
169-
optional string type = 1; // required.
165+
reserved 2, 7 to max; // NEXT_ID: 7
166+
optional EntityType type = 1; // required.
170167
// The time interval of the history being requested. If both start and end
171168
// time are empty, return only the latest entities of the above type.
172169
// Do not use yet; results may be incomplete.
@@ -183,7 +180,7 @@ message ListEntitiesResponse {
183180
}
184181

185182
message ListEntitiesOverTimeRequest {
186-
optional string type = 1; // required.
183+
optional EntityType type = 1; // required.
187184

188185
// The time range of the history being requested.
189186
optional aalyria.spacetime.api.common.TimeInterval interval = 2; // required.
@@ -228,7 +225,7 @@ message EntityFilter {
228225
}
229226

230227
message DeleteEntityRequest {
231-
optional string type = 1;
228+
optional EntityType type = 1;
232229
optional string id = 2;
233230

234231
// This is a required field. The client must provide the latest known

api/nbi/v1alpha/resources/network_link.proto

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -147,33 +147,6 @@ message WirelessLinkBudget {
147147
optional double carrier_to_noise_density_db_per_hz = 9;
148148
}
149149

150-
// Describes expected changes to the accessibility of a link to a destination
151-
// on a particular channel.
152-
message LinkReport {
153-
reserved 1, 3, 4, 5, 6, 8 to max;
154-
// The ID of the destination interface described by this report.
155-
optional aalyria.spacetime.api.common.NetworkInterfaceId dst = 7; // required
156-
157-
// A series of non-overlapping time intervals that describe the predicted
158-
// accessibility of the link -- and link metrics within accessible intervals.
159-
message AccessInterval {
160-
reserved 3;
161-
162-
// The applicable time interval (may be open ended).
163-
optional aalyria.spacetime.api.common.TimeInterval interval = 1;
164-
165-
// Whether or not the link is predicted/known to be accessible (usable).
166-
optional Accessibility accessibility = 2;
167-
168-
// Delay incurred by a data-frame when communicated over this link.
169-
optional aalyria.spacetime.api.common.Duration frame_delay = 4;
170-
171-
// The modeled data rate capacity, in layer 2 bits per second.
172-
optional double data_rate_bps = 5;
173-
}
174-
repeated AccessInterval access_intervals = 2;
175-
}
176-
177150
// Describes expected changes to the accessibility of a link to a destination
178151
// on a particular channel.
179152
message WirelessLinkReport {
@@ -223,17 +196,36 @@ message WirelessLinkReport {
223196
repeated WirelessAccessInterval access_intervals = 4;
224197
}
225198

226-
// Provides interface link reports for all possible wired links from a source
227-
// interface. It is the responsibility of some SDN application to insert link
199+
// Provides interface link report between `src` and `dst` interfaces,
200+
// at different `access_intervals`.
201+
// It is the responsibility of some SDN application to insert link
228202
// reports corresponding to the physical availability of connections from each
229203
// source interface they manage to any other interfaces which should be
230204
// considered reachable.
231205
message InterfaceLinkReport {
232-
reserved 1, 3;
233-
// The source interface for all of the reported possible wired links.
206+
reserved 1, 2, 3;
207+
// The source interface.
234208
optional aalyria.spacetime.api.common.NetworkInterfaceId src = 4;
235-
// A set of possible links that this source interface could participate in.
236-
repeated LinkReport links = 2;
209+
210+
// The destination interface.
211+
optional aalyria.spacetime.api.common.NetworkInterfaceId dst = 5;
212+
213+
// A series of non-overlapping time intervals that describe the predicted
214+
// accessibility of the link -- and link metrics within accessible intervals.
215+
message AccessInterval {
216+
// The applicable time interval (may be open ended).
217+
optional aalyria.spacetime.api.common.TimeInterval interval = 1;
218+
219+
// Whether or not the link is predicted/known to be accessible (usable).
220+
optional Accessibility accessibility = 2;
221+
222+
// Delay incurred by a data-frame when communicated over this link.
223+
optional aalyria.spacetime.api.common.Duration frame_delay = 3;
224+
225+
// The modeled data rate capacity, in layer 2 bits per second.
226+
optional double data_rate_bps = 4;
227+
}
228+
repeated AccessInterval access_intervals = 6;
237229
}
238230

239231
// Provides transceiver link reports for all possible wireless links from a

api/nbi/v1alpha/resources/service_request.proto

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,11 @@ message ServiceRequest {
4646

4747
oneof src_type {
4848
string src_node_id = 2;
49-
aalyria.spacetime.api.common.NetworkInterfaceId src_interface_id = 3;
5049
string src_devices_in_region_id = 8;
5150
}
5251

5352
oneof dst_type {
5453
string dst_node_id = 16;
55-
aalyria.spacetime.api.common.NetworkInterfaceId dst_interface_id = 17;
5654
string dst_devices_in_region_id = 18;
5755
}
5856

@@ -153,7 +151,7 @@ message ServiceRequest {
153151
// time.
154152
repeated IntentAndIntervals intent_dependencies = 14;
155153

156-
reserved 1, 7;
154+
reserved 1, 3, 7, 17;
157155
reserved 19 to max; // Next IDs.
158156
}
159157

entity_samples/build_a_scenario_tutorial/terrestrial_link_backward.textproto

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,16 @@ group: {
1717
type: INTERFACE_LINK_REPORT
1818
}
1919
interface_link_report: {
20-
links: {
21-
access_intervals: {
22-
accessibility: ACCESS_EXISTS
23-
data_rate_bps: 1e+12
24-
}
25-
dst: {
26-
node_id: "test-pop-network-node"
27-
interface_id: "wan"
28-
}
29-
}
3020
src: {
3121
node_id: "test-gateway-network-node"
3222
interface_id: "wan"
3323
}
24+
dst: {
25+
node_id: "test-pop-network-node"
26+
interface_id: "wan"
27+
}
28+
access_intervals: {
29+
accessibility: ACCESS_EXISTS
30+
data_rate_bps: 1e+12
31+
}
3432
}

entity_samples/build_a_scenario_tutorial/terrestrial_link_forward.textproto

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,16 @@ group: {
1717
type: INTERFACE_LINK_REPORT
1818
}
1919
interface_link_report: {
20-
links: {
21-
access_intervals: {
22-
accessibility: ACCESS_EXISTS
23-
data_rate_bps: 1e+12
24-
}
25-
dst: {
26-
node_id: "test-gateway-network-node"
27-
interface_id: "wan"
28-
}
29-
}
3020
src: {
3121
node_id: "test-pop-network-node"
3222
interface_id: "wan"
3323
}
24+
dst: {
25+
node_id: "test-gateway-network-node"
26+
interface_id: "wan"
27+
}
28+
access_intervals: {
29+
accessibility: ACCESS_EXISTS
30+
data_rate_bps: 1e+12
31+
}
3432
}

java/com/aalyria/spacetime/codesamples/nbi/client/ListEntities.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public static void main(String[] args) {
7474

7575
// This stub can now be used to call any method in the NetOps service.
7676
ListEntitiesRequest request =
77-
ListEntitiesRequest.newBuilder().setType(EntityType.PLATFORM_DEFINITION.name()).build();
77+
ListEntitiesRequest.newBuilder().setType(EntityType.PLATFORM_DEFINITION).build();
7878
ListEntitiesResponse entities = stub.listEntities(request);
7979
System.out.println("ListEntitiesResponse received: \n" + entities.toString());
8080
}

tools/nbictl/connection_test.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ import (
2323
"testing"
2424
"time"
2525

26+
"github.com/bazelbuild/rules_go/go/tools/bazel"
27+
"golang.org/x/sync/errgroup"
28+
2629
nbi "aalyria.com/spacetime/api/nbi/v1alpha"
2730
"aalyria.com/spacetime/auth/authtest"
2831
"aalyria.com/spacetime/github/tools/nbictl/nbictlpb"
29-
"github.com/bazelbuild/rules_go/go/tools/bazel"
30-
"golang.org/x/sync/errgroup"
3132
)
3233

3334
const (
@@ -113,9 +114,8 @@ func TestDial_insecure(t *testing.T) {
113114
defer conn.Close()
114115

115116
// Test a gRPC method invocation
116-
listEntityType := "TYPE"
117117
client := nbi.NewNetOpsClient(conn)
118-
_, err = client.ListEntities(ctx, &nbi.ListEntitiesRequest{Type: &listEntityType})
118+
_, err = client.ListEntities(ctx, &nbi.ListEntitiesRequest{Type: nbi.EntityType_ANTENNA_PATTERN.Enum()})
119119
checkErr(t, err)
120120

121121
// Verify that the method invocation reached the server
@@ -180,8 +180,7 @@ func TestDial_serverCertificate(t *testing.T) {
180180

181181
// Test a gRPC method invocation
182182
client := nbi.NewNetOpsClient(conn)
183-
listEntityType := "TYPE"
184-
_, err = client.ListEntities(ctx, &nbi.ListEntitiesRequest{Type: &listEntityType})
183+
_, err = client.ListEntities(ctx, &nbi.ListEntitiesRequest{Type: nbi.EntityType_ANTENNA_PATTERN.Enum()})
185184
checkErr(t, err)
186185

187186
// Verify that the method invocation reached the server

0 commit comments

Comments
 (0)