dpTypeGet()

Returns the structure of a datapoint type.

Synopsis

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

Parameters

Parameter Meaning
dpt Name of the datapoint 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.

exampleExample

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

Figure: Datapoint type DRIVE1

dpt drive1

Structure of the datapoint 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

Datapoint functions

Availability

UI, CTRL