Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

...

Blok kódu
languageesl
themeConfluence
struct KomUniVal {
   unsigned short uvStatus;
   TLimitStatus   uvLimitStatus;
   unsigned int   uvProcAlarmStatus;
   TValueType     uvValType;
   unsigned short uvFlags;
   D2Time         uvValTime;
   D2Time         uvProcAlarmTime;
   TBVal          uvBoval;
   int            uvIntval;
   double         uvRealval;
   TStVal         uvStationval;
   D2Time         uvTmAval;
   double         uvTmRval;
   TQVal          uvQval;
   int64_t        uvIntval64;
   char          *uvTxtval;
 };

Structure KomUniVal transfers a value and status of the D2000 system object (I/O tag, station, line). The meaning of individual items of the structure:

...

The parameter marks limit states of I/O tag value. Implementation of a protocol sets up this parameter only in case of the value ST_SOURCE_LIMITS of the parameter Stat call-back of the function PointNewValue.

...

Blok kódu
languageesl
themeConfluence
typedef enum {VT_NAN, VT_Bo, VT_Int, VT_Re, VT_Di, VT_Do, VT_De, VT_Ai, VT_Ao, VT_Ae, VT_Ci, VT_Co, VT_Ce, VT_St, VT_Li, VT_Al, VT_Pr, VT_TmA, VT_TmR, VT_TiA, VT_ToA, VT_TiR, VT_ToR, VT_Txt, VT_Arr, VT_Qi, VT_Unused1, VT_TxtI, VT_TxtO, VT_Rec, VT_Ci64, VT_Co64} TValueType;

Object value type. The important types for communication:

  • VT_Ai - real input
  • VT_Ao - real output
  • VT_Ci - integer input (if the value fits into a 32-bit integer)
  • VT_Co - integer output (if the value fits into a 32-bit integer)
  • VT_Ci64 - integer input (if the value does not fit into a 32-bit integer)
  • VT_Co Co64 - integer output (if the value does not fit into a 32-bit integer)
  • VT_Di - digital input
  • VT_Do - digital output
  • VT_TiA - absolute time input
  • VT_ToA - absolute time output
  • VT_TiR - relative time input
  • VT_ToR - relative time output
  • VT_Qi - quaternary input
  • VT_TxtI - text input
  • VT_TxtO - text output

...

Implementation can optionally sets set up arbitrary combinations of 16 user flags ABCDEFGHIJKLMNOP of I/O value. Values of the flags are from VF_A up to VF_P.

uvValTime

Current time The timestamp of current value.

uvProcAlarmlTime

Current time The timestamp of the last change of process alarms flag. Do not change!

uvBoval

Current The current value of digital input or output Di and Do.

...

  • D_False - FALSE
  • D_True - TRUE
  • D_Oscillate - oscillating value – do not set, it is analyzed and set by the process D2000 KOM!

uvIntval

The current value of integer input or output Ci and Co. The value is set if uvValType is VT_Ci or VT_Co, i.e. if the integer input/output fits into a 32-bit integer.
Note: uvIntval

...

has been used for integer input or output Ci and Co values in the past when these types were defined as 32-bit Integer. After switching to 64-bit Integer, the D2000 KOM process sets uvValType to VT_Ci or VT_Co when the value fits in 32 bits, and as VT_Ci64 or VT_Co64 when it does not, for compatibility reasons.

uvIntval64

The current Current value of integer input or output Ci and Co. The value is always set for I/O tags of the Ci and Co type (regardless of whether the uvValType is VT_Ci/VT_Co or VT_Ci64/VT_Co64).
Note: this behavior makes it easier to work with protocols that support writing 64-bit integers - the value being written is always in uvIntval64 (and if it fits in 32 bits, it is also in uvIntval).

uvRealval

Current The current value of real input or output Ai and Ao.

...

Blok kódu
languageesl
themeConfluence
typedef enum {ST_ON, ST_OFF, ST_COMERR, ST_HARDERR, ST_SIMUL, ST_WAIT} TStVal;

uvTmAval

Current The current value of absolute time input and output TiA and ToA.

uvTmRval

Current The current value of relative time input an output TiR and ToR.

...

Pointer to a string of current value of text types TxtI a TxtO.

Note: The communication process allocates its own copies of text variables' values after calling the function PointNewValue.

...