RFS API
The RFS component defines the functionality of a RF sensor device, and it is
specified in src/protobuf/mdif/rfs/rfs.proto
.
Protobuf specification
The following documentation is generated from the Protobuf specification in
src/protobuf/mdif/rfs/rfs.proto
.
Table of Contents
mdif/common.proto
Common to all mdif protobuffers.
Status
Defines the status of a request
Name |
Number |
Description |
---|---|---|
SUCCESS |
0 |
The request was successful |
FAILURE |
1 |
The request failed |
ERR_INVALID |
2 |
The request was invalid |
ERR_NOT_SUPPORTED |
3 |
The request is not supported |
ERR_NOT_IMPLEMENTED |
4 |
The request is not implemented |
ERR_NOT_READY |
5 |
The device is not ready to process the request |
ERR_SIZE |
6 |
The device cannot process the size |
mdif/rfs/rfs.proto
Message allocation for the RFS component are in the range:
Start |
End |
Radix |
---|---|---|
0x80 |
0x9F |
Hex |
128 |
159 |
Dec |
RfsService
Defines the relationship between requests and responses in the RFS component
Method Name |
Request Type |
Response Type |
Description |
---|---|---|---|
Start |
Use to start the RFS detection algorithms |
||
Stop |
Use to stop the RFS detection algorithms |
||
GetDroneInfo |
Use to get individual drone info |
||
RemoteIdStream |
Use to request a stream of remote ID messages. |
DroneInfo
Description of a drone.
Field |
Type |
Description |
---|---|---|
type_id |
Identifier for detection filter |
|
type_id_name |
Name of RF protocol/Family (e.g Lightbridge) |
|
drone_name |
Name of drone(s) (e.g Phantom 3) |
|
vendor_id |
Identifier to rf emitter vendor (e.g 1) |
|
vendor_id_name |
Name of rf emitter vendor (e.g DJI) |
|
category_id |
Identifier of rf emitter category drone/controller/wifi (e.g 1) |
|
category_id_name |
Name of rf emitter category (e.g Drone) |
|
band |
Bands where detector looks (e.g 2G4 and 5G8) |
GetDroneInfoReq
Get individual drone description, just in time or loop through and build library.
Field |
Type |
Description |
---|---|---|
type_id |
Id of detection filter associated with drone. 0 is first in library. |
GetDroneInfoRes
Response to GetDroneInfoReq
Field |
Type |
Description |
---|---|---|
status |
||
drone_info |
Description of drone. |
|
next_drone_type_id |
Id to next drone, 0 indicates end of library. |
GetDronelistReq
Get drone descriptions for all drones in target device library. Deprecated, use GetDroneInfoReq instead
GetDronelistRes
Response to GetDronelistReq Deprecated
Field |
Type |
Description |
---|---|---|
status |
||
drone_info |
RemoteIdInd
Remote ID indication with binary message pack.
Field |
Type |
Description |
---|---|---|
mac_adr |
MAC address from which the remote ID was received. |
|
payload |
Remote ID message pack, as per ASTM-F3411 |
RemoteIdStreamReq
Request that remote ID results be streamed from the device.
Field |
Type |
Description |
---|---|---|
enable |
Enable or disable the stream. |
RemoteIdStreamRes
Response to RemoteIdStreamReq.
Field |
Type |
Description |
---|---|---|
status |
Status of the request. |
RfsMsg
Rfs wire format messages
This message dictates the final format on the wire for rfs messages. It is a oneof construct to wrap a single message at a time.
Every request (req) has a corresponding response (res). The req/res pairs are defined in the RfsService through RPC patterns.
Indications (ind) are pushed without a request at any time
Field |
Type |
Description |
---|---|---|
start_req |
Request RFS start |
|
start_res |
RFS start response |
|
stop_req |
Request RFS stop |
|
stop_res |
RFS stop response |
|
get_dronelist_req |
Deprecated. use GetDroneInfoReq instead |
|
get_dronelist_res |
Deprecated. |
|
get_drone_info_req |
Get individual drone info |
|
get_drone_info_res |
Individual drone info response |
|
rfs_threat_ind |
RFS threat indication |
|
wifi_threat_ind |
Wifi threat indication |
|
threat_stopped_ind |
Threat stopped indication |
|
remote_id_stream_req |
Remote drone ID stream start - Request |
|
remote_id_stream_res |
Remote Drone ID stream start - Response |
|
remote_id_ind |
Remote Drone ID detection - Indication |
RfsThreatInd
Post rfs threat indication.
Field |
Type |
Description |
---|---|---|
id |
Instance of detection thread. |
|
type_id |
Detection type id. |
|
start_time |
Start time of detection thread. |
|
power |
Power at time of reporting. |
|
current_band |
Band(s) where detected occurs. |
|
relative_bearing |
Relative bearing of rfs at time of reporting. |
|
last_seen |
Last time of detection |
|
msg_timestamp |
Time message is compiled. |
RfsThreatInd.RelativeBearing
Field |
Type |
Description |
---|---|---|
valid |
Valid when applicable. |
|
bearing |
Calculated Bearing. |
|
var_bearing |
Variance in bearing. |
|
timestamp |
Time bearing is calculated. |
StartReq
Request RFS start detection.
StartRes
Response to StartReq
Field |
Type |
Description |
---|---|---|
status |
StopReq
Request RFS stop detection.
StopRes
Response to StopReq
Field |
Type |
Description |
---|---|---|
status |
ThreatStoppedInd
Post stop of threat indication.
Field |
Type |
Description |
---|---|---|
id |
Instance of detection thread. |
|
msg_timestamp |
Time message is compiled. |
WifiThreatInd
Post wifi threat indication.
Field |
Type |
Description |
---|---|---|
id |
Instance of detection thread. |
|
type_id |
Detection type id. |
|
start_time |
Start time of detection thread. |
|
power |
Power at time of reporting. |
|
channel |
Wifi channel as per international standards 802.11 a/b/g/n. |
|
mac_adr |
Mac address of wifi threat. |
|
msg_timestamp |
Time message is compiled. |
ScanBand
Enumeration of frequncies bands scanned.
Name |
Number |
Description |
---|---|---|
Invalid |
0 |
Default, before overwriting with detection band. |
MHz433 |
1 |
ISM band ~433 |
MHz900 |
2 |
ISM band ~900 |
MHz1200 |
3 |
ISM band 1G2 |
MHz2400 |
4 |
ISM band 2G4 |
MHz5800 |
5 |
ISM band 5G8 |
MHz5200 |
6 |
ISM band 5G2 |
StartMode
Enumeration of possible start-modes.
Name |
Number |
Description |
---|---|---|
Default |
0 |
RFS runs on internal antenna and external if present |
ExtAntOnly |
1 |
RFS runs on external antenna only. Will signal error if not present |
IntAntOnly |
2 |
RFS runs on internal antenna only, even if external is present |
UAVModeSearch |
3 |
RFS runs on internal antenna in search/direction finding mode |
Scalar Value Types
.proto Type |
Notes |
C++ |
Java |
Python |
Go |
C# |
PHP |
Ruby |
---|---|---|---|---|---|---|---|---|
double |
double |
float |
float64 |
double |
float |
Float |
||
float |
float |
float |
float32 |
float |
float |
Float |
||
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
|
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
|
Uses variable-length encoding. |
uint32 |
int |
int/long |
uint32 |
uint |
integer |
Bignum or Fixnum (as required) |
|
Uses variable-length encoding. |
uint64 |
long |
int/long |
uint64 |
ulong |
integer/string |
Bignum or Fixnum (as required) |
|
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
|
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
|
Always four bytes. More efficient than uint32 if values are often greater than 2^28. |
uint32 |
int |
int |
uint32 |
uint |
integer |
Bignum or Fixnum (as required) |
|
Always eight bytes. More efficient than uint64 if values are often greater than 2^56. |
uint64 |
long |
int/long |
uint64 |
ulong |
integer/string |
Bignum |
|
Always four bytes. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
|
Always eight bytes. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
|
bool |
boolean |
boolean |
bool |
bool |
boolean |
TrueClass/FalseClass |
||
A string must always contain UTF-8 encoded or 7-bit ASCII text. |
string |
String |
str/unicode |
string |
string |
string |
String (UTF-8) |
|
May contain any arbitrary sequence of bytes. |
string |
ByteString |
str |
[]byte |
ByteString |
string |
String (ASCII-8BIT) |