READERNAME ReaderSharedResources.java

From RifidiWiki

Jump to: navigation, search

The SharedResources act as common repository for various objects used in various places in the code. Each reader should have a shared resources and it should extend AbstractReaderSharedResources.

All of the methods in the shared resources are just getters and setters for the components that are held in it. The only method that this page will cover is the constructor.

Constructor

The constructor for the shared resources should be called in the reader module. The constructor for the shared resources must take in the following things:

  1. GenericRadio radio
  2. TagMemory tagMemory
  3. ControlSignal<Boolean> readerPowerSignal
  4. String readerName
  5. GenericExceptionHandler geh
  6. CommandDigester digester
  7. int numberOfAntennas

The first thing that the constructor should do is make a call to its super class:

		super(radio, tagMemory, readerPowerSignal, readerName, geh digester, numberOfAntennas);

Then it should set the rest of the variables that are required by the reader to be in the shared resources. If more than one class or part of the reader needs the same object or information then it should be placed inside the shared resources. For more information see the sharedResources in one of the other readers.

Personal tools