Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wifi hotspot compatibility to coverage objects #373

Merged
merged 2 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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==')
})
})
Loading