Package com.caen.RFIDLibrary
Class InventorySubCommand
- java.lang.Object
-
- com.caen.RFIDLibrary.InventorySubCommand
-
public class InventorySubCommand extends Object
This class represents the sub command that reader executes for any tag found in inventory cycle/s. The developer should use the static constructor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInventorySubCommand.SubCommandTypeThe kind of operation of subcommand.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static InventorySubCommandbuildNoneSubCommand()Build a no-op sub command.static InventorySubCommandbuildReadSubCommand(CAENRFIDTag.MemBanks memoryBank, int startAddress, int wordCount, int accessPassword)Build a read sub command.static InventorySubCommandbuildWriteSubCommand(CAENRFIDTag.MemBanks memoryBank, int startAddress, byte[] wordToWrite, int accessPassword)Build a write sub command.intgetAccessPassword()InventorySubCommand.SubCommandTypegetCommandType()CAENRFIDTag.MemBanksgetMemoryBank()shortgetMemoryBankStartAddress()shortgetWordsToRead()byte[]getWordToWrite()
-
-
-
Method Detail
-
buildReadSubCommand
public static InventorySubCommand buildReadSubCommand(CAENRFIDTag.MemBanks memoryBank, int startAddress, int wordCount, int accessPassword)
Build a read sub command.- Parameters:
memoryBank- The memory bank where perform the read operation.startAddress- The start address (word-oriented) of the bank where to read.wordCount- The number of word to read.accessPassword- The gen2 access password. Set 0 for no password.- Returns:
- An inventory read sub command to issue to the inventory methods.
-
buildWriteSubCommand
public static InventorySubCommand buildWriteSubCommand(CAENRFIDTag.MemBanks memoryBank, int startAddress, byte[] wordToWrite, int accessPassword)
Build a write sub command.- Parameters:
memoryBank- The memory bank where perform the write operation.startAddress- The start address (word-oriented) of the bank where to write.wordToWrite- The number of word to write.accessPassword- The gen2 access password. Set 0 for no password.- Returns:
- An inventory read sub command to issue to the inventory methods.
-
buildNoneSubCommand
public static InventorySubCommand buildNoneSubCommand()
Build a no-op sub command. User can pass it the inventory with sub command parameter, when no operation should be done. It's the default behaviour for inventory with no sub command parameter.- Returns:
- A no-op inventory sub command.
-
getCommandType
public InventorySubCommand.SubCommandType getCommandType()
-
getMemoryBank
public CAENRFIDTag.MemBanks getMemoryBank()
-
getMemoryBankStartAddress
public short getMemoryBankStartAddress()
-
getWordsToRead
public short getWordsToRead()
-
getWordToWrite
public byte[] getWordToWrite()
-
getAccessPassword
public int getAccessPassword()
-
-