syntax = "proto3";

package emane;

import "core/api/grpc/common.proto";

message GetEmaneConfigRequest {
    int32 session_id = 1;
}

message GetEmaneConfigResponse {
    map<string, common.ConfigOption> config = 1;
}

message SetEmaneConfigRequest {
    int32 session_id = 1;
    map<string, string> config = 2;
}

message SetEmaneConfigResponse {
    bool result = 1;
}

message GetEmaneModelsRequest {
    int32 session_id = 1;
}

message GetEmaneModelsResponse {
    repeated string models = 1;
}

message GetEmaneModelConfigRequest {
    int32 session_id = 1;
    int32 node_id = 2;
    int32 interface = 3;
    string model = 4;
}

message GetEmaneModelConfigResponse {
    map<string, common.ConfigOption> config = 1;
}

message SetEmaneModelConfigRequest {
    int32 session_id = 1;
    EmaneModelConfig emane_model_config = 2;
}

message SetEmaneModelConfigResponse {
    bool result = 1;
}

message GetEmaneModelConfigsRequest {
    int32 session_id = 1;
}

message GetEmaneModelConfigsResponse {
    message ModelConfig {
        int32 node_id = 1;
        string model = 2;
        int32 interface = 3;
        map<string, common.ConfigOption> config = 4;
    }
    repeated ModelConfig configs = 1;
}

message GetEmaneEventChannelRequest {
    int32 session_id = 1;
}

message GetEmaneEventChannelResponse {
    string group = 1;
    int32 port = 2;
    string device = 3;
}

message EmaneLinkRequest {
    int32 session_id = 1;
    int32 nem_one = 2;
    int32 nem_two = 3;
    bool linked = 4;
}

message EmaneLinkResponse {
    bool result = 1;
}

message EmaneModelConfig {
    int32 node_id = 1;
    int32 interface_id = 2;
    string model = 3;
    map<string, string> config = 4;
}
