Suspend Functionality

From RifidiWiki

Jump to: navigation, search

Alien Reader Suspend/Resume Tests

Required Changes

  • Autonomous Mode

Use Cases

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: 5 seconds, period: 10 seconds) and time based stop trigger (5 seconds)
  3. ENABLE_ROSPEC message sent
  4. Suspend LLRP Reader. wait 10 seconds. Resume LLRP Reader. Make sure ROSpec starts after 5 seconds
  5. ROSpec Started
  6. Wait 5 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

Use Case: Changes to GPI when reader is suspended do not trigger event reports

  1. LLRP Reader with 2 GPI lines started
  2. SET_READER_CONFIG Message sent that enable event reports from GPI Changes
  3. LLRP Reader is suspended
  4. GPI line one changes
  5. LLRP Reader is resumed
Outcome
No GPI event is reported

Use Case: Changes to GPI when reader is suspended do not trigger ROSpecs to start executing

  1. LLRP Reader with 2 GPI lines started
  2. SET_READER_CONFIG Message sent that enable event reports from GPI Changes
  3. Send ADD_ROSPEC Message with ROSpec where start trigger is GPI, and stop trigger is null
  4. Send ENABLE_ROSPEC Message
  5. LLRP Reader is suspended
  6. GPI line one changes
  7. LLRP Reader is resumed
Outcome
No ROSPec begins execution
Personal tools