dpAttributeType()

Returns the data type.

Synopsis

int dpAttributeType( string dp );

Parameters

Parameter Meaning
dp Data point attribute

Return Value

In the event of error -1, otherwise integer value of the type

Errors

The function getLastError() returns the code of any errors that have occurred. A message is issued in the event of missing arguments.

Description

The function dpAttributeType() returns the data type of a data point attribute. There are Control constants available for this. In the event of failure, dpAttributeType() returns -1.

Example

Condition as a function of the data type of the data point attribute Valve17.opening_original.._value.

main()
{
  if(dpAttributeType("valve17.opening:_original.._value")==FLOAT_VAR)
  if(dpAttributeType("valve17.opening:_original.._value")==INT_VAR)
}

Assignment

Data point function

Availability

CTRL

See also

Reference tables (data types)

dpElementType(), dpTypeName()