MiniM Overview |
MiniM
Additional Tools | Dec 13, 2010 MiniM ZDLL Module for wakeup events This is an additional MiniM Database Server extension module for wakeup events. ZEVENT module adds events with manual reset in Microsoft Windows notation. Processes can create event objects with the same name and wait signal from any other process. Process who must signal this event, calls PULS function and all other process who was in wait state wakeups. One event can wait any number of processes. ZEVENT module holds internal data about events and processes must load module first and unload after use. While processes create, wait or pulse events, ZEVENT module must be in loaded state. Application interface is made as a special %ZEVENT routine. Entry points are: LOAD^%ZEVENT Subroutine loads external ZDLL module and hold loaded. This subroutine must be called once before any other functions. UNLOAD^%ZEVENT Subroutine unloads module and forgets all event objects have been created. After this subroutine no any event objects can be used without new module loaded and events created. $$CREATE^%ZEVENT(name) Function creates new event with this name or check this event already exists. Function return values are: 0 - Failed to create event object
Argument name specify event name and cannot contain nonprintable characters and backslash symbol "\" and must be less than 200 characters length. All processes to operate with the same event must use the same name, event names are case sensitive. $$DELETE^%ZEVENT(name) Function forgets this event and process cannot use this event later before create new event again. Return value always is 0 and function ignore exist event or not. If this event does not exist, function do nothing. $$WAIT^%ZEVENT(name,timeout="-1") Function goes process to wait state. Function return control in the following cases with return values: 0 - This event was not created by this process and function returns
immediately.
Argument timeout specify wait timeout in milliseconds (not in seconds!). If this argument have value of -1 or does not specified, function waits indefinite. Wait function does not react to common server events such as process freeze, server stop or halt signal from external process until return control. $$PULSE^%ZEVENT(name) Function send signal to other processes who are wait this event now and all this processes are wakeups. Function return values are: 0 - This event was not created by this process
ZEVENT module have standard installer and separate archive with source code. Module source code can be used to create derived modules, extend or change functions. Example how to use. First and second processes executes the following code: d LOAD^%ZEVENT s name="Hello, world" s ret=$$CREATE^%ZEVENT(name) w "CREATE = ",ret,! s ret=$$WAIT^%ZEVENT(name) w "WAIT = ",ret,! s ret=$$DELETE^%ZEVENT(name) w "DELETE = ",ret,! d UNLOAD^%ZEVENT This code loads module, creates one named event objects and goes process to wait state. Third process execute the following code: d LOAD^%ZEVENT s name="Hello, world" s ret=$$CREATE^%ZEVENT(name) w "CREATE = ",ret,! s ret=$$PULSE^%ZEVENT(name) w "PULSE = ",ret,! s ret=$$DELETE^%ZEVENT(name) w "DELETE = ",ret,! d UNLOAD^%ZEVENT This code loads module, creates one named event object and pulse this event. After pulse all other processes who wait this event wakeups and continue execution. Download setup-zevent.exe (for x86-32) (exe,
0.31Mb)
support@minimdb.com
To add module send text description and zip archive to mail: support@minimdb.com
|
|
Info Support |