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
C++ dpGet Wait
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: C++ dpGet Wait
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"
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"