mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-06-17 06:48:24 +00:00
api: Refactor api/frame_log.proto into streams/frames.proto.
This commit is contained in:
18
api/rust/build.rs
vendored
18
api/rust/build.rs
vendored
@ -141,11 +141,22 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.out_dir(out_dir.join("streams"))
|
||||
.file_descriptor_set_path(out_dir.join("streams").join("proto_descriptor.bin"))
|
||||
.compile_well_known_types(true)
|
||||
.extern_path(".google.protobuf", well_known_types_path)
|
||||
.extern_path(".common", "crate::common")
|
||||
.extern_path(".gw", "crate::gw")
|
||||
.compile(
|
||||
&[cs_dir.join("streams").join("meta.proto").to_str().unwrap()],
|
||||
&[proto_dir.join("chirpstack").to_str().unwrap()],
|
||||
&[
|
||||
cs_dir.join("streams").join("meta.proto").to_str().unwrap(),
|
||||
cs_dir
|
||||
.join("streams")
|
||||
.join("frames.proto")
|
||||
.to_str()
|
||||
.unwrap(),
|
||||
],
|
||||
&[
|
||||
proto_dir.join("chirpstack").to_str().unwrap(),
|
||||
proto_dir.join("google").to_str().unwrap(),
|
||||
],
|
||||
)?;
|
||||
|
||||
#[cfg(feature = "json")]
|
||||
@ -157,7 +168,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.out_dir(out_dir.join("streams"))
|
||||
.extern_path(".common", "crate::common")
|
||||
.extern_path(".gw", "crate::gw")
|
||||
.build(&[".meta"])?;
|
||||
.build(&[".meta", ".streams"])?;
|
||||
}
|
||||
|
||||
// api
|
||||
@ -188,7 +199,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.unwrap(),
|
||||
cs_dir.join("api").join("device.proto").to_str().unwrap(),
|
||||
cs_dir.join("api").join("gateway.proto").to_str().unwrap(),
|
||||
cs_dir.join("api").join("frame_log.proto").to_str().unwrap(),
|
||||
cs_dir
|
||||
.join("api")
|
||||
.join("multicast_group.proto")
|
||||
|
74
api/rust/proto/chirpstack/api/frame_log.proto
vendored
74
api/rust/proto/chirpstack/api/frame_log.proto
vendored
@ -1,74 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package api;
|
||||
|
||||
option go_package = "github.com/chirpstack/chirpstack/api/go/v4/api";
|
||||
option java_package = "io.chirpstack.api";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "FrameLogProto";
|
||||
option csharp_namespace = "Chirpstack.Api";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "common/common.proto";
|
||||
import "gw/gw.proto";
|
||||
|
||||
message UplinkFrameLog {
|
||||
// PHYPayload.
|
||||
bytes phy_payload = 1;
|
||||
|
||||
// TX meta-data.
|
||||
gw.UplinkTxInfo tx_info = 2;
|
||||
|
||||
// RX meta-data.
|
||||
repeated gw.UplinkRxInfo rx_info = 3;
|
||||
|
||||
// Message type.
|
||||
common.MType m_type = 4;
|
||||
|
||||
// Device address (optional).
|
||||
string dev_addr = 5;
|
||||
|
||||
// Device EUI (optional).
|
||||
string dev_eui = 6;
|
||||
|
||||
// Time.
|
||||
google.protobuf.Timestamp time = 7;
|
||||
|
||||
// Plaintext f_opts mac-commands.
|
||||
bool plaintext_f_opts = 8;
|
||||
|
||||
// Plaintext frm_payload.
|
||||
bool plaintext_frm_payload = 9;
|
||||
}
|
||||
|
||||
message DownlinkFrameLog {
|
||||
// Time.
|
||||
google.protobuf.Timestamp time = 1;
|
||||
|
||||
// PHYPayload.
|
||||
bytes phy_payload = 2;
|
||||
|
||||
// TX meta-data.
|
||||
gw.DownlinkTxInfo tx_info = 3;
|
||||
|
||||
// Downlink ID.
|
||||
uint32 downlink_id = 4;
|
||||
|
||||
// Gateway ID (EUI64).
|
||||
string gateway_id = 5;
|
||||
|
||||
// Message type.
|
||||
common.MType m_type = 6;
|
||||
|
||||
// Device address (optional).
|
||||
string dev_addr = 7;
|
||||
|
||||
// Device EUI (optional).
|
||||
string dev_eui = 8;
|
||||
|
||||
// Plaintext f_opts mac-commands.
|
||||
bool plaintext_f_opts = 9;
|
||||
|
||||
// Plaintext frm_payload.
|
||||
bool plaintext_frm_payload = 10;
|
||||
}
|
74
api/rust/proto/chirpstack/streams/frames.proto
vendored
Normal file
74
api/rust/proto/chirpstack/streams/frames.proto
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package streams;
|
||||
|
||||
option go_package = "github.com/chirpstack/chirpstack/api/go/v4/streams";
|
||||
option java_package = "io.chirpstack.api.streams";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "FramesProto";
|
||||
option csharp_namespace = "Chirpstack.Streams";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "common/common.proto";
|
||||
import "gw/gw.proto";
|
||||
|
||||
message UplinkFrameLog {
|
||||
// PHYPayload.
|
||||
bytes phy_payload = 1;
|
||||
|
||||
// TX meta-data.
|
||||
gw.UplinkTxInfo tx_info = 2;
|
||||
|
||||
// RX meta-data.
|
||||
repeated gw.UplinkRxInfo rx_info = 3;
|
||||
|
||||
// Message type.
|
||||
common.MType m_type = 4;
|
||||
|
||||
// Device address (optional).
|
||||
string dev_addr = 5;
|
||||
|
||||
// Device EUI (optional).
|
||||
string dev_eui = 6;
|
||||
|
||||
// Time.
|
||||
google.protobuf.Timestamp time = 7;
|
||||
|
||||
// Plaintext f_opts mac-commands.
|
||||
bool plaintext_f_opts = 8;
|
||||
|
||||
// Plaintext frm_payload.
|
||||
bool plaintext_frm_payload = 9;
|
||||
}
|
||||
|
||||
message DownlinkFrameLog {
|
||||
// Time.
|
||||
google.protobuf.Timestamp time = 1;
|
||||
|
||||
// PHYPayload.
|
||||
bytes phy_payload = 2;
|
||||
|
||||
// TX meta-data.
|
||||
gw.DownlinkTxInfo tx_info = 3;
|
||||
|
||||
// Downlink ID.
|
||||
uint32 downlink_id = 4;
|
||||
|
||||
// Gateway ID (EUI64).
|
||||
string gateway_id = 5;
|
||||
|
||||
// Message type.
|
||||
common.MType m_type = 6;
|
||||
|
||||
// Device address (optional).
|
||||
string dev_addr = 7;
|
||||
|
||||
// Device EUI (optional).
|
||||
string dev_eui = 8;
|
||||
|
||||
// Plaintext f_opts mac-commands.
|
||||
bool plaintext_f_opts = 9;
|
||||
|
||||
// Plaintext frm_payload.
|
||||
bool plaintext_frm_payload = 10;
|
||||
}
|
4
api/rust/proto/chirpstack/streams/meta.proto
vendored
4
api/rust/proto/chirpstack/streams/meta.proto
vendored
@ -1,11 +1,11 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package meta;
|
||||
package streams;
|
||||
|
||||
option go_package = "github.com/chirpstack/chirpstack/api/go/v4/streams";
|
||||
option java_package = "io.chirpstack.api.streams";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "StreamsProto";
|
||||
option java_outer_classname = "MetaProto";
|
||||
option csharp_namespace = "Chirpstack.Streams";
|
||||
|
||||
import "common/common.proto";
|
||||
|
4
api/rust/src/streams.rs
vendored
4
api/rust/src/streams.rs
vendored
@ -1,3 +1,3 @@
|
||||
include!(concat!(env!("OUT_DIR"), "/streams/meta.rs"));
|
||||
include!(concat!(env!("OUT_DIR"), "/streams/streams.rs"));
|
||||
#[cfg(feature = "json")]
|
||||
include!(concat!(env!("OUT_DIR"), "/streams/meta.serde.rs"));
|
||||
include!(concat!(env!("OUT_DIR"), "/streams/streams.serde.rs"));
|
||||
|
Reference in New Issue
Block a user