Suspend Functionality

From RifidiWiki

Revision as of 22:02, 3 December 2007 by Kyle (Talk | contribs)

Jump to: navigation, search

Alien Reader Suspend/Resume Tests

LLRP Reader Suspend/Resume

Required Changes

  • ROSpec needs to be able to be suspended & Resumed
  • AISpec needs to be abled to be suspened & Resumed
    • The loop in AISpec that does the work should be put to sleep and made to wake up
  • Triggers need to implement Suspend and Resume
    • Timers need to put to sleep and know how long they slept

Use Cases

These use cases describe several important scenarios that occur when LLRP Readers are suspended

Message processing functionality

Basic functionality of LLRP Suspend/Resume, when no autonomous mode is running

UseCase: Basic suspend/resume

  1. LLRP Reader started
  2. Reader is suspended
  3. Reader is resumed
  4. LLRP Message sent to reader
Outcome
LLRP Response message comes back from the reader as normal

Use Case: Suspend/Resume with a message

  1. LLRPReader started
  2. REader is suspended
  3. GET_READER_CONFIG message sent
  4. Reader is resumed
  5. GET_READER_CONFIG_RESPONSE message is receieved
Outcome
GET_READER_CONFIG message is not processed until after reader is resumed. Response is not recieved until after it is resumed

Use Case: Suspend/Resume with multiple messages

  1. LLRPReader is started
  2. Reader is suspended
  3. GET_READER_CONFIG message sent
  4. GET_READER_CAPABILITEIES message sent
  5. Reader is resumed
  6. GET_READER_CONFIG_RESPONSE message is received
  7. GET_READER_CAPABILITIES_RESPONSE message is received
Outcome
Two messages arn't processed until after reader is resumed. Both response messages come back and are in proper order

ROspec Functionality

How Suspend and Resume would interact with ROSpecs and execution of ROSpecs

Prerequisites
Two Tags on Reader

Use Case: Reader suspend during ROSpec execution

  1. LLRP Reader started
  2. ADD_ROSPEC message sent with a null start trigger and null stop trigger
  3. ENABLE_ROSPEC message sent
  4. START_ROSPEC message sent
  5. ROSpec Started
  6. LLRP Reader is suspended
  7. LLRP Reader is resumed
  8. STOP_ROSPEC Message sent
Outcome
Reader stoped polling and resumed polling when it was suspended and resumed

Use Case: Tag added while reader suspended

  1. LLRP Reader started
  2. ADD_ROSPEC message sent with a null start trigger and null stop trigger
  3. ENABLE_ROSPEC message sent
  4. START_ROSPEC message sent
  5. ROSpec Started
  6. LLRP Reader is suspended
  7. Tag Added and Removed
  8. LLRP Reader is resumed
  9. STOP_ROSPEC Message sent
Outcome
Reader stoped polling and resumed polling when it was suspended and resumed. The RO_ACCESS_REPORT does not contain the tag added in step 7.

Use Case: Reader suspended while executing Rospec with time-based stop triggger

  1. LLRP Reader started
  2. ADD_ROSPEC message sent with a null start trigger and time based stop trigger (10 seconds)
  3. ENABLE_ROSPEC message sent
  4. START_ROSPEC message sent
  5. ROSpec Started
  6. LLRP Reader is suspended
  7. wait 15 seconds
  8. LLRP Reader is resumed
Outcome
Reader stoped polling when it was suspended. The ROSpec should have only executed for 10 seconds. This means when the reader is resumed, the time trigger fires 15 seconds later than it would have if it had not been paused

Use Case: Reader Suspended while executing ROSpec with periodic start trigger

  1. LLRP Reader started
  2. ADD_ROSPEC message sent with a Periodic start trigger(offset: 0 seconds, period: 15 seconds) and time based stop trigger (10 seconds)
  3. ENABLE_ROSPEC message sent
  4. START_ROSPEC message sent
  5. ROSpec Started
  6. Wait 10 seconds for ROSpec to stop
  7. LLRP Reader is suspended
  8. wait 10 seconds
  9. LLRP Reader is resumed
Outcome
ROSpec started executing again approximatey 5 seconds (15 second peridon - 10 seconds exuecting ) after LLRP Reader is resumed, and not while the reader was suspended

Use Case: Reader suspended while executing Rospec with AISpec with time-based stop triggger

  1. LLRP Reader started
  2. ADD_ROSPEC message sent with a null start trigger, null stop trigger and AISpec with Time based stop trigger (10 second)
  3. ENABLE_ROSPEC message sent
  4. START_ROSPEC message sent
  5. ROSpec Started
  6. LLRP Reader is suspended
  7. wait 15 seconds
  8. LLRP Reader is resumed
Outcome
Reader stoped polling when it was suspended. The ROSpec should have only executed for 10 seconds. This means when the reader is resumed, the time trigger fires 15 seconds later than it would have if it had not been paused

GPIO Functionality

How Suspend and Resume affects GPIO scenarios

Personal tools