Re: wait for replay



Thanks guys
Using queues might be the simplest solution. First in - First out kind
of queue.
I'm using a simple component called CPort (SourceForge project). It
does what I need. (I've also looked at the Async Pro components).
Luckily, my instrument sends back chr(13) at the end of each
responses, so I gather up each snippets in a global variable before
sending it to parsing. Then I empty the global var ready for next
response.

You triggered my mind to come with a new solution. Wich might be
simple but efficient is to create only one command queue keeping track
of how many commands have been issued. First I put as many commands
in the command queue as there would be loops. When the response
arrives, the parsing is completed. At the end of the parsing function
I then checks the queue and if there are commands left, I send it off
to the instrument. That way the instrument is the controlling factor,
since the serial component really is responsible for trigging another
command. If I get en error message from the instrument, the command
queue is emptied. The computer will then follow the instruments pace.
What do you think? See any pitfalls in this scenario?

Roger
.



Relevant Pages

  • Re: she wants to assist embarrassed invitations within Waleeds park
    ... when Afif roars the horrible ... instrument as to the queue? ... Talal the kid's controlled, in response to me it's noble, whereas ...
    (sci.crypt)
  • [PATCH] scsi: Scsi_Cmnd convertion in arm subtree
    ... Purpose: complete processing for command ... Params: ... queue a command for adapter to process. ...
    (Linux-Kernel)
  • Re: [PATCH 2/4] libata: Implement disk shock protection support
    ... with stopping the request queue anyway, ... Just to be sure, are you just referring to the queue lock, or to the host ... device internal power management will be disabled until the next command ... I'd have to protect the deadline field in struct ata_port by the ...
    (Linux-Kernel)
  • RE: Problems Printing After XP Upgrade from 98SE
    ... Can you print any local print jobs correctly in the system which ... Does the issue occur on only one Windows XP client or all other Windows ... | all of the jobs from the queue and print a test page from XP, ... |> Use the net.exe command to establish a persistent connection. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: send files to printer c windows api
    ... the command, while the document is queued up. ... Do you get the "30 second freeze" if you print using Open Office the ... it seems NOT to queue up multiple ...
    (comp.programming)