syntax = "proto3";

package api;

option go_package = "github.com/chirpstack/chirpstack/api/go/v4";
option java_package = "io.chirpstack.api";
option java_multiple_files = true;
option java_outer_classname = "FrameLogProto";

import "google/protobuf/timestamp.proto";
import "chirpstack-api/common/common.proto";
import "chirpstack-api/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;
}

message DownlinkFrameLog {
    // Time.
    google.protobuf.Timestamp time = 1;

    // PHYPayload.
    bytes phy_payload = 2;

    // TX meta-data.
    gw.DownlinkTXInfo tx_info = 3;

    // Downlink ID (UUID).
    string 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;
}
