HP xw4400 Workstation User Manual
Page 105
Using Remote Graphics Software
97
Basic Application Control Agents
Basic Windows monitoring agents must have the ability to monitor the HPRemote
event log and interpret its events. When the number of primary user connections
drops to zero, an agent should execute its actions tied to applications of interest
running in the Desktop Session. Broader design issues for a control agent are
covered in the next section.
This section outlines a simple fixed-polling Windows agent that reads and interprets
a local HPRemote event log. The basic structure involves two simple core functions:
•
processEvent(eventServer, eventSource, dwEventNum)
o
open event log, read event dwEventNum, close event log
o
if valid read, process recognized EventIDs, then return
•
monitorEvents(eventServer, eventSource, seconds)
o
for a finite number of seconds (or infinite if seconds <= 0) do
o
open event log, read log length, close event log
o
if log has changed, processEvent(), else sleep for X mSec