Skip to content

Commit

Permalink
Add wifi hotspot compatibility to coverage objects (#373)
Browse files Browse the repository at this point in the history
* Add wifi hotspot compatibility to coverage objects

* Update test, I guess?
  • Loading branch information
Matthew Plant authored Nov 6, 2023
1 parent 5ab7f9b commit 7623c65
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
28 changes: 20 additions & 8 deletions src/service/poc_mobile.proto
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,19 @@ message radio_hex_signal_level {
message coverage_object_req_v1 {
bytes pub_key = 1;
bytes uuid = 2;
string cbsd_id = 3;
oneof key_type {
// For CBRS radio
string cbsd_id = 3;
// For WiFi radio
bytes hotspot_key = 4;
}
// Timestamp in seconds since the unix epoch indicating the start of coverage
uint64 coverage_claim_time = 4;
repeated radio_hex_signal_level coverage = 5;
bool indoor = 6;
bytes signature = 7;
uint64 coverage_claim_time = 5;
repeated radio_hex_signal_level coverage = 6;
bool indoor = 7;
// Trust score (0.0 - 1.0) multiplied by 1000
uint32 trust_score = 8;
bytes signature = 9;
}

message coverage_object_resp_v1 { string id = 1; }
Expand Down Expand Up @@ -243,10 +250,15 @@ enum heartbeat_validity {
}

message seniority_update {
string cbsd_id = 1;
oneof key_type {
// For CBRS radio
string cbsd_id = 1;
// For WiFi radio
bytes hotspot_key = 2;
}
// Timestamp of the new seniority for the radio
uint64 new_seniority_timestamp = 2;
seniority_update_reason reason = 3;
uint64 new_seniority_timestamp = 3;
seniority_update_reason reason = 4;
}

enum seniority_update_reason {
Expand Down
2 changes: 1 addition & 1 deletion test/service/poc_mobile.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ describe('seniority_update', () => {
.seniority_update_reason_heartbeat_not_seen,
})
const serializedTxn = PocMobile.seniority_update.encode(txn).finish()
expect(serializedTxn.toString('base64')).toBe('Cgdzb21lX2lkEJWa7zoYAA==')
expect(serializedTxn.toString('base64')).toBe('Cgdzb21lX2lkGJWa7zogAA==')
})
})

0 comments on commit 7623c65

Please sign in to comment.