algometrica / larytet-master

Automatically exported from code.google.com/p/larytet-master
0 stars 0 forks source link

Line is up/idle indication #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
For example, application can produce a short beep (by printing ASCII symbol
7) every 3-5s if there was an activity in any of the data streams over that
period. 
The state machine is fairly simple:
A mailbox thread which gets a notification from the data collectors every
time there is a new event. Thread counts the events. Thread starts timer
and when timer expires beeps if the counter is non-zero. Thread zero the
counter when timer expires.

Original issue reported on code.google.com by larytet@gmail.com on 14 Oct 2009 at 12:12

GoogleCodeExporter commented 9 years ago
In a different approach the system can produce beep every time the timer 
expires and
events counter is zero.

Method Console.Beep(int frequency, in duration) does the beeping

Original comment by larytet@gmail.com on 14 Oct 2009 at 12:16

GoogleCodeExporter commented 9 years ago
Hearing the beeps all the time is annoying. I'd prefer to get sound 
notification when
the line is down (and also some indication output printed to the console).

Original comment by jerusale...@gmail.com on 14 Oct 2009 at 12:29

GoogleCodeExporter commented 9 years ago
I would add a sink to all created data collector which is an FSM described 
above.
Also we can create a thread which actively polls the server (similar to the
AS400TimeTest command in the CLI). If the test fails two times in row thread
generates a beep.

Original comment by larytet@gmail.com on 14 Oct 2009 at 12:35

GoogleCodeExporter commented 9 years ago
We can also create a system level watchdog task. Different parts of the system 
can
add an event and make watchdog to beep if an event is not being generated for 
some
specified period of time. 

API of the watchdog

int RegisterEvent(int maxTimeout) - returns event to be send to the Notify
void Start(int Event) - enables the event. Watchdog starts timer and waits for 
the event.
void Send(int Event) - send and event. Watchdog restarts the timer

Original comment by larytet@gmail.com on 14 Oct 2009 at 12:40

GoogleCodeExporter commented 9 years ago
Ok, so the second approach is the preferable one (if the machine operator 
doesn't
want to end the day with serious headache )). The active polling AS400 should 
send
its output to a written log (ASCII or csv).

Original comment by jerusale...@gmail.com on 14 Oct 2009 at 12:41