Skip to content

Commit

Permalink
Adds support for streaming phone state and bluetooth messages over gRPC
Browse files Browse the repository at this point in the history
  • Loading branch information
christianrowlands committed Aug 19, 2024
1 parent edc359a commit 43a2c87
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ To publish a new version of the Network Survey Messaging API HTML page, use the

This will overwrite the current HTML content from the docs directory with the last API definition from the yaml file.

#### Building the protobuf Java and Python libraries
#### Building the protobuf Java library
The Java library is built and published with Java 8 to support older Android versions, however it can be built with
Java 11 if needed.

Expand All @@ -111,9 +111,8 @@ Generated code is here:
- Java: build/generated/source/proto/main/java/com/craxiom/messaging
- Python: build/generated/source/proto/main/python/com/craxiom/messaging

#### Generating Go code
The Go code is generated using the `protoc` compiler. The `protoc` compiler can be installed using the following command:
- `brew install protobuf`
## Generating Go code
The Go code is generated using the `protoc` compiler.

The Go code is generated using the following command:
- `protoc --go_out=go/ --go_opt=paths=source_relative --go-grpc_out=go/ --go-grpc_opt=paths=source_relative src/main/proto/*.proto`
Expand Down
14 changes: 14 additions & 0 deletions src/main/proto/com/craxiom/messaging/grpc/wireless_survey.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ import "com/craxiom/messaging/cdma_record.proto";
import "com/craxiom/messaging/umts_record.proto";
import "com/craxiom/messaging/lte_record.proto";
import "com/craxiom/messaging/nr_record.proto";
import "com/craxiom/messaging/phone_state.proto";
import "com/craxiom/messaging/lte_rrc.proto";
import "com/craxiom/messaging/lte_nas.proto";
import "com/craxiom/messaging/wifi_beacon_record.proto";
import "com/craxiom/messaging/wifi_probe_request_record.proto";
import "com/craxiom/messaging/wifi_ota_record.proto";
import "com/craxiom/messaging/bluetooth_record.proto";
import "com/craxiom/messaging/gnss_record.proto";
import "com/craxiom/messaging/energy_detection.proto";
import "com/craxiom/messaging/signal_detection.proto";
Expand All @@ -39,12 +41,16 @@ service WirelessSurvey {
}
rpc StreamNrSurvey (stream NrRecord) returns (NrSurveyResponse) {
}
rpc StreamPhoneState (stream PhoneState) returns (PhoneStateResponse) {
}
rpc StreamWifiBeaconSurvey (stream WifiBeaconRecord) returns (WifiBeaconSurveyResponse) {
}
rpc StreamWifiProbeRequestSurvey (stream WifiProbeRequestRecord) returns (WifiProbeRequestSurveyResponse) {
}
rpc StreamWifiOtaSurvey (stream WifiOtaRecord) returns (WifiOtaSurveyResponse) {
}
rpc StreamBluetoothSurvey (stream BluetoothRecord) returns (BluetoothSurveyResponse) {
}
rpc StreamGnssSurvey (stream GnssRecord) returns (GnssSurveyResponse) {
}
rpc StreamEnergyDetections (stream EnergyDetection) returns (EnergyDetectionResponse) {
Expand Down Expand Up @@ -77,6 +83,10 @@ message NrSurveyResponse {

}

message PhoneStateResponse {

}

message WifiBeaconSurveyResponse {

}
Expand All @@ -89,6 +99,10 @@ message WifiOtaSurveyResponse {

}

message BluetoothSurveyResponse {

}

message GnssSurveyResponse {

}
Expand Down

0 comments on commit 43a2c87

Please sign in to comment.