triggerEvent()
The function triggers a specific event.
Synopsis
int triggerEvent(string|function_ptr event, ...);
Parameters
Parameter | Description |
---|---|
event | Name of the event or function_ptr to the event that is triggered. |
... | Arguments that are expected by the event. |
Return value
In case of an undefined or unavailable event an exception is thrown and the script is not executed further.
Errors
Missing or incorrect arguments.
Description
The function triggerEvent() allows to trigger a specific event inside of your code. This can either be a custom event created by using the Object Oriented Panel References or any event predefined by WinCC OA.
Example
In the example below the event "buttonClicked" is called. This event must be defined somewhere inside of your code. For more information see Object Oriented Panel References
main()
{
triggerEvent(„buttonClicked“);
}
Assignment
OOP
Availability
CTRL