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

Modeled coverage #344

Merged
merged 22 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from 17 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
1 change: 1 addition & 0 deletions src/service/mobile_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ enum admin_key_role {
enum network_key_role {
mobile_carrier = 0;
mobile_router = 1;
mobile_pcs = 2;
maplant marked this conversation as resolved.
Show resolved Hide resolved
}

message authorization_verify_req_v1 {
Expand Down
68 changes: 67 additions & 1 deletion src/service/poc_mobile.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ message cell_heartbeat_req_v1 {
string cbsd_id = 9;

bytes signature = 10;

// Last known coverage object UUID
bytes coverage_object = 11;
}

message cell_heartbeat_resp_v1 { string id = 1; }
Expand Down Expand Up @@ -80,6 +83,42 @@ message subscriber_location_ingest_report_v1 {
subscriber_location_req_v1 report = 2;
}

enum signal_level {
NO = 0;
LOW = 1;
MEDIUM = 2;
HIGH = 3;
}

// Radio signal level and power in the h3 hex.
message radio_hex_signal_level {
// H3 hex tile covered by the radio
string location = 1;
maplant marked this conversation as resolved.
Show resolved Hide resolved
signal_level signal_level = 2;
// Signal power of the radio in dBm (decibel-milliwatts)
double signal_power = 3;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment with type info?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dBm, apparently

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a u32 or something like we do with IoT PoC and use ddbm? trying to avoid floats since they're massive and terrible language support

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see a resolved comment but no explanation? don't we typically have this type of field as uint32 or uint64 with the ddBm scale comment?

}

message coverage_object_req_v1 {
bytes pub_key = 1;
bytes uuid = 2;
maplant marked this conversation as resolved.
Show resolved Hide resolved
string cbsd_id = 3;
// 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;
}

message coverage_object_resp_v1 { string id = 1; }

// Coverage object report output by ingestor, tagged with received_timestamp
message coverage_object_ingest_report_v1 {
// Timestamp in milliseconds since unix epoch
uint64 received_timestamp = 1;
coverage_object_req_v1 report = 2;
}

service poc_mobile {
rpc submit_speedtest(speedtest_req_v1) returns (speedtest_resp_v1);
rpc submit_cell_heartbeat(cell_heartbeat_req_v1)
Expand All @@ -88,6 +127,8 @@ service poc_mobile {
returns (data_transfer_session_resp_v1);
rpc submit_subscriber_location(subscriber_location_req_v1)
returns (subscriber_location_resp_v1);
rpc submit_coverage_object(coverage_object_req_v1)
returns (coverage_object_resp_v1);
}

message file_info {
Expand All @@ -99,13 +140,30 @@ message file_info {

message processed_files { repeated file_info files = 1; }

message coverage_object {
bytes pub_key = 1;
bytes uuid = 2;
string cbsd_id = 3;
uint64 coverage_claim_time = 4;
repeated radio_hex_signal_level coverage = 5;
bool indoor = 6;
coverage_object_validity validity = 7;
}

enum coverage_object_validity {
coverage_object_validity_valid = 0;
coverage_object_validity_invalid_pub_key = 1;
}

message heartbeat {
string cbsd_id = 1;
bytes pub_key = 2;
float reward_multiplier = 3;
uint64 timestamp = 4;
cell_type cell_type = 5;
heartbeat_validity validity = 6;
// UUID of the coverage object associated with this heartbeat
bytes coverage_object = 7;
}

enum heartbeat_validity {
Expand All @@ -114,8 +172,16 @@ enum heartbeat_validity {
heartbeat_validity_heartbeat_outside_range = 2;
heartbeat_validity_bad_cbsd_id = 3;
heartbeat_validity_not_operational = 4;
/// Gateway not found on the blockchain
// Gateway not found on the blockchain
heartbeat_validity_gateway_not_found = 5;
// No such coverage object with that UUID
heartbeat_validity_no_such_coverage_object = 6;
// Invalid coverage object UUID (cbsd_id did not match)
heartbeat_validity_bad_coverage_object = 7;
// Invalid latitude and/or longitude
heartbeat_validity_invalid_lat_lon = 8;
// Heartbeat is too distant from the coverage object's hex coverage
heartbeat_validity_too_far_from_coverage = 9;
}

message speedtest_avg {
Expand Down