How does ble beacon example work?

Hello everyone,

I'm trying to understand the code from this example, but one thing that i can't seem to process is how or where does the following structure get hte keys according to its values:


static uint8_t m_beacon_info[BLE_GAP_ADV_SET_DATA_SIZE_MAX] =                    /**< Information advertised by the Beacon. */
{
    APP_DEVICE_TYPE,     // Manufacturer specific information. Specifies the device type in this
                         // implementation.
    APP_ADV_DATA_LENGTH, // Manufacturer specific information. Specifies the length of the
                         // manufacturer specific data in this implementation.
    APP_BEACON_UUID,     // 128 bit UUID value.
    APP_MAJOR_VALUE,     // Major arbitrary value that can be used to distinguish between Beacons.
    APP_MINOR_VALUE,     // Minor arbitrary value that can be used to distinguish between Beacons.
    APP_MEASURED_RSSI,    // Manufacturer specific information. The Beacon's measured TX power in
    //WAIOT_OP_MODE_INIT   // this implementation.
};

Specifically, when I see the beacon on my phone, I can read which parameter is the UUID, which one is Major, which one is Minor, etc, but I cant find how my code knows which parameter is each one. I have this doubt because I'm trying to replace one of those parameters and change its key/name.

SDK: v17.1

SoftDevice: S132

Thanks for your help

Related