syntax = "proto3";

import "SiLAFramework.proto";

package sila2.org.silastandard.test.listdatatypetest.v1;

/* Provides commands and properties to set or respectively get SiLA List Data Type values via command parameters or property responses respectively. */
service ListDataTypeTest {
  /* Receives a list of string values and returns a list containing the string values that have been received. */
  rpc EchoStringList (sila2.org.silastandard.test.listdatatypetest.v1.EchoStringList_Parameters) returns (sila2.org.silastandard.test.listdatatypetest.v1.EchoStringList_Responses) {}
  /* Receives a list of integer values and returns a list containing the integer values that have been received. */
  rpc EchoIntegerList (sila2.org.silastandard.test.listdatatypetest.v1.EchoIntegerList_Parameters) returns (sila2.org.silastandard.test.listdatatypetest.v1.EchoIntegerList_Responses) {}
  /* Receives a list of structure values and returns a list containing the structures that have been received. */
  rpc EchoStructureList (sila2.org.silastandard.test.listdatatypetest.v1.EchoStructureList_Parameters) returns (sila2.org.silastandard.test.listdatatypetest.v1.EchoStructureList_Responses) {}
  /* Returns an empty list of String type. */
  rpc Get_EmptyStringList (sila2.org.silastandard.test.listdatatypetest.v1.Get_EmptyStringList_Parameters) returns (sila2.org.silastandard.test.listdatatypetest.v1.Get_EmptyStringList_Responses) {}
  /* Returns a list with the following string values: 'SiLA 2', 'is', 'great'. */
  rpc Get_StringList (sila2.org.silastandard.test.listdatatypetest.v1.Get_StringList_Parameters) returns (sila2.org.silastandard.test.listdatatypetest.v1.Get_StringList_Responses) {}
  /* Returns a list with the following Integer values: 1, 2, 3. */
  rpc Get_IntegerList (sila2.org.silastandard.test.listdatatypetest.v1.Get_IntegerList_Parameters) returns (sila2.org.silastandard.test.listdatatypetest.v1.Get_IntegerList_Responses) {}
  /*
      Returns a list with 3 structure values, whereas the values of the first element are:
      string value = 'SiLA2_Test_String_Value_1'
      integer value = 5124
      real value = 3.1415926
      boolean value = true
      binary value (embedded string) = 'Binary_String_Value_1'
      date value = 05.08.2022 respective 08/05/2022
      time value = 12:34:56.789
      time stamp value = 2022-08-05 12:34:56.789
      any type value (string) = 'Any_Type_String_Value_1'

      For the second and third element:
      the last character of the strings changes to '2' respective '3'
      the numeric values are incremented by 1
      the boolean values becomes false for element 2 and true for element 3
      for the date value day, month and year are incremented by 1
      for the time value milliseconds, seconds, minutes and hours are incremented by 1
      for the time stamp value day, month, year, milliseconds, seconds, minutes and hours are incremented by 1.
     */
  rpc Get_StructureList (sila2.org.silastandard.test.listdatatypetest.v1.Get_StructureList_Parameters) returns (sila2.org.silastandard.test.listdatatypetest.v1.Get_StructureList_Responses) {}
}

/* An example Structure data type containing all SiLA basic types. */
message DataType_TestStructure {
  message TestStructure_Struct {
    sila2.org.silastandard.String StringTypeValue = 1;  /* A value of SiLA data type String. */
    sila2.org.silastandard.Integer IntegerTypeValue = 2;  /* A value of SiLA data type Integer. */
    sila2.org.silastandard.Real RealTypeValue = 3;  /* A value of SiLA data type Real. */
    sila2.org.silastandard.Boolean BooleanTypeValue = 4;  /* A value of SiLA data type Boolean. */
    sila2.org.silastandard.Binary BinaryTypeValue = 5;  /* A value of SiLA data type Binary. */
    sila2.org.silastandard.Date DateTypeValue = 6;  /* A value of SiLA data type Date. */
    sila2.org.silastandard.Time TimeTypeValue = 7;  /* A value of SiLA data type Time. */
    sila2.org.silastandard.Timestamp TimestampTypeValue = 8;  /* A value of SiLA data type Timestamp. */
    sila2.org.silastandard.Any AnyTypeValue = 9;  /* A value of SiLA data type Any. */
  }
  sila2.org.silastandard.test.listdatatypetest.v1.DataType_TestStructure.TestStructure_Struct TestStructure = 1;  /* An example Structure data type containing all SiLA basic types. */
}

/* Parameters for EchoStringList */
message EchoStringList_Parameters {
  repeated sila2.org.silastandard.String StringList = 1;  /* The list of string values to be returned. */
}

/* Responses of EchoStringList */
message EchoStringList_Responses {
  repeated sila2.org.silastandard.String ReceivedValues = 1;  /* A list containing the string values that have been received. */
}

/* Parameters for EchoIntegerList */
message EchoIntegerList_Parameters {
  repeated sila2.org.silastandard.Integer IntegerList = 1;  /* The list of integer values to be returned. */
}

/* Responses of EchoIntegerList */
message EchoIntegerList_Responses {
  repeated sila2.org.silastandard.Integer ReceivedValues = 1;  /* A list containing the integer values that have been received. */
}

/* Parameters for EchoStructureList */
message EchoStructureList_Parameters {
  repeated sila2.org.silastandard.test.listdatatypetest.v1.DataType_TestStructure StructureList = 1;  /* The list of structure values to be returned. */
}

/* Responses of EchoStructureList */
message EchoStructureList_Responses {
  repeated sila2.org.silastandard.test.listdatatypetest.v1.DataType_TestStructure ReceivedValues = 1;  /* A message containing the content of all structures that have been received. */
}

/* Parameters for EmptyStringList */
message Get_EmptyStringList_Parameters {
}

/* Responses of EmptyStringList */
message Get_EmptyStringList_Responses {
  repeated sila2.org.silastandard.String EmptyStringList = 1;  /* Returns an empty list of String type. */
}

/* Parameters for StringList */
message Get_StringList_Parameters {
}

/* Responses of StringList */
message Get_StringList_Responses {
  repeated sila2.org.silastandard.String StringList = 1;  /* Returns a list with the following string values: 'SiLA 2', 'is', 'great'. */
}

/* Parameters for IntegerList */
message Get_IntegerList_Parameters {
}

/* Responses of IntegerList */
message Get_IntegerList_Responses {
  repeated sila2.org.silastandard.Integer IntegerList = 1;  /* Returns a list with the following Integer values: 1, 2, 3. */
}

/* Parameters for StructureList */
message Get_StructureList_Parameters {
}

/* Responses of StructureList */
message Get_StructureList_Responses {
  repeated sila2.org.silastandard.test.listdatatypetest.v1.DataType_TestStructure StructureList = 1;  /* Returns a list with 3 structure values, whereas the values of the first element are: string value = 'SiLA2_Test_String_Value_1' integer value = 5124 real value = 3.1415926 boolean value = true binary value (embedded string) = 'Binary_String_Value_1' date value = 05.08.2022 respective 08/05/2022 time value = 12:34:56.789 time stamp value = 2022-08-05 12:34:56.789 any type value (string) = 'Any_Type_String_Value_1' For the second and third element: the last character of the strings changes to '2' respective '3' the numeric values are incremented by 1 the boolean values becomes false for element 2 and true for element 3 for the date value day, month and year are incremented by 1 for the time value milliseconds, seconds, minutes and hours are incremented by 1 for the time stamp value day, month, year, milliseconds, seconds, minutes and hours are incremented by 1. */
}
