GetPacket - PowerPoint PPT Presentation

1 / 3
About This Presentation
Title:

GetPacket

Description:

Meaning that if a command wants our task to do the work instead of spawning a ... commands may take a while to service and the ground station will have no way ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 4
Provided by: jk497
Category:

less

Transcript and Presenter's Notes

Title: GetPacket


1
Task flow chart
PacketReceived Queue
GetPacket
TimeDelayed Array
Send Acknowledge
Command Switch Statement
NextTime
ArrayIndex
OSTimeDelay
2
GetPacket Explained
  • Get packet checks received packet queue to see if
    there is a packet. If there is a packet it is
    pulled off the queue and an acknowledge packet is
    sent
  • Get packet then checks a NextTimeStamp variable
    to see if there is a packet in the TimeDelayed
    queue that needs serviced
  • If the timestamp in the time delayed queue is
    before a packet just received from the received
    queue, then the received packet is stuffed in the
    time delay queue. The packet that needed service
    in the time delay queue is then passed to the
    switch statement to be processed.
  • If there is no packet in the time delayed queue
    (the NextTimeStamp is set to null) or the
    received packets timestamp is before the one in
    the time delay queue then the received packet is
    passed to the switch statement to process
  • Get packet waits for the next packet to process
    in one of two ways
  • No packets in the time delay queue If there are
    no packets in the time delay queue then task
    pends on the received queue until a packet is
    received indefinitely
  • Packet in the time delay queue If there are
    packets in the time delay queue but they dont
    need serviced yet, then the task pends on the
    received queue for X amount of time. If no
    packet is received in that time, then get packet
    checks the time delay queue to see if there is a
    packet that needs service. (Note this time
    could be calculated for when the next packet in
    the time delay queue needs service so that the
    task doesnt run again until a packet needs
    serviced)

3
Questions about command parse
  • Are we getting send/receive functions from the
    packet send/receive team or are we working
    directly with the input queue?
  • On commands should we set a max time for
    completion? Meaning that if a command wants our
    task to do the work instead of spawning a new
    task, do we define a processing time limit?
  • Who parses the data? We are working on specifying
    format for commands but do we actually parse the
    data or pass each command a generic payload that
    they parse
  • I am leaning towards the latter that way if the
    parameters for a command change then only that
    commands code needs to change rather than that
    command and the code in the command parse
  • Should the acknowledge be sent before or after
    the command is actually serviced? I think it
    should be before because commands may take a
    while to service and the ground station will have
    no way of knowing if the packet was even received.
Write a Comment
User Comments (0)
About PowerShow.com