AsReaderRFIDDeviceDelegate¶
⚠️ Note:
These delegate methods are only called back when the AsReader device is properly connected and the corresponding method has been invoked.
If the model is not supported or not connected, callbacks will not occur.
pcEpcReceived¶
Receives tag data.
Returns the result via callback after executing startScan.
- (void)pcEpcReceived:(NSData *)pcEpc;
Parameters¶
Name |
Type |
Description |
|
NSData |
Received PC and EPC data (binary format) |
Sample Code¶
- (void)pcEpcReceived:(NSData *)pcEpc{
// Process received PC+EPC data
}
pcEpcRssiReceived¶
Receives tag data with RSSI.
Returns the result via callback after executing startReadTagsAndRssiWithTagNum.
- (void)pcEpcRssiReceived:(NSData *)pcEpc rssi:(int)rssi;
Parameters¶
Name |
Type |
Description |
|---|---|---|
|
NSData |
Received PC and EPC data (binary format) |
|
int |
RSSI (Received Signal Strength Indicator from the RFID tag, unit: dBm) |
Sample Code¶
- (void)pcEpcRssiReceived:(NSData *)pcEpc rssi:(int)rssi{
// pcEpc: PC+EPC data
// rssi: RSSI data
}
didSetOutputPowerLevel¶
Returns the result via callback after executing setOutputPowerLevel.
- (void)didSetOutputPowerLevel:(int)status;
Parameters¶
Name |
Type |
Description |
|
int |
Output power setting result |
Sample Code¶
- (void)didSetOutputPowerLevel:(int)status{
// status 0: success, non-zero: failure
}
didSetChannelParamReceived¶
Returns the result via callback after executing setChannel.
- (void)didSetChannelParamReceived:(int)statusCode;
Parameters¶
Name |
Type |
Description |
|
int |
Channel parameter setting result |
Sample Code¶
- (void)didSetChannelParamReceived:(int)statusCode{
// statusCode 0: success, non-zero: failure
}
didSetAntiCollision¶
Returns the result via callback after executing setAnticollision.
- (void)didSetAntiCollision:(int)status;
Parameters¶
Name |
Type |
Description |
|
int |
Anti-collision setting result |
Sample Code¶
- (void)didSetAntiCollision:(int)status{
// status 0: success, non-zero: failure
}
didSetSession¶
Returns the result via callback after executing setSession.
- (void)didSetSession:(int)status;
Parameters¶
Name |
Type |
Description |
|
int |
Session setting result |
Sample Code¶
- (void)didSetSession:(int)status{
// status 0: success, non-zero: failure
}
channelReceived¶
Returns the result via callback after executing getChannel.
- (void)channelReceived:(int)channel channelOffset:(int)channelOffset;
Parameters¶
Name |
Type |
Description |
|
int |
RFID module’s channel |
|
int |
RFID module’s channel offset |
Sample Code¶
- (void)channelReceived:(int)channel channelOffset:(int)channelOffset{
// channel: RFID module channel
// channelOffset: RFID module channel offset
}
anticolParamReceived¶
Returns the result via callback after executing getAnticollision.
- (void)anticolParamReceived:(int)mode Counter:(int)counter;
Parameters¶
Name |
Type |
Description |
|
int |
0: Fixed Q, 1: Dynamic Q |
|
int |
Counter |
Sample Code¶
- (void)anticolParamReceived:(int)mode Counter:(int)counter{
// mode: 0 = Fixed Q, 1 = Dynamic Q
// counter: counter value
}
txPowerLevelReceived¶
Returns the result via callback after executing getOutputPowerLevel.
- (void)txPowerLevelReceived:(NSData*)power;
Parameters¶
Name |
Type |
Description |
|
NSData |
The SDK parses the data and saves it to the AsReaderInfo class. |
Sample Code¶
- (void)txPowerLevelReceived:(NSData*)power{
// power: Parsed by SDK, updates rfidPower, rfidPowerMax, rfidPowerMin
}
regionReceived¶
Returns the currently set region code via callback after executing getRegion.
- (void)regionReceived:(int)region;
Parameters¶
Name |
Type |
Description |
|
int |
Region code |
Sample Code¶
- (void)regionReceived:(int)region{
// region: 17 = Korea, 33 = North America, 34 = USA, 49 = Europe, 65 = Japan, 82 = China, 97 = Brazil
}
onOffTimeChanged¶
Callback to notify that the read time setting was changed after executing setReadTime.
- (void)onOffTimeChanged;
Sample Code¶
- (void)onOffTimeChanged{
}
fhLbtReceived¶
Returns the FH/LBT parameter results via callback after executing getFhLbtParameter.
- (void)fhLbtReceived:(NSData *)fhLb;
Parameters¶
Name |
Type |
Description |
|
NSData |
Data structure:
|
Sample Code¶
- (void)fhLbtReceived:(NSData *)fhLb{
// fhLb: Read Time, Idle Time, Carrier Sense Time, Target RF Power Size, FH, LBT, CW
}
hoppingTableReceived¶
Returns the result via callback after executing getFrequencyHoppingTable.
- (void)hoppingTableReceived:(NSData *)table;
Parameters¶
Name |
Type |
Description |
|
NSData |
Table size (8bit) |
Sample Code¶
- (void)hoppingTableReceived:(NSData *)table{
// table: Table size (8bit)
}
didSetFhLbt¶
Returns the result via callback after executing setHoppingOnOff.
- (void)didSetFhLbt:(int)status;
Parameters¶
Name |
Type |
Description |
|
int |
FH/LBT setting result |
Sample Code¶
- (void)didSetFhLbt:(int)status{
// status 0: success, non-zero: failure
}
didSetOptiFreqHPTable¶
Returns the result via callback after executing setFreqHoppingTable.
- (void)didSetOptiFreqHPTable:(int)status;
Parameters¶
Name |
Type |
Description |
|
int |
Optimum frequency hopping table setting result |
Sample Code¶
- (void)didSetOptiFreqHPTable:(int)status{
// status 0: success, non-zero: failure
}
didSetFHmodeChanged¶
Callback invoked after executing setFrequencyHoppingMode.
- (void)didSetFHmodeChanged;
Sample Code¶
- (void)didSetFHmodeChanged{
}
rfidModuleVersionReceived¶
Callback invoked after executing getRFIDModuleVersion.
- (void)rfidModuleVersionReceived;
Sample Code¶
- (void)rfidModuleVersionReceived{
}
rfidOnOffTimeReceived¶
Callback returning the result after executing getFhLbtParameter.
- (void)rfidOnOffTimeReceived:(NSData*)data;
Parameters¶
Item |
Type |
Description |
data |
NSData |
SDK parses the data and saves it in the AsReaderInfo class. |
Sample Code¶
- (void)rfidOnOffTimeReceived:(NSData*)data{
// data will be parsed and stored in AsReaderInfo. Updates rfidOnTime, rfidOffTime, carrierSenseTime, rfidListenBeforeTalk, rfidContinuousWave, rfidFrequencyHopping
}
writtenReceived¶
Callback returning the result after executing writeTagMemoryWithEPC.
- (void)writtenReceived:(int)statusCode;
Parameters¶
Item |
Type |
Description |
statusCode |
int |
Tag memory write result |
Sample Code¶
- (void)writtenReceived:(int)statusCode{
// statusCode 0: Success, Non-zero: Failure
}
sessionReceived¶
Callback returning the result after executing getSession.
- (void)sessionReceived:(int)session;
Parameters¶
Item |
Type |
Description |
session |
int |
Session value |
Sample Code¶
- (void)sessionReceived:(int)session{
// session 0: S0, 1: S1, 2: S2, 3: S3, 240: Development Mode
}
tagMemoryReceived¶
Callback returning the result after executing readTagWithAccessPassword.
- (void)tagMemoryReceived:(NSData *)data;
Parameters¶
Item |
Type |
Description |
data |
NSData |
Tag memory content |
Sample Code¶
- (void)tagMemoryReceived:(NSData *)data{
// data contains tag memory content
}
killedReceived¶
Callback returning the result after executing killTagWithPassword.
- (void)killedReceived:(int)statusCode;
Parameters¶
Item |
Type |
Description |
statusCode |
int |
Tag kill result |
Sample Code¶
- (void)killedReceived:(int)statusCode{
// statusCode 0: Success, Non-zero: Failure
}
lockedReceived¶
Callback returning the result after executing lockTagMemoryWithAccessPassword.
- (void)lockedReceived:(int)statusCode;
Parameters¶
Item |
Type |
Description |
statusCode |
int |
Tag memory lock result |
Sample Code¶
- (void)lockedReceived:(int)statusCode{
// statusCode 0: Success, Non-zero: Failure
}
responseReboot¶
Callback invoked after the device reboots (e.g., firmware update).
- (void)responseReboot:(int)status;
Parameters¶
Item |
Type |
Description |
status |
int |
Device reboot result |
Sample Code¶
- (void)responseReboot:(int)status{
// status 0: Success, Non-zero: Failure
}
updatedRegistry¶
Callback returning the result after executing updateRegistry.
- (void)updatedRegistry:(int)statusCode;
Parameters¶
Item |
Type |
Description |
statusCode |
int |
Registry update result |
Sample Code¶
- (void)updatedRegistry:(int)statusCode{
// statusCode 0: Success, Non-zero: Failure
}
pcEpcSensorDataReceived¶
Callback returning the result after executing startReadTagsRFM.
- (void)pcEpcSensorDataReceived:(NSData *)pcEpc sensorData:(NSData *)sensorData;
Parameters¶
Item |
Type |
Description |
pcEpc |
NSData |
Temperature/Humidity tag data |
sensorData |
NSData |
Temperature/Humidity sensor readings |
Sample Code¶
- (void)pcEpcSensorDataReceived:(NSData *)pcEpc sensorData:(NSData *)sensorData {
int codeType;
int onChipRssiCodeValue;
int sensorCodeValue;
double calcTemp;
NSMutableString *tmptagid;
NSData *tagid = pcEpc;
NSData *taghex = sensorData;
tmptagid = [[NSMutableString alloc] init];
unsigned char* ptrtagid = (unsigned char*)[tagid bytes];
for(int i = 0; i < tagid.length; i++)
[tmptagid appendFormat:@"%02X", *ptrtagid++ & 0xFF ];
Byte *b = (Byte*)[taghex bytes];
codeType = b[0];
onChipRssiCodeValue = (b[1] << 8) | b[2];
sensorCodeValue = (b[3] << 8) | b[4];
double code1 = 0, temp1 = 0, code2 = 0, temp2 = 0, tempCode = sensorCodeValue;
if (codeType == 3) {
int temp = b[7] << 4;
code1 = temp + ((b[8] >> 4) & 0x0F);
temp = (b[8] & 0x0F) << 7;
temp1 = temp + ((b[9] >> 1) & 0x7F);
temp = (b[9] & 0x01) << 8;
temp = (temp + b[10]) << 3;
code2 = temp + ((b[11] >> 5) & 0x07);
temp = (b[11] & 0x1F) << 6;
temp2 = temp + ((b[12] >> 2) & 0x3F);
calcTemp = ((temp2 - temp1) / (code2 - code1) * (tempCode - code1) + temp1 - 800) / 10;
}
}
selectParamReceived¶
Callback returning the result after executing getSelectParameter.
- (void)selectParamReceived:(NSData *)selParam;
Parameters¶
Item |
Bit Length |
Description |
|---|---|---|
target |
3bit |
Session: S0(000), S1(001), S2(010), S3(011), SL(100) |
action |
3bit |
Action compliant with ISO18000-6C |
memoryBank |
2bit |
Memory area: RFU(00), EPC(01), TID(10), User(11) |
pointer |
32bit |
Start address of the filter memory |
length |
8bit |
Length of the filter target data |
truncate |
1bit |
Truncate tag data on match: Enabled(1), Disabled(0) |
reserve |
7bit |
Reserved (unused) |
mask |
Variable (0–255bit) |
Filter data body |
Sample Code¶
- (void)selectParamReceived:(NSData *)selParam{
// selParam structure:
// target(3bit): S0 (000), S1 (001), S2 (010), S3 (011), SL (100)
// action(3bit): See ISO18000-6C standard
// memoryBank(2bit): RFU (00), EPC (01), TID (10), User (11)
// pointer(32bit): Start address for filtering
// length(8bit): Length of filter data
// truncate(1bit): Whether to truncate data on match
// reserve(7bit): Reserved
// mask(0~255bit): Filter data
}
epcReceived:tid:¶
Callback returning the result after executing startReadTagAndTidWithTagNum.
- (void)epcReceived:(NSData *)epc tid:(NSData *)tid;
Parameters¶
Item |
Type |
Description |
epc |
NSData |
EPC data |
tid |
NSData |
TID data |
Sample Code¶
- (void)epcReceived:(NSData *)epc tid:(NSData *)tid{
// epc: EPC data
// tid: TID data
}
modulationParamReceived:rxMod:dr:¶
Returns the result of the getModulation method via callback.
- (void)modulationParamReceived:(int)blf rxMod:(int)rxMod dr:(int)dr;
Parameters¶
Name |
Type |
Description |
blf |
int |
160: BLF_160, 250: BLF_250, 320: BLF_320, 640: BLF_640 |
rxMod |
int |
0: FM0, 1: M2, 2: M4, 3: M8 |
dr |
int |
0:8, 1:64/3 |
Sample Code¶
- (void)modulationParamReceived:(int)blf rxMod:(int)rxMod dr:(int)dr{
// blf 160: BLF_160, 250: BLF_250, 320: BLF_320, 640: BLF_640
// rxMod 0: FM0, 1: M2, 2: M4, 3: M8
// dr 0:8, 1:64/3
}
rssiThresholdReceived:¶
Returns the result of the getRSSIThreshold method via callback.
- (void)rssiThresholdReceived:(uint16_t)threshold;
Parameters¶
Name |
Type |
Description |
threshold |
uint16_t |
RSSI value |
Sample Code¶
- (void)rssiThresholdReceived:(uint16_t)threshold{
// threshold: RSSI value
}
writtenReceived:¶
Returns the result of writeTagMemoryWithAccessPassword or writeTagMemoryWithEPC via callback.
- (void)writtenReceived:(int)statusCode;
Parameters¶
Name |
Type |
Description |
statusCode |
int |
Result of tag memory write |
Sample Code¶
- (void)writtenReceived:(int)statusCode{
// statusCode: 0 = success, non-zero = failure
}
didSetModulation:¶
Returns the result of the setModulationBLF method via callback.
- (void)didSetModulation:(int)status;
Parameters¶
Name |
Type |
Description |
status |
int |
Result of setting modulation |
Sample Code¶
- (void)didSetModulation:(int)status{
// status: 0 = success, non-zero = failure
}
didGetAutoOffTimeReceived:¶
Returns the result of the getAutoOffTime method via callback.
- (void)didGetAutoOffTimeReceived:(int)time;
Parameters¶
Name |
Type |
Description |
time |
int |
Auto power-off time of the device |
Sample Code¶
- (void)didGetAutoOffTimeReceived:(int)time{
// time: auto power-off duration of the device
}
didSetAutoOffTime:¶
Returns the result of the setAutoOffTime method via callback.
- (void)didSetAutoOffTime:(int)status;
Parameters¶
Name |
Type |
Description |
status |
int |
Result of setting auto power-off time |
Sample Code¶
- (void)didSetAutoOffTime:(int)status{
// status: 0 = success, non-zero = failure
}
didGetContinuousModeReceived:¶
Returns the result of the getContinuousMode method via callback.
- (void)didGetContinuousModeReceived:(BOOL)continuousMode;
Parameters¶
Name |
Type |
Description |
continuousMode |
BOOL |
YES: Continuous mode |
Sample Code¶
- (void)didGetContinuousModeReceived:(BOOL)continuousMode{
// continuousMode: YES = continuous mode, NO = single scan mode
}
didSetContinuousMode:¶
Returns the result of the setContinuousMode method via callback.
- (void)didSetContinuousMode:(int)status;
Parameters¶
Name |
Type |
Description |
status |
int |
Result of setting continuous mode |
Sample Code¶
- (void)didSetContinuousMode:(int)status{
// status: 0 = success, non-zero = failure
}
didGetQValueReceived:¶
Returns the result of the getQValue method via callback.
- (void)didGetQValueReceived:(NSString *)value;
Parameters¶
Name |
Type |
Description |
value |
NSString |
Q value |
Sample Code¶
- (void)didGetQValueReceived:(NSString *)value{
//value:Q value
}
didSetQValue:¶
Returns the result of the setQValue method via callback.
- (void)didSetQValue:(int)status;
Parameters¶
Name |
Type |
Description |
status |
int |
Result |
Sample Code¶
- (void)didSetQValue:(int)status{
// status: 0 = success, non-zero = failure
}
didGetSessionFlagReceived:¶
Returns the result of the getSessionFlag method via callback.
- (void)didGetSessionFlagReceived:(int)value;
Parameters¶
Name |
Type |
Description |
value |
int |
Session Flag |
Sample Code¶
- (void)didGetSessionFlagReceived:(int)value{
//value:Session Flag
}
didSetSessionFlag:¶
Returns the result of the setSessionFlag method via callback.
- (void)didSetSessionFlag:(int)status;
Parameters¶
Name |
Type |
Description |
status |
int |
Result |
Sample Code¶
- (void)didSetSessionFlag:(int)status{
// status: 0 = success, non-zero = failure
}
didGetHidModeReceived:¶
Returns the result of the getHidMode method via callback.
- (void)didGetHidModeReceived:(BOOL)value;
Parameters¶
Name |
Type |
Description |
value |
BOOL |
YES: HID Mode, NO: Not HID Mode |
Sample Code¶
- (void)didGetHidModeReceived:(BOOL)value{
//value:YES: HID Mode, NO: Not HID Mode
}
didSetHidMode:¶
Returns the result of the setHidMode method via callback.
- (void)didSetHidMode:(int)status;
Parameters¶
Name |
Type |
Description |
status |
int |
Result |
Sample Code¶
- (void)didSetHidMode:(int)status{
// status: 0 = success, non-zero = failure
}
didGetDutyRatioReceived:¶
Returns the result of the getDutyRatio method via callback.
- (void)didGetDutyRatioReceived:(int)value;
Parameters¶
Name |
Type |
Description |
value |
int |
Duty Ratio |
Sample Code¶
- (void)didGetDutyRatioReceived:(int)value{
//value:Duty Ratio
}
didSetDutyRatio:¶
Returns the result of the setDutyRatio method via callback.
- (void)didSetDutyRatio:(int)status;
Parameters¶
Name |
Type |
Description |
status |
int |
Result |
Sample Code¶
- (void)didSetDutyRatio:(int)status{
// status: 0 = success, non-zero = failure
}
didGetDutyRatioBaseTimeReceived:¶
Returns the result of the getDutyRatioBaseTime method via callback.
- (void)didGetDutyRatioBaseTimeReceived:(int)value;
Parameters¶
Name |
Type |
Description |
value |
int |
Duty Ratio Base Time |
Sample Code¶
- (void)didGetDutyRatioBaseTimeReceived:(int)value{
//value:Duty Ratio Base Time
}
didSetDutyRatioBaseTime:¶
Returns the result of the setDutyRatioBaseTime method via callback.
- (void)didSetDutyRatioBaseTime:(int)status;
Parameters¶
Name |
Type |
Description |
status |
int |
Result |
Sample Code¶
- (void)didSetDutyRatioBaseTime:(int)status{
// status: 0 = success, non-zero = failure
}