SysEventCreate
(FUN)
FUNCTION SysEventCreate : RTS_IEC_HANDLE
- <description>Create a new event object specified with name. Two components can open the same event, if they specify
the same name. <p>IMPLEMENTATION NOTE:</p> <ul>
<li>If a name is specified in szEvent, typically a system wide event is created.</li> <li>If an event still exists with this name, the routine returns the handle to the existing event</li> <li>szEvent can be NULL, so a new unique event with an empty name must be created</li> <li>If SysEventWait() is done after SysEventSet(), the event should signal the task!</li> <li>An event must not be used to signal several tasks!</li>
</ul> <p>TARGET SPECIFIC IMPLEMENTATION:</p> <ul>
- <li>CoDeSys Control RTE:
- If szEvent is specified, the event will work as a system wide Windows event. In this case, every call to SysEventSet/Wait will
call the corresponding Windows API-functions and this may last an unpredictable time!
- In case SysEventCreate is called with a NULL-pointer in szEvent, the event can be used to synchronize RTE-tasks only. The calls
to SysEventSet/Wait keep their real time capabilities.
</li>
</ul>
</description> <result><p>RESULT: Handle to the event or RTS_INVALID_HANDLE if failed.</p></result>
- InOut:
Scope
Name
Type
Comment
Return
SysEventCreate
RTS_IEC_HANDLE
Input
szEvent
STRING
<param name=”szEvent” type=”IN”>Name for the new event. Can be NULL!</param>
pResult
POINTER TO RTS_IEC_RESULT
<param name=”pResult” type=”OUT”>Pointer to runtime system error code (see CmpErrors.library)</param>