Obj_GetFlag

SUMMARY

Tools Obj_GetFlag - Get flag from value or status

SYNTAX

Obj_GetFlag(pointid,attribute,bit mask);

ARGUMENTS

pointid
Name of the data object
attribute
Defines the attribute (Status / Value)
bit mask
Mask for the bit pattern

RETURN VALUE

0...max;
max = Highest possible value according to the bit mask.

DESCRIPTION

Queries bits of the status or value of a defined data object.
Note:
The data object masked must not be of the type ‘float’ !

EXAMPLES

Obj_GetFlag(OBJ_1,Value,40);

The value of data object ‘OBJ_1’ is checked against the mask 40 (bit 3 & 5).
For the return value the lowest mask-bit becomes bit 0, any other bits keep their relation to that bit.

Possible returned values for the above example are:
0 – neither bit 3 nor bit 5 of OBJ_1 is set
1 – bit 3 is set
4 – bit 5 is set
5 – bits 3 and 5 are set


Syntax Notation
[aaa]
aaa is optional (zero or one occurences)
(aaa|bbb)
aaa exclusive or bbb
(aaa)*
aaa may occur indefinitely often or may be omitted
(aaa)+
aaa may occur indefinitely often but at least once
(aaa)m..n
aaa may occur from m to n times