../pvss.htm menu.gif basics.gif

isAnswer()

The function isAnswer() checks whether the workFunction() of a dpConnect() is called the first time after the connection was established via dpConnect().

The work function is called as follows:

 

dpConnect

without answer

dpConnect with answer

dpQueryConnectSingle/-All

without answer

dpQueryConnectSingle/-All with answer

First answer

No

Yes(1)

No

Yes

Hotlinks

Yes

Yes

Yes

Yes

System lost

No

Yes(3)

Yes(2)

Yes(2)

System connected

No

Yes(4)

Yes(5)

Yes(4)

Redundancy switch

No

Yes(4)

Yes(5)

Yes(4)

 

(1) isAnswer() returns TRUE (otherwise FALSE).

(2) getLastError() returns an errClass with getErrorCode() == 144 (system lost) and getErrorDpName() the system name. The dyn_dyn_anytype is empty.

(3) Only when the  _original.._invalid, _original.._bad, _original.._status,  _online.._invalid, _online.._bad, _online.._status are queried, the getLastError() returns an errClass with getErrorCode() == 144 and getErrorDpName() the system name. _invalid, _bad bits are TRUE , the invalid bits are set for _status, and  _stime is the current time. All other values are dummy values (0, FALSE ).
 

In all other cases the work function is not called.

(4) isRefresh() returns TRUE (otherwise FALSE ).

(5) getLastError() returns an errorClass with getErrorCode() == 157 and getErrorDpName() the system name.

 

When executing dpQueryConnectSingle()/-All with remote all (a dpQueryConnectSingle or dpQueryConnectAll to all systems), only the first answer that is returned (generally the answer from the own system) will be considered as an answer (first row). All other answers are considered as refresh (system comes or a redundancy switch). This means that the isAnswer() returns TRUE only the first time (and isRefresh() returns FALSE ). Afterwards, the isAnswer() returns FALSE (and isRefresh() TRUE ).

Synopsis

bool isAnswer();

Return value

Bool. TRUE(1) if the workFunction() of a dpConnect() is called the first time after the connection has been established with dpConnect() and FALSE if this is not the first time.

Errors

Description

The function isAnswer() checks whether the WorkFunction of a dpConnect() has been called for the first time.

Member of

Administration of managers.

Availability

CTRL

See also

isRefresh()

 

Top Of Page

 

V 3.11 SP1

Copyright ETM professional control GmbH 2013 All Rights Reserved