Difference between revisions of "READERNAME ReaderModuleSuspendPowerState.java"
From RifidiWiki
(New page: This class needs to be implemented for each reader to handle the state transitions from off->on. It should extend AbstractSuspendedPowerState. =resume= This method should turn the reade...) |
|||
Line 1: | Line 1: | ||
+ | [[category:developerDoc]][[category:emulatorDoc]] | ||
This class needs to be implemented for each reader to handle the state transitions from off->on. It should extend AbstractSuspendedPowerState. | This class needs to be implemented for each reader to handle the state transitions from off->on. It should extend AbstractSuspendedPowerState. | ||
Revision as of 00:36, 12 February 2008
This class needs to be implemented for each reader to handle the state transitions from off->on. It should extend AbstractSuspendedPowerState.
resume
This method should turn the reader and all of its components back on after having been suspended
resume(PowerControllable pcObject)
Arguments
- pcObject - The ReaderModule
Reference Implementation
This is the implementation of the resume() method in the symbol reader. It first resumes the communications and the controllers. Then it changes the power state to the OnPowerSate using the changePowerState method. If the reader that you are implementing has an autonomous mode, you will need to resume the autonomous mode as well. See the LLRP reader for an example of that.
public void resume(PowerControllable pcObject) { SymbolReaderModule rm = (SymbolReaderModule) pcObject; rm.getByteComm().resume(); rm.getHttpComm().resume(); rm.getInteractiveBitController().resume(); rm.getInteractiveHttpController().resume(); SymbolReaderSharedResources ssr = rm.getSharedResources(); ssr.getTagMemory().resume(); rm.changePowerState(SymbolReaderModuleOnPowerState.getInstance()); String readername = rm.getSharedResources().getReaderName(); LogFactory.getLog("console." + readername).info(readername + " resumed"); }