C++ dpGet Wait

Find and share HowTos to various installations / configurations!
2 posts • Page 1 of 1
a_scratch
Posts:12
Joined: Thu Feb 09, 2012 3:40 pm

C++ dpGet Wait

Post by a_scratch »

Hi,
We want to add columns and values in the AES panel. So we use general config elements and a C++ API.
The C++ DpGet function is always asynch. Is it a way to make it synchronous ?
What is the event you have to wait for to be sure that you get the value. I think that is exactly how the "script" dpGet work...Is it possible to get an example ?
Best regards

fmulder
Posts:330
Joined: Wed Feb 03, 2010 9:46 am

Re: C++ dpGet Wait

Post by fmulder »

No, there is no way to make a dpget() synchronous. The scripting looks synchronous but actually, all it does is 'freeze' the script interpreter and wait for the value to be received.

Your C++ dpGet() uses a 'WaitForAnswer' object (the scripting does eactly the same).

In general, it is a bad idea to do any 'waiting' functions in the AES DLL. This would affect the performance of the alarm screen. What you 'normally' do is:

* Combine any fields from an alarm (as shown in the example in the help file)
* Add comments to an alarm and use your dll to 'parse'/interpret and display them
* Use the extra columns that an alarm has
* Get information from a catalogue

I've previously used a DLL to add additional columns to the alarm screen. We just implement a function 'getColumn1()' to 'getColumn4()'. We used the dp element name as a key and obtained the column text from a catalogue file. (This even makes it multi language)

You see, there are plenty of non-waiting options

Frenk
"Share the fun"

2 posts • Page 1 of 1