/* ========================= eCAL LICENSE =================================
 *
 * Copyright (C) 2016 - 2019 Continental Corporation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * ========================= eCAL LICENSE =================================
*/

syntax = "proto3";

package eCAL.pb;

message LayerParUdpMC
{
}

message LayerParShm
{
  repeated string  memory_file_list   =   1;    // list of memory file names
}

message LayerParInproc
{
}

message LayerParTcp
{
  int32            port               =   1;    // tcp writers port number
}

message ConnnectionPar                          // connection parameter for reader / writer
{
  LayerParUdpMC    layer_par_udpmc    =   1;    // parameter for ecal udp multicast
  LayerParShm      layer_par_shm      =   2;    // parameter for ecal shared memory
  LayerParInproc   layer_par_inproc   =   3;    // parameter for ecal inner process
  LayerParTcp      layer_par_tcp      =   4;    // parameter for ecal tcp
}

enum eTLayerType                                // transport layer
{
  tl_none                             =   0;    // undefined
  tl_ecal_udp_mc                      =   1;    // ecal udp multicast
                                                // 2 = ecal udp unicast (not supported anymore)
                                                // 3 = ecal udp metal (not supported anymore)
  tl_ecal_shm                         =   4;    // ecal shared memory
  tl_ecal_tcp                         =   5;    // ecal tcp
  tl_inproc                           =  42;    // inproc (inner process)
  tl_all                              = 255;    // all layer
}

message TLayer
{
  eTLayerType      type               =   1;    // transport layer type
  int32            version            =   2;    // transport layer version
  bool             confirmed          =   3;    // transport layer used ?

  // ----------------------------------------------------------------------
  // REMOVE ME IN ECAL6
  // ----------------------------------------------------------------------
  bytes            par_shm            =   4;    // transport layer parameter (shm only, deprecated)
  // ----------------------------------------------------------------------
  // REMOVE ME IN ECAL6
  // ----------------------------------------------------------------------

  ConnnectionPar   par_layer          =   5;    // transport layer parameter
}
