Re: Design Problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Mon, 6 Feb 2006 12:34:41 +0100, "Ole Weigelt"
<o.weigelt@xxxxxxxxxxxxxx> wrote:

<snip>

My hunch is that there is a bunch of machines on the other end of the
COM Port, and that the 'instructions' contain a destination flag
- one machine is given a task
- while it is busy, he wants to send a task to another machine

If that is the case, then I think I can see a solution
- but ... more info would be helpful


We're coming closer.

What I have is a Building Management System (BMS) on the other side of the
COM-Port. The tasks are instructions to the BMS.

The tasks are i.e.: open a window, wait x seconds, close it again. So far
for the pause.

Now, while the window is open, i need to be able to switch some lights. That
is why the tasks need to be able to overlap.

During the whole thing, I need to listen for status messages and button
pushes that are reported through the same COM port.

Does that help?

It sure does

Do you know that you will want to run Task2 when you send the Task1
data ?

If so then you could 'merge' the tasks into one mega-task and just
send that

If not, then you have a situation where Task1 is running, probably
paused for hours, and you suddenly decide to run Task2

Does it matter if Task1 and Task2 get interleaved ?
eg:
Task1.Line1
Task1.Line2
Task2.Line1
Task1.Line3
Task2.Line2

If not you could set up a list of scheduled tasks with a time against
each line, simply add new tasks to the end of the list and have a
routine that picks the next Task Line regardless of which task it
belongs to.

eg: Task1.Line1 16:00
Task1.Line2 16:00
Task1.Line3 16:40 ' wait 40 mins
Task1.Line4 16:40 ' immediately after Line2
Task2.Line1 16:03 ' added at 16:03 so immediate
Task2.Line2 16:04 ' wait 1 min

Scanning the list, you could pick of the Task.Line with the next
'expired' wait time, send it and delete the line

It would give natural priority to earlier Tasks, but that should be no
problem.

Recording each line sent in a log file would also provide an
interesting audit of exactly what happened, and when.

This method would only work if the Task list did not wait for
feedback, eg: the Task is executed blindly

Do you have 'feedback' within the Task ?
eg: Send command Wait until some feedback then send another command

Or does the system just pump out commands on a timed basis ?



.



Relevant Pages

  • Re: Design Problem
    ... COM Port, and that the 'instructions' contain a destination flag ... Do you have 'feedback' within the Task? ... Send command Wait until some feedback then send another command ... how to set up such a scheduler. ...
    (microsoft.public.vb.general.discussion)
  • Re: Emails stuck in queue error 451 4.4.0 Primary target IP addres
    ... If you had just said "Siv you forgot to include the port number in the ... Telnet command" in your first response after asking me to carry out the ... I said earlier I am not familiar with telnet, I have probably used it twice ... Connecting To smtp.surfdsl.net...Could not open connection to the host, ...
    (microsoft.public.exchange.misc)
  • Re: Cant read a lonely (char)13 from serialport
    ... > 1) I writea command to the port ... >is sent back in response to the command that I sent. ... remote device might be accepting a command, ... and wait for an *appropriate* response before ...
    (comp.os.linux.development.system)
  • RE: ppp confusion
    ... tun0: Warning: papchap:: Invalid command ... acpi0: power button is handled as a fixed feature programming model. ... pcib0: port ...
    (freebsd-questions)
  • Re: A novice in compiler construction wants feedback
    ... The compiled instructions are loaded into an array of, ... int command; ... I've set up an array with function pointers matching the command values of ... of jumping out of the interpreter loop. ...
    (comp.compilers)