Inventory with Pre-filters

Applicable Devices : RFD40, RFD90, RFD8500 (RFD8500: up to 4 pre-filters; RFD40 and RFD90: up to 32)

Overview

Applies the configured pre-filters during an inventory or rapid read, by enabling them in the access configuration passed to srfidStartInventory and srfidStartRapidRead.

Details

If pre-filters are configured they might be applied during performing of inventory operation. Application of pre-filters is enabled via accessConfig parameter of srfidStartInventory and srfidStartRapidRead API functions. Apart from enabling application of pre-filters in the accessConfig parameter, inventory with pre-filters is performed in the same way as the typical inventory operation described above. The following example demonstrates enabling application of configured pre-filters during inventory operation.


-(void)startStopInventoryWithPrefilters {
    /* allocate object for report parameters of inventory operation */
    srfidReportConfig *report_cfg = [[srfidReportConfig alloc] init];

    /* allocate object for access parameters of inventory operation */
    srfidAccessConfig *access_cfg = [[srfidAccessConfig alloc] init];

    /* an object for storage of error response received from RFID reader */
    NSString *error_response = nil;

    /* configure report parameters to report RSSI field */
    [report_cfg setIncPC:NO];
    [report_cfg setIncPhase:NO];
    [report_cfg setIncChannelIndex:NO];
    [report_cfg setIncRSSI:YES];
    [report_cfg setIncTagSeenCount:NO];
    [report_cfg setIncFirstSeenTime:NO];
    [report_cfg setIncLastSeenTime:NO];

    /* configure access parameters to perform the operation with 27.0 dBm antenna power level */
    [access_cfg setPower:270];
    /* enable application of configured pre-filters */
    [access_cfg setDoSelect:YES];

    /* request performing of inventory operation with reading from EPC memory bank */
    SRFID_RESULT result = [apiInstance srfidStartInventory:readerID aMemoryBank:SRFID_MEMORYBANK_EPC aReportConfig:report_cfg aAccessConfig:access_cfg aStatusMessage:&error_response];

    if (SRFID_RESULT_SUCCESS == result) {
        NSLog(@"Request succeed\n");

        /* request abort of an operation after 1 minute */

        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(60 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            [apiInstance srfidStopInventory:self->readerID aStatusMessage:nil];
        });
    }
    else if (SRFID_RESULT_RESPONSE_ERROR == result) {
        NSLog(@"Error response from RFID reader: %@\n", error_response);
    }
    else {
        NSLog(@"Request failed\n");
    }

}