Communications Delay Design

VxWorks

    Sponsored Links

    Next

  • 1. Trace log support in Tornado IDE
    The GreenHills Multi IDE provides an option to log the history (i.e., trace log) of all assembly instructions that are executed on a target. Is there any such option available in Tornado IDE?
  • 2. VxWorks and Mathworks Real Time Workshop
    I have generated executable file model.lo for the VxWorks target platform using Mathworks real time workshop. After manually downloading model.lo on target maschine I tried to run it with command sysload "model.lo". But, I got the following error: errno = 0x610001 : S_loadElfLib_HDR_READ File not found Does anybody know what the problem can be? What am I doing wrong? Thank you!
  • 3. Interrupts in VxWorks SMP
    Hello, I am trying to understand how interrupts get handled in VxWorks SMP. I am using Vxworks-6.8. I know interrupts are routed to CPU-0 by default. Does that mean the ISR will have to execute in the same core? Thanks, Shru
  • 4. Raw socket creation with Ethertype
    Hi All, I would like to create a raw socket in VxWorks which accepts the packets with a particular Ethertype. I could not find any socket options for this. Is there any ioctl available to accomplish this? Thanks, Aneesha

Communications Delay Design

Postby JavierLeonEng » Sun, 19 Sep 2004 03:52:57 GMT

I wanted to see how others have approached the following design under
VxWorks.  I am coming up with a design to implement a communications
delay.  The design is suppose to delay messages that are received
sequentially through a socket interface before sending them out on
another socket interface. The delay is variable depending upon an
algorithm that we have.  There is a requirement that messages be
sequential always. My first idea is to use a single task and multiple
watchdog timers. The task receives the messages from a socket, stores
it in a dynamically allocated buffer, calculates the required delay,
and then kicks-off a watchdog timer with the calculated delay.  The
function that will execute when the watchdog expires will be passed a
pointer to the message as a parameter. This function will send the
message on the outgoing socket interface. Has anybody used this design
before?  What are the drawbacks?  Any other ways to design this?

NOTE:. In order to keep the messages sequential the calculated delay
of a message will have to be equal to or greater than the previous
message arrival time and calculated delay.


Any help is appreciated.
Thank You,

 XXXX@XXXXX.COM 

Re: Communications Delay Design

Postby David Lindauer » Sun, 19 Sep 2004 12:40:10 GMT

um,

what about a single task that just reads an incoming message into a local
buffer (probably pending on the read from your description), then does the
equivalent of taskDelay, then sends the message back out and loops back to
read another message?  Might work, unless you are going to overload the
low level socket buffers... but if you are going to do that your approach
is possibly going to run out of memory as well depending on how long a
burst of messages is.

David






Re: Communications Delay Design

Postby s_subbarayan » Tue, 21 Sep 2004 13:33:00 GMT

Hi,
I would second Davids way of designing.Jus I would use task delay with
ticks being variable as per your algorithm,make my message to pass
this ticks to the task delay api and make it delay and mean while go
and read next message and so on.If you would like to use watchdog,the
main drawback i feel is that watchdog routines execute in ISR context
level priority and this may or may not be desirable to your
application depending on the constraints you might have set.Also using
taskdelay might require lesser resources  to make your design then
moving for a watchdog timer.So from resource perspective also
taskdelay is best.
Hope this helps.
Regards,
s.subbarayan




Re: Communications Delay Design

Postby JavierLeonEng » Wed, 22 Sep 2004 05:04:52 GMT

I see the resource issue, but since the next message will not be
received by the single task until the current message has been sent
out.  The message could have arrived right after the current message
was received, but the program would not know it, and thus the program
cannot calculate correctly as to when to send the next message.

Javier Leon





Re: Communications Delay Design

Postby s_subbarayan » Wed, 22 Sep 2004 13:26:02 GMT

i javier,
The case being that you are unaware when the message has arrived
for the current task,makes me think of another solution:
Jus why not make it raise a signal to your task which is pending for
that message?
Make your task to delay after you recieve a message.When next message
comes make the message to raise a signal to your task and in the
signal routine you can pass the message to receiving socket.
The other solution will be like to make the task posting the message
(or may be your socket which is sending) to give a semaphore for
reciever and make the reciever task to pend for the semaphore and make
it awake when the sender sends a message.
The above two solutions are used based on your preference.The first
solution will be like a software interrupt so you should be very
careful regarding timing issues,while the second design might require
proper synchronisation between sender and reciever tasks.
I have used second approach for one of our previous projects and it
was working fine though it was not for a hard real time application(my
application is for a consumer electronics device).
Hope this helps.
Regards,
s.subbarayan

XXXX@XXXXX.COM (Javier Leon) wrote in message news:< XXXX@XXXXX.COM >...


Return to VxWorks

 

Who is online

Users browsing this forum: No registered users and 16 guest