getDynAnytype(), getDynBit32(), getDynBit64(), getDynBool(), getDynChar(), getDynFloat(), getDynInt(), getDynLong(), getDynString(), getDynTime(), getDynUInt(), getDynULong(), getDynATime()

The functions return the content of a dyn-dyn variable column.

Synopsis

dyn_anytype getDynAnytype(<dyn_dyn_type> array, int column);

dyn_bit32 getDynBit32(< dyn_dyn_type> array, int column);

dyn_bit64 getDynBit64(< dyn_dyn_type> array, int column);

dyn_bool getDynBool(<dyn_dyn_type> array, int column);

dyn_char getDynChar(<dyn_dyn_type> array, int column);

dyn_float getDynFloat(<dyn_dyn_type> array, int column);

dyn_int getDynInt(<dyn_dyn_type> array, int column);

dyn_long getDynLong(<dyn_dyn_type> array, int column);

dyn_string getDynString(<dyn_dyn_type> array, int column);

dyn_time getDynTime(<dyn_dyn_type> array, int column);

dyn_uint getDynUInt(<dyn_dyn_type> array, int column);

dyn_ulong getDynULong(< dyn_dyn_type> array, int column);

dyn_atime getDynATime(< dyn_dyn_type> array, int column);

Parameters

Parameters Meaning
array Dynamic field (matrix)
colum Number of the matrix column

Return value

The content of a dyn-dyn variable column.

Description

The functions return the content of a dyn-dyn variable column.

Example

The example shows the getDynATime function.

main()
{
 dyn_atime dad1, dad2;
 atime tat1, tat2, tat3, tat4;
 dyn_atime dat1, dat2;
 dyn_dyn_atime resDat;
 tat1 = makeATime(getCurrentTime(), 0,"System1:_2x2Redu.state.dbConn");
 tat2 = makeATime(getCurrentTime(), 1,"System1:_Conn_event_0_1_to_ctrl_1_1.Link1");
 tat3 = makeATime(getCurrentTime(), 2,"System1:_2x2Redu.alarm.distConnection");
 tat4 = makeATime(getCurrentTime(), 3,"System1:_2x2Redu.alarm.paraSyncAlarm");
 dad1 = makeDynATime(tat1, tat2);
 resDat[1] = dad1;
 dad2 = makeDynATime(tat3, tat4);
 resDat[2] = dad2;
 dat1 = getDynATime(resDat, 1);
 //Returns:
 //System1:_2x2Redu.state.dbConn (Type: 188 Sys: 1 Dp: 403 El: 10 : 0..0)
 //System1:_2x2Redu.alarm.distConnection (Type: 188 Sys: 1 Dp: 403 El: 71 : 0..0)
 dat2 = getDynATime(resDat, 2);
 //Returns:
 //System1:_Conn_event_0_1_to_ctrl_1_1.Link1 (Type: 116 Sys: 1 Dp: 281 El: 3 : 0..0)
 //System1:_2x2Redu.alarm.paraSyncAlarm (Type: 188 Sys: 1 Dp: 403 El: 68 : 0..0)
 DebugN(dat1);
 DebugN(dat2);

Example

The second example shows the getDynBool function:

main(mapping event)
{
  dyn_bool d,d2, e;
  dyn_dyn_bool dat;
  d=makeDynBool(true,false,false);
  d2=makeDynBool(true,true,true);
  dat[1] =d;
  dat[2] =d2;
  for (int i =1;i <=3; i++)
  {
    e =getDynBool(dat,i);
    DebugN("retVal:", e);
  }
}

Since the other functions described under Synopsis have the same syntax as the getDynBool- and getDynATime functions, no examples are shown for these functions.

Assignment

Dynamic Arrays

Availability

CTRL