dpTypeGet()

Returns the structure of a data point type.

Synopsis

int dpTypeGet(string name, dyn_dyn_string &elements, dyn_dyn_int &types[, bool includeSubTypes = FALSE]);

Parameters

Parameter Meaning
dpt Name of the data point type , for example: ExampleDP_Int
&elements Type names
&types Type numbers
includeSubTypes

Default: FALSE - subtypes will note be passed

TRUE - subtypes will be passed

Return Value

If an error occurs -1, otherwise 0.

Errors

Missing arguments like undefined variables or missing parameters.

Description

The function returns the structure of a DP type.

Example

The example code returns the structure of a DP type DRIVE1. The data point type DRIVE1 is shown in the figure below and the structure is demonstrated in the table structure of the data point type DRIVE1.

Figure: Data point type DRIVE1

Structure of the data point type DRIVE1

DRIVE1
alert
controlFuse
motorSwitch
sumalertPLC
sumalert
state
on
ccOn
off
mode
remote
local
auto
man
service
value
speed
PowerCon
main()
{
  string dpt;
  dyn_dyn_string names;
  dyn_dyn_int types;
  int struc;
  dpt="ExampleDP_Int";
  struc=dpTypeGet(dpt,names,types);
  DebugN(dpt,names,types);
}

Assignment

Data point functions

Availability

UI, CTRL