Message structure

Serial Modem Host Applications

tags
Serial Modem Host Applications

The following describes the message structure of the module:

/** Serving cell information. */
struct location_cell_info {
    bool valid;
    int mcc;
    int mnc;
    int rsrp;
    int rsrq;
    int earfcn;
    int pci;
    uint32_t eci;
    uint32_t tac;
};

/** Wi-Fi access point information. */
struct location_wifi_ap_info {
    int8_t rssi;
    uint8_t mac[MAC_ADDR_LEN];
    uint8_t mac_length;
    uint8_t channel;
};

/** Cell and Wi-Fi scan data from a location search. */
struct location_search_wifi_cell_result {
    struct location_cell_info cell;
    uint16_t wifi_cnt;
    struct location_wifi_ap_info wifi_aps[CONFIG_APP_LOCATION_WIFI_APS_MAX];
};

struct location_msg {
    enum location_msg_type type;

    /** Cell and Wi-Fi scan data from a location search.
     *  wifi_cell_result is valid for LOCATION_SEARCH_WIFI_CELL_RESULT messages.
     */
    struct location_search_wifi_cell_result wifi_cell_result;
};