IDBLUE logo
Public Member Functions
IDBlueHfApi Class Reference
Inheritance diagram for IDBlueHfApi:
IDBlueCoreApi <IHfResponseHandler> ResponseHandler <ISessionHandler> <IResponseHandler> <IResponseHandler>

Public Member Functions

(SendStatus *) - getTagInfo:withHandler:
(SendStatus *) - getTagInfo:
(SendStatus *) - readBlock:withBlockIndex:withHandler:
(SendStatus *) - readBlock:withBlockIndex:
(SendStatus *) - readBlocks:withBlockIndex:withBlockCount:withHandler:
(SendStatus *) - readBlocks:withBlockIndex:withBlockCount:
(SendStatus *) - writeBlock:withBlockIndex:withBlockData:withHandler:
(SendStatus *) - writeBlock:withBlockIndex:withBlockData:
(SendStatus *) - writeBlocks:withBlockIndex:withBlockCount:withBlockData:withHandler:
(SendStatus *) - writeBlocks:withBlockIndex:withBlockCount:withBlockData:
(SendStatus *) - getBlockIndex:
(SendStatus *) - getBlockIndex
(SendStatus *) - getBlockCount:
(SendStatus *) - getBlockCount
(SendStatus *) - getBlockData:
(SendStatus *) - getBlockData
(SendStatus *) - setBlockIndex:withHandler:
(SendStatus *) - setBlockIndex:
(SendStatus *) - setBlockCount:withHandler:
(SendStatus *) - setBlockCount:
(SendStatus *) - setBlockData:withHandler:
(SendStatus *) - setBlockData:

Member Function Documentation

getBlockCount -

Sends a CI_GET_PROPERTY command to IDBLUE to get the Block Count property

Remarks:
Handlers registered with addResponseHandler will receive response notifications.

For example:

IDBlueCoreApi* api; -(void) getBlockCount { SendStatus status = nil; status = [api getBlockCount]; if ([status successful]) { } else { } }

-(void) getBlockCountResponse: (IDBlueCommand*) command withResponse: (BlockCountProperty*) response { byte count = [response blockCount]; }

-(void) getBlockCountFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful

getBlockCount -

Sends a CI_GET_PROPERTY command to IDBLUE to get the Block Count property

Parameters:
handlerAn object implementing IUhfResponseHandler that will receive response notifications.
Remarks:
The given IResponseHandler will be notified of responses, along with any handlers registered with the addResponseHandler method

For example:

IDBlueCoreApi* api; -(void) getBlockCount { SendStatus status = nil; status = [api getBlockCount: self]; if ([status successful]) { } else { } }

-(void) getBlockCountResponse: (IDBlueCommand*) command withResponse: (BlockCountProperty*) response { byte count = [response blockCount]; }

-(void) getBlockCountFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful

getBlockData -

Sends a CI_GET_PROPERTY command to IDBLUE to get the Block Data property

Remarks:
Handlers registered with addResponseHandler will receive response notifications.

For example:

IDBlueCoreApi* api; -(void) getBlockData { SendStatus status = nil; status = [api getBlockData]; if ([status successful]) { } else { } }

-(void) getBlockDataResponse: (IDBlueCommand*) command withResponse: (BlockDataProperty*) response { CByteArray* blockData = [response blockData]; }

-(void) getBlockDataFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful

getBlockData -

Sends a CI_GET_PROPERTY command to IDBLUE to get the Block Data property

Parameters:
handlerAn object implementing IUhfResponseHandler that will receive response notifications.
Remarks:
The given IResponseHandler will be notified of responses, along with any handlers registered with the addResponseHandler method

For example:

IDBlueCoreApi* api; -(void) getBlockData { SendStatus status = nil; status = [api getBlockData: self]; if ([status successful]) { } else { } }

-(void) getBlockDataResponse: (IDBlueCommand*) command withResponse: (BlockDataProperty*) response { CByteArray* blockData = [response blockData]; }

-(void) getBlockDataFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful

getBlockIndex -

Sends a CI_GET_PROPERTY command to IDBLUE to get the Block Index property

Remarks:
Handlers registered with addResponseHandler will receive response notifications.

For example:

IDBlueCoreApi* api; -(void) getBlockIndex { SendStatus status = nil; status = [api getBlockIndex]; if ([status successful]) { } else { } }

-(void) getBlockIndexResponse: (IDBlueCommand*) command withResponse: (BlockIndexProperty*) response { byte index = [response blockIndex]; }

-(void) getBlockIndexFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful

getBlockIndex -

Sends a CI_GET_PROPERTY command to IDBLUE to get the Block Index property

Parameters:
handlerAn object implementing IUhfResponseHandler that will receive response notifications.
Remarks:
The given IResponseHandler will be notified of responses, along with any handlers registered with the addResponseHandler method

For example:

IDBlueCoreApi* api; -(void) getBlockIndex { SendStatus status = nil; status = [api getBlockIndex: self]; if ([status successful]) { } else { } }

-(void) getBlockIndexResponse: (IDBlueCommand*) command withResponse: (BlockIndexProperty*) response { byte index = [response blockIndex]; }

-(void) getBlockIndexFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful
- (SendStatus *) getTagInfo: (RfidTag*)  tag

getTagInfo -

Sends a CI_GET_TAG_INFO command to IDBLUE

Parameters:
tagThe RfidTag of the RFID tag to get tag info for
Remarks:
Handlers registered with addResponseHandler will receive response notifications.

For example:

IDBlueHfApi* api; -(void) getStatus { SendStatus status = nil; RfidTag* tag = [[RfidTag alloc] initWithArrayLength: 8]; status = [api getTagInfo: tag]; if ([status successful]) { } else { } [tag release]; }

-(void) getTagInfoResponse: (IDBlueCommand*) command withResponse: (GetTagInfoResponse*) response { RfidTag* tag = [response rfidTag]; IDBlueTimestamp* ts = [response scanTime]; byte blockCount = [response blockCount]; byte blockSize = [response bytesPerBlock]; }

-(void) getTagInfoFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful
Remarks:
CI_GET_TAG_INFO is used to get information about the tag structure (tag id, block count, block size).
- (SendStatus *) getTagInfo: (RfidTag*)  tag
withHandler: (id<IHfResponseHandler>)  handler 

getTagInfo -

Sends a CI_GET_TAG_INFO command to IDBLUE

Parameters:
tagThe RfidTag of the RFID tag to get tag info for
handlerAn object implementing IUhfResponseHandler that will receive response notifications.
Remarks:
The given IResponseHandler will be notified of responses, along with any handlers registered with the addResponseHandler method

For example:

IDBlueHfApi* api; -(void) getStatus { SendStatus status = nil; RfidTag* tag = [[RfidTag alloc] initWithArrayLength: 8]; status = [api getTagInfo: tag withHandler: self]; if ([status successful]) { } else { } [tag release]; }

-(void) getTagInfoResponse: (IDBlueCommand*) command withResponse: (GetTagInfoResponse*) response { RfidTag* tag = [response rfidTag]; IDBlueTimestamp* ts = [response scanTime]; byte blockCount = [response blockCount]; byte blockSize = [response bytesPerBlock]; }

-(void) getTagInfoFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful
Remarks:
CI_GET_TAG_INFO is used to get information about the tag structure (tag id, block count, block size).
- (SendStatus *) readBlock: (RfidTag*)  tag
withBlockIndex: (byte)  blockIndex 

readBlock -

Sends a CI_READ_BLOCK command to IDBLUE

Parameters:
tagThe tag id of the tag to read the block from. Set to all zeros to read from any tag.
blockIndexthe index of the block to read from, between 0 and n-1 (where n is the number of blocks on the tag).
Remarks:
Handlers registered with addResponseHandler will receive response notifications.

For example:

IDBlueCoreApi* api; -(void) readBlock: (byte) blockIndex { SendStatus status = nil; RfidTag* tag = [[RfidTag alloc] initWithArrayLength: 8]; status = [api readBlock: tag withBlockIndex: blockIndex]; if ([status successful]) { } else { } [tag release]; }

-(void) readBlockResponse: (IDBlueCommand*) command withResponse: (ReadBlockResponse*) response { RfidTag* tag = [response rfidTag]; IDBlueTimestamp* ts = [response scanTime]; CByteArray* blockData = [response blockData]; byte blockIndex = [response blockIndex]; }

-(void) readBlockFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful
Remarks:
CI_READ_BLOCK is used to read a single block from user memory of an RFID tag.
- (SendStatus *) readBlock: (RfidTag*)  tag
withBlockIndex: (byte)  blockIndex
withHandler: (id<IHfResponseHandler>)  handler 

readBlock -

Sends a CI_READ_BLOCK command to IDBLUE

Parameters:
tagThe tag id of the tag to read the block from. Set to all zeros to read from any tag.
blockIndexthe index of the block to read from, between 0 and n-1 (where n is the number of blocks on the tag).
handlerAn object implementing IUhfResponseHandler that will receive response notifications.
Remarks:
The given IResponseHandler will be notified of responses, along with any handlers registered with the addResponseHandler method

For example:

IDBlueCoreApi* api; -(void) readBlock: (byte) blockIndex { SendStatus status = nil; RfidTag* tag = [[RfidTag alloc] initWithArrayLength: 8]; status = [api readBlock: tag withBlockIndex: blockIndex withHandler: self]; if ([status successful]) { } else { } [tag release]; }

-(void) readBlockResponse: (IDBlueCommand*) command withResponse: (ReadBlockResponse*) response { RfidTag* tag = [response rfidTag]; IDBlueTimestamp* ts = [response scanTime]; CByteArray* blockData = [response blockData]; byte blockIndex = [response blockIndex]; }

-(void) readBlockFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful
Remarks:
CI_READ_BLOCK is used to read a single block from user memory of an RFID tag.
- (SendStatus *) readBlocks: (RfidTag*)  tag
withBlockIndex: (byte)  blockIndex
withBlockCount: (byte)  blockCount
withHandler: (id<IHfResponseHandler>)  handler 

readBlocks -

Sends a CI_READ_BLOCKS command to IDBLUE

Parameters:
tagThe tag id of the tag to read the block from. Set to all zeros to read from any tag.
blockIndexthe start index of the block to read from, between 0 and n-1 (where n is the number of blocks on the tag).
blockCountthe number of blocks to read
handlerAn object implementing IUhfResponseHandler that will receive response notifications.
Remarks:
The given IResponseHandler will be notified of responses, along with any handlers registered with the addResponseHandler method

For example:

IDBlueCoreApi* api; -(void) readBlocks: (byte) blockIndex withBlockCount: (byte) blockCount { SendStatus status = nil; RfidTag* tag = [[RfidTag alloc] initWithArrayLength: 8]; status = [api readBlocks: tag withBlockIndex: blockIndex withBlockCount: blockCount]; if ([status successful]) { } else { } [tag release]; }

-(void) readBlocksResponse: (IDBlueCommand*) command withResponse: (ReadBlocksResponse*) response { RfidTag* tag = [response rfidTag]; IDBlueTimestamp* ts = [response scanTime]; CByteArray* blockData = [response blockData]; byte blockIndex = [response blockIndex]; byte blockCount = [response blockCount]; }

-(void) readBlocksFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful
Remarks:
CI_READ_BLOCKS is used to read multiple blocks of user memory from an RFID tag.
- (SendStatus *) setBlockCount: (byte)  blockCount

setBlockCount -

Sends a CI_SET_PROPERTY command to IDBLUE to set the Block Count property.

Parameters:
blockCount
Remarks:
Handlers registered with addResponseHandler will receive response notifications.

For example:

IDBlueCoreApi* api; -(void) setBlockCount: (byte) count { SendStatus status = nil; status = [api setBlockCount: count]; if ([status successful]) { } else { } }

-(void) setBlockCountResponse: (IDBlueCommand*) command withResponse: (IDBlueResponse*) response { } -(void) setBlockCountFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful
- (SendStatus *) setBlockCount: (byte)  blockCount
withHandler: (id<IHfResponseHandler>)  handler 

setBlockCount -

Sends a CI_SET_PROPERTY command to IDBLUE to set the Block Count property.

Parameters:
blockCount
handlerAn object implementing IUhfResponseHandler that will receive response notifications.
Remarks:
The given IResponseHandler will be notified of responses, along with any handlers registered with the addResponseHandler method

For example:

IDBlueCoreApi* api; -(void) setBlockCount: (byte) count { SendStatus status = nil; status = [api setBlockCount: count withHandler: self]; if ([status successful]) { } else { } }

-(void) setBlockCountResponse: (IDBlueCommand*) command withResponse: (IDBlueResponse*) response { } -(void) setBlockCountFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful
- (SendStatus *) setBlockData: (CByteArray*)  blockData

setBlockData -

Sets the Block Data property of an IDBLUE device.

Parameters:
blockDataThe block data that will be written to an RFID tag during an asynchronous write block operation, if the connected mode of IDBLUE is set to CM_WRITE_BLOCK.
Remarks:
Handlers registered with addResponseHandler will receive response notifications.

For example:

IDBlueCoreApi* api; -(void) setBlockData { SendStatus status = nil; CByteArray* blockData = [[CByteArray alloc] initWithArrayLength: 4]; status = [api setBlockData: blockData]; if ([status successful]) { } else { } [blockData release]; }

-(void) setBlockDataResponse: (IDBlueCommand*) command withResponse: (IDBlueResponse*) response { } -(void) setBlockDataFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful
- (SendStatus *) setBlockData: (CByteArray*)  blockData
withHandler: (id<IHfResponseHandler>)  handler 

setBlockData -

Sets the Block Data property of an IDBLUE device.

Parameters:
blockDataThe block data that will be written to an RFID tag during an asynchronous write block operation, if the connected mode of IDBLUE is set to CM_WRITE_BLOCK.
handlerAn object implementing IUhfResponseHandler that will receive response notifications.
Remarks:
The given IResponseHandler will be notified of responses, along with any handlers registered with the addResponseHandler method

For example:

IDBlueCoreApi* api; -(void) setBlockData { SendStatus status = nil; CByteArray* blockData = [[CByteArray alloc] initWithArrayLength: 4]; status = [api setBlockData: blockData withHandler: self]; if ([status successful]) { } else { } [blockData release]; }

-(void) setBlockDataResponse: (IDBlueCommand*) command withResponse: (IDBlueResponse*) response { } -(void) setBlockDataFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful
- (SendStatus *) setBlockIndex: (byte)  blockIndex

setBlockIndex -

Sends a CI_SET_PROPERTY command to IDBLUE to set the Block Index property.

Parameters:
blockIndex
Remarks:
Handlers registered with addResponseHandler will receive response notifications.

For example:

IDBlueCoreApi* api; -(void) setBlockIndex: (byte) index { SendStatus status = nil; status = [api setBlockIndex: index]; if ([status successful]) { } else { } }

-(void) setBlockIndexResponse: (IDBlueCommand*) command withResponse: (IDBlueResponse*) response { } -(void) setBlockIndexFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful
- (SendStatus *) setBlockIndex: (byte)  blockIndex
withHandler: (id<IHfResponseHandler>)  handler 

setBlockIndex -

Sends a CI_SET_PROPERTY command to IDBLUE to set the Block Index property.

Parameters:
blockIndex
handlerAn object implementing IUhfResponseHandler that will receive response notifications.
Remarks:
The given IResponseHandler will be notified of responses, along with any handlers registered with the addResponseHandler method

For example:

IDBlueCoreApi* api; -(void) setBlockIndex: (byte) index { SendStatus status = nil; status = [api setBlockIndex: index withHandler: self]; if ([status successful]) { } else { } }

-(void) setBlockIndexResponse: (IDBlueCommand*) command withResponse: (IDBlueResponse*) response { } -(void) setBlockIndexFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful
- (SendStatus *) writeBlock: (RfidTag*)  tag
withBlockIndex: (byte)  blockIndex
withBlockData: (CByteArray*)  block 

writeBlock -

Sends a CI_WRITE_BLOCK command to IDBLUE

Parameters:
tagThe RfidTag to write to
blockIndexThe block index to start writing at
blockThe block data to write to the tag
Remarks:
Handlers registered with addResponseHandler will receive response notifications.

For example:

IDBlueCoreApi* api; -(void) writeBlock: (byte) blockIndex { SendStatus status = nil; RfidTag* tag = [[RfidTag alloc] initWithArrayLength: 8]; CByteArray* blockData = [[CByteArray alloc] initWithArrayLength: 4]; status = [api writeBlock: tag withBlockIndex: blockIndex withBlockData: blockData]; if ([status successful]) { } else { } [tag release]; [blockData release]; }

-(void) writeBlockResponse: (IDBlueCommand*) command withResponse: (WriteBlockResponse*) response { RfidTag* tag = [response rfidTag]; IDBlueTimestamp* ts = [response scanTime]; byte blockIndex = [response blockIndex]; }

-(void) writeBlockFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful
- (SendStatus *) writeBlock: (RfidTag*)  tag
withBlockIndex: (byte)  blockIndex
withBlockData: (CByteArray*)  block
withHandler: (id<IHfResponseHandler>)  handler 

writeBlock -

Sends a CI_WRITE_BLOCK command to IDBLUE

Parameters:
tagThe RfidTag to write to
blockIndexThe block index to start writing at
blockThe block data to write to the tag
handlerAn object implementing IUhfResponseHandler that will receive response notifications.
Remarks:
The given IResponseHandler will be notified of responses, along with any handlers registered with the addResponseHandler method

For example:

IDBlueCoreApi* api; -(void) writeBlock: (byte) blockIndex { SendStatus status = nil; RfidTag* tag = [[RfidTag alloc] initWithArrayLength: 8]; CByteArray* blockData = [[CByteArray alloc] initWithArrayLength: 4]; status = [api writeBlock: tag withBlockIndex: blockIndex withBlockData: blockData withHandler: self]; if ([status successful]) { } else { } [tag release]; [blockData release]; }

-(void) writeBlockResponse: (IDBlueCommand*) command withResponse: (WriteBlockResponse*) response { RfidTag* tag = [response rfidTag]; IDBlueTimestamp* ts = [response scanTime]; byte blockIndex = [response blockIndex]; }

-(void) writeBlockFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful
- (SendStatus *) writeBlocks: (RfidTag*)  tag
withBlockIndex: (byte)  blockIndex
withBlockCount: (byte)  blockCount
withBlockData: (CByteArray*)  blocks 

writeBlocks -

Sends a CI_WRITE_BLOCKS command to IDBLUE

Parameters:
tagThe RfidTag to write to
blockIndexThe block index to start writing at
blockCountThe number of blocks to write
blocksThe block data to write to the tag
Remarks:
Handlers registered with addResponseHandler will receive response notifications.

For example:

IDBlueCoreApi* api; -(void) writeBlocks: (byte) blockIndex withBlockCount: (byte) blockCount{ SendStatus status = nil; RfidTag* tag = [[RfidTag alloc] initWithArrayLength: 8]; int bytesPerBlock = 4; int blockDataLen = bytesPerBlock * blockCount; CByteArray* blockData = [[CByteArray alloc] initWithArrayLength: blockDataLen]; status = [api writeBlocks: tag withBlockIndex: blockIndex withBlockCount: blockCount withBlockData: blockData]; if ([status successful]) { } else { } [tag release]; [blockData release]; }

-(void) writeBlocksResponse: (IDBlueCommand*) command withResponse: (WriteBlocksResponse*) response { RfidTag* tag = [response rfidTag]; IDBlueTimestamp* ts = [response scanTime]; byte blockIndex = [response blockIndex]; byte blockCount = [response blockCount]; }

-(void) writeBlocksFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful
- (SendStatus *) writeBlocks: (RfidTag*)  tag
withBlockIndex: (byte)  blockIndex
withBlockCount: (byte)  blockCount
withBlockData: (CByteArray*)  blocks
withHandler: (id<IHfResponseHandler>)  handler 

writeBlocks -

Sends a CI_WRITE_BLOCKS command to IDBLUE

Parameters:
tagThe RfidTag to write to
blockIndexThe block index to start writing at
blockCountThe number of blocks to write
blocksThe block data to write to the tag
handlerAn object implementing IUhfResponseHandler that will receive response notifications.
Remarks:
The given IResponseHandler will be notified of responses, along with any handlers registered with the addResponseHandler method

For example:

IDBlueCoreApi* api; -(void) writeBlocks: (byte) blockIndex withBlockCount: (byte) blockCount{ SendStatus status = nil; RfidTag* tag = [[RfidTag alloc] initWithArrayLength: 8]; int bytesPerBlock = 4; int blockDataLen = bytesPerBlock * blockCount; CByteArray* blockData = [[CByteArray alloc] initWithArrayLength: blockDataLen]; status = [api writeBlocks: tag withBlockIndex: blockIndex withBlockCount: blockCount withBlockData: blockData withHandler: self]; if ([status successful]) { } else { } [tag release]; [blockData release]; }

-(void) writeBlocksResponse: (IDBlueCommand*) command withResponse: (WriteBlocksResponse*) response { RfidTag* tag = [response rfidTag]; IDBlueTimestamp* ts = [response scanTime]; byte blockIndex = [response blockIndex]; byte blockCount = [response blockCount]; }

-(void) writeBlocksFailed: (IDBlueCommand*) command withResponse: (NackResponse*) response { }

Returns:
A SendStatus indicating if the send was successful

The documentation for this class was generated from the following files:

 

Generated on Mon Jan 19 2015 15:47:39
Copyright © 2015 Cathexis Innovations Inc. All Rights Reserved.