Knowing Supported Link Profiles

Applicable Devices : RFD40, RFD90, RFD8500

Overview

Retrieves the list of link profiles (RF modes) supported by an active RFID reader, using srfidGetSupportedLinkProfiles.

Details

An antenna of the RFID reader could be configured to operate in various RF modes (link profiles). The SDK provides an ability to retrieve the list of link profiles(RF modes) supported by a particular active RFID reader. The list of supported link profiles could be retrieved via srfidGetSupportedLinkProfiles API function as demonstrated in the following example.


-(void)getSupportLinkProfile {

    /* allocate object for storage of link profiles information */
    NSMutableArray *profiles = [[NSMutableArray alloc] init];
    /* an object for storage of error response received from RFID reader */
    NSString *error_response = nil;
    /* retrieve supported link profiles */
    SRFID_RESULT result = [apiInstance srfidGetSupportedLinkProfiles:readerID aLinkProfilesList:&profiles aStatusMessage:&error_response];

    if (SRFID_RESULT_SUCCESS == result) {
        /* print retrieved information about supported link profiles */
        NSLog(@"Number of supported link profiles: %lu\n", (unsigned long)[profiles count]);
        for (srfidLinkProfile *profile_info in profiles) {
            NSLog(@"RF mode index: %d\n", [profile_info getRFModeIndex]);
            NSLog(@"BDR: %d\n", [profile_info getBDR]);
            NSLog(@"PIE: %d\n", [profile_info getPIE]);
            NSLog(@"Tari: min = %d; max = %d; step = %d\n", [profile_info getMinTari], [profile_info getMaxTari], [profile_info getStepTari]);
            NSLog(@"EPCHAGT&CConformance: %@\n", ((NO == [profile_info getEPCHAGTCConformance]) ? @"NO" : @"YES"));
            NSLog(@"Divide Ratio: %@\n", [profile_info getDivideRatioString]);
            NSLog(@"FLM: %@\n", [profile_info getForwardLinkModulationString]);
            NSLog(@"M: %@\n", [profile_info getModulationString]);
            NSLog(@"Spectral Mask indicator: %@\n", [profile_info getSpectralMaskIndicatorString]);
        }
    }
    else if (SRFID_RESULT_RESPONSE_ERROR == result) {
        NSLog(@"Error response from RFID reader: %@\n", error_response);
    }
    else if (SRFID_RESULT_RESPONSE_TIMEOUT == result) {
        NSLog(@"Timeout occurs during communication with RFID reader\n");
    }
    else if (SRFID_RESULT_READER_NOT_AVAILABLE == result) {
        NSLog(@"RFID reader with id = %d is not available\n", readerID);
    }
    else {
        NSLog(@"Request failed\n");
    }

}