// ------------------------------------------------------------------
// Common definition of types used by several APIs
// ------------------------------------------------------------------
//

syntax = "proto3";

package siemens.common.types.v1;

//===================================================================
// List of all supported datatypes of the Connectivity Suite
//===================================================================

enum DataType {
  // 'undef' might be used as initial value. This is no valid data type
  DT_UNDEF    =  0;

  // Single bit (0 = false; 1 = true)
  DT_BOOL     =  2;

  // 8 bit unsigned integer (UInt8)
  DT_UINT8    =  3; 

  // 8 bit signed integer (Int8)
  DT_INT8     =  4;

  // 16 bit unsigned integer (UInt16)
  DT_UINT16   =  5;

  // 16 bit signed integer (Int16)
  DT_INT16    =  6;

  // 32 bit unsigned integer (UInt32)
  DT_UINT32   =  7;

  // 32 bit signed integer (Int32)
  DT_INT32    =  8;

  // 64 bit unsigned integer (UInt64)
  DT_UINT64   =  9;

  // 64 bit signed integer (Int64)
  DT_INT64    = 10;

  // 32 bit with a range of values as defined in IEC 60559 
  // For the basic single width floating-point format [IEC-61131-3]
  // or IEEE-754 single precision 32 bit floating point.
  DT_FLOAT32  = 11;

  // 64 bit with a range of values as defined in IEC 60559 
  // For the basic double width floating-point format [IEC-61131-3]
  // or IEEE-754 double precision 64 bit floating point.
  DT_FLOAT64  = 12;

  // 64 bit signed integer which represents a duration 
  // in 100 nano-second [0.1 microsec] intervals.
  // I.e. used for IEC 61131 data types (L)TIME and (L)TIME_OF_DAY
  DT_TIMESPAN = 13; 

  // 64 bit unsigned integer which represents the number 
  // of 100 nano-second [0.1 microsec] intervals since January 1, 1601 (UTC). 
  // The range and resolution corresponds the OPC UA binary data type 'DateTime' as defined in part 6.
  // (Windows FILETIME follows this definition as well)
  // I.e. used for IEC 61131 data types (L)DATE and (L)DATE_AND_TIME.
  DT_TIMESTAMP= 14;

  // Variable-length bit string, byte aligned.
  DT_RAW      = 16;

  // Variable-length character string, UTF-8 [RFC-3629] encoding of ISO-10646. 
  // The maximum string length is either system defined (product and/or HMI device specific), 
  // or configured in the Engineering System for HmiTags of data type String.
  DT_STRING   = 17; 
}