| nRF5 SDK v12.0.0 |

Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
Location and Navigation Service Control Point
BLE Services

Location and Navigation Service Control Point module. More...

## Data Structures
union | ble_lncp_mask_t
| A mask can be used to temporarily enable and disable features of the Location and Speed characteristic. More...
struct | ble_lncp_evt_t
struct | ble_lncp_rsp_t
| Information included in a control point write response indication. More...
struct | ble_lncp_init_t
struct | ble_lncp_s

## Macros
#define | BLE_LNS_MAX_ROUTE_NAME_LEN (BLE_L2CAP_MTU_DEF - 5)
#define | MAX_CTRL_POINT_RESP_PARAM_LEN BLE_LNS_MAX_ROUTE_NAME_LEN + 3
#define | LNCP_NAV_CMD_MAX 0x05
#define | LNCP_NAV_CMD_LEN (OPCODE_LENGTH + 1)

## Typedefs
typedef struct ble_lncp_s | ble_lncp_t
typedef ble_lncp_rsp_code_t(* | ble_lncp_evt_handler_t )(ble_lncp_t const *p_lncp, ble_lncp_evt_t const *p_evt)

## Enumerations
enum | ble_lncp_evt_type_t { LNCP_EVT_ELEVATION_SET, LNCP_EVT_FIX_RATE_SET, LNCP_EVT_ROUTE_SELECTED, LNCP_EVT_NAV_COMMAND, LNCP_EVT_MASK_SET, LNCP_EVT_TOTAL_DISTANCE_SET }
| Location and Navigation event type. This list defines the possible events types from the Location and Navigation Service. More...
enum | ble_lncp_nav_cmd_t { LNCP_CMD_NAV_STOP = 0x00, LNCP_CMD_NAV_START = 0x01, LNCP_CMD_NAV_PAUSE = 0x02, LNCP_CMD_NAV_CONTINUE = 0x03, LNCP_CMD_NAV_SKIP_WAYPOINT = 0x04, LNCP_CMD_NAV_NEAREST = 0x05 }
| Navigation commands. These commands can be sent to the control point and returned by an event callback. More...
enum | ble_lncp_rsp_code_t { LNCP_RSP_RESERVED = 0x00, LNCP_RSP_SUCCESS = 0x01, LNCP_RSP_OP_CODE_NOT_SUPPORTED = 0x02, LNCP_RSP_INVALID_PARAMETER = 0x03, LNCP_RSP_OPERATION_FAILED = 0x04, LNCP_RSP_PROC_ALR_IN_PROG = BLE_GATT_STATUS_ATTERR_CPS_PROC_ALR_IN_PROG, LNCP_RSP_CCCD_CONFIG_IMPROPER = BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR }
enum | ble_lncp_op_code_t { LNCP_OP_RESERVED = 0x00, LNCP_OP_SET_CUMULATIVE_VALUE = 0x01, LNCP_OP_MASK_LOC_SPEED_CONTENT = 0x02, LNCP_OP_NAV_CONTROL = 0x03, LNCP_OP_REQ_NUM_ROUTES = 0x04, LNCP_OP_REQ_NAME_OF_ROUTE = 0x05, LNCP_OP_SELECT_ROUTE = 0x06, LNCP_OP_SET_FIX_RATE = 0x07, LNCP_OP_SET_ELEVATION = 0x08, LNCP_OP_RESPONSE_CODE = 0x20 }
enum | ble_lncp_procedure_status_t { LNCP_STATE_NO_PROC_IN_PROGRESS, LNCP_STATE_INDICATION_PENDING, LNCP_STATE_CONFIRMATION_PENDING }
| Location and Navigation Control Point procedure status. More...

## Functions
void | ble_lncp_on_ble_evt (ble_lncp_t *p_lncp, ble_evt_t const *p_ble_evt)
uint32_t | ble_lncp_total_distance_get (ble_lncp_t const *p_lncp)
uint32_t | ble_lncp_elevation_get (ble_lncp_t const *p_lncp)
ble_lncp_mask_t | ble_lncp_mask_get (ble_lncp_t const *p_lncp)
bool | ble_lncp_is_navigation_running (ble_lncp_t const *p_lncp)
ret_code_t | ble_lncp_init (ble_lncp_t *p_lncp, ble_lncp_init_t const *p_lncp_init)

## Detailed Description

Location and Navigation Service Control Point module.

This module implements the Location and Navigation Service Control Point behavior.

## Macro Definition Documentation

#define BLE_LNS_MAX_ROUTE_NAME_LEN (BLE_L2CAP_MTU_DEF - 5)

The maximum length of length of a route name.

#define MAX_CTRL_POINT_RESP_PARAM_LEN BLE_LNS_MAX_ROUTE_NAME_LEN + 3

Maximum length of a control point response.

## Enumeration Type Documentation

enum ble_lncp_evt_type_t

Location and Navigation event type. This list defines the possible events types from the Location and Navigation Service.

Enumerator
LNCP_EVT_ELEVATION_SET | Location and Navigation elevation was set.
LNCP_EVT_FIX_RATE_SET | Fix rate was set.
LNCP_EVT_ROUTE_SELECTED | A route was selected.
LNCP_EVT_NAV_COMMAND | A navigation command was issued.
LNCP_EVT_MASK_SET | Location and Speed feature mask was set.
LNCP_EVT_TOTAL_DISTANCE_SET | Location and Navigation total distance was set.

enum ble_lncp_nav_cmd_t

Navigation commands. These commands can be sent to the control point and returned by an event callback.

Enumerator
LNCP_CMD_NAV_STOP | When received, is_navigation_running in ble_lns_s will be set to false.
LNCP_CMD_NAV_START | When received, is_navigation_running in ble_lns_s will be set to true.
LNCP_CMD_NAV_PAUSE | When received, is_navigation_running in ble_lns_s will be set to false.
LNCP_CMD_NAV_CONTINUE | When received, is_navigation_running in ble_lns_s will be set to true.
LNCP_CMD_NAV_SKIP_WAYPOINT | When received, is_navigation_running in ble_lns_s will not be affected.
LNCP_CMD_NAV_NEAREST | When received, is_navigation_running in ble_lns_s will be set to true.

enum ble_lncp_op_code_t

Enumerator
LNCP_OP_RESERVED | Reserved for future use.
LNCP_OP_SET_CUMULATIVE_VALUE | Set Cumulative Value.
LNCP_OP_MASK_LOC_SPEED_CONTENT | Mask Location and Speed Characteristic Content.
LNCP_OP_NAV_CONTROL | Navigation Control.
LNCP_OP_REQ_NUM_ROUTES | Request Number of Routes.
LNCP_OP_REQ_NAME_OF_ROUTE | Request Name of Route.
LNCP_OP_SELECT_ROUTE | Select Route.
LNCP_OP_SET_FIX_RATE | Set Fix Rate.
LNCP_OP_SET_ELEVATION | Set Elevation.
LNCP_OP_RESPONSE_CODE | Response code.

enum ble_lncp_procedure_status_t

Location and Navigation Control Point procedure status.

Enumerator
LNCP_STATE_NO_PROC_IN_PROGRESS | No procedure in progress.
LNCP_STATE_INDICATION_PENDING | Control Point indication is pending.
LNCP_STATE_CONFIRMATION_PENDING | Waiting for the indication confirmation.

enum ble_lncp_rsp_code_t

Enumerator
LNCP_RSP_RESERVED | Reserved for future use.
LNCP_RSP_SUCCESS | Success.
LNCP_RSP_OP_CODE_NOT_SUPPORTED | Op Code not supported.
LNCP_RSP_INVALID_PARAMETER | Invalid Parameter.
LNCP_RSP_OPERATION_FAILED | Operation Failed.
LNCP_RSP_PROC_ALR_IN_PROG | Control point procedure is already in progress.
LNCP_RSP_CCCD_CONFIG_IMPROPER | CCCD is improperly configured.