nRF5 SDK v17.1.0
Modules | Data Structures | Macros | Functions | Variables
Launch app records

Generation of NFC NDEF record descriptions that launch apps. More...

Modules

 Encoding data for NDEF Application Launching record for NFC Tag configuration
 

Data Structures

struct  win_launchapp_payload_desc_t
 Type of description of payload of Windows LaunchApp record. More...
 

Macros

#define NFC_ANDROID_REC_TYPE_LENGTH   15
 Size of the type field of the Android Application Record, defined in the file nfc_launchapp_rec.c. It is used in the NFC_NDEF_ANDROID_LAUNCHAPP_RECORD_DESC macro.
 
#define NFC_WINDOWS_REC_TYPE_LENGTH   21
 Size of the type field of the Windows LaunchApp Record, defined in the file nfc_launchapp_rec.c. It is used in the NFC_NDEF_WINDOWS_LAUNCHAPP_RECORD_DESC_DEF macro.
 
#define NFC_WINDOWS_PLAT_TYPE_LENGTH   12
 Size of the platform type, which is used to encode payload field of the Windows LaunchApp Record, defined in the file nfc_launchapp_rec.c. It is used in the NFC_NDEF_WINDOWS_LAUNCHAPP_RECORD_DESC_DEF macro.
 
#define NFC_NDEF_ANDROID_LAUNCHAPP_RECORD_DESC_DEF(NAME,P_PACKAGE_NAME,PACKAGE_NAME_LENGTH)
 Macro for generating a description of an NFC NDEF Android Application Record (AAR). More...
 
#define NFC_NDEF_ANDROID_LAUNCHAPP_RECORD_DESC(NAME)   NFC_NDEF_RECORD_BIN_DATA(NAME)
 Macro for accessing the NFC NDEF Android Application Record descriptor instance that was created with NFC_NDEF_ANDROID_LAUNCHAPP_RECORD_DESC_DEF.
 
#define NFC_NDEF_WINDOWS_LAUNCHAPP_RECORD_DESC_DEF(NAME,P_WIN_APP_ID,WIN_APP_ID_LENGTH)
 Macro for generating a description of an NFC NDEF Windows LaunchApp record. More...
 
#define NFC_NDEF_WINDOWS_LAUNCHAPP_RECORD_DESC(NAME)   NFC_NDEF_GENERIC_RECORD_DESC(NAME)
 Macro for accessing the NFC NDEF Windows LaunchApp Record descriptor instance that was created with NFC_NDEF_WINDOWS_LAUNCHAPP_RECORD_DESC_DEF.
 

Functions

ret_code_t nfc_win_launchapp_payload_constructor (win_launchapp_payload_desc_t *p_input, uint8_t *p_buff, uint32_t *p_len)
 Function for constructing the payload for a Windows LaunchApp record. More...
 

Variables

const uint8_t ndef_android_launchapp_rec_type [15]
 External reference to the type field of the NFC NDEF Android Application Record, defined in the file nfc_launchapp_rec.c. It is used in the NFC_NDEF_ANDROID_LAUNCHAPP_RECORD_DESC_DEF macro.
 
const uint8_t ndef_windows_launchapp_rec_type [21]
 External reference to the type field of the NFC NDEF Windows LaunchApp record, defined in the file nfc_launchapp_rec.c. It is used in the NFC_NDEF_WINDOWS_LAUNCHAPP_RECORD_DESC_DEF macro.
 
const uint8_t ndef_windows_launchapp_plat_type [12]
 External reference to the platform type, which is used to encode payload field of the NFC NDEF Windows LaunchApp record. This constant is defined in the file nfc_launchapp_rec.c and is used in the macro NFC_NDEF_WINDOWS_LAUNCHAPP_RECORD_DESC_DEF.
 

Detailed Description

Generation of NFC NDEF record descriptions that launch apps.

Macro Definition Documentation

#define NFC_NDEF_ANDROID_LAUNCHAPP_RECORD_DESC_DEF (   NAME,
  P_PACKAGE_NAME,
  PACKAGE_NAME_LENGTH 
)
Value:
NULL, \
0, \
(P_PACKAGE_NAME), \
(PACKAGE_NAME_LENGTH))

Macro for generating a description of an NFC NDEF Android Application Record (AAR).

This macro declares and initializes an instance of an NFC NDEF record description of an Android Application Record (AAR).

Note
The record descriptor is declared as automatic variable, which implies that the NDEF message encoding (see nfc_launchapp_msg_encode) must be done in the same variable scope.
Parameters
[in]NAMEName for accessing record descriptor.
[in]P_PACKAGE_NAMEPointer to the Android package name string.
[in]PACKAGE_NAME_LENGTHLength of the Android package name.
#define NFC_NDEF_WINDOWS_LAUNCHAPP_RECORD_DESC_DEF (   NAME,
  P_WIN_APP_ID,
  WIN_APP_ID_LENGTH 
)
Value:
win_launchapp_payload_desc_t NAME##_ndef_win_launchapp_rec_payload_desc = \
{ \
.platform_length = sizeof(ndef_windows_launchapp_plat_type), \
.app_id = (P_WIN_APP_ID), \
.app_id_length = WIN_APP_ID_LENGTH \
}; \
NFC_NDEF_GENERIC_RECORD_DESC_DEF(NAME, \
NULL, \
0, \
&NAME##_ndef_win_launchapp_rec_payload_desc) \

Macro for generating a description of an NFC NDEF Windows LaunchApp record.

This macro declares and initializes an instance of an NFC NDEF record description of a Windows LaunchApp record.

Note
The record descriptor is declared as automatic variable, which implies that the NDEF message encoding (see nfc_launchapp_msg_encode) must be done in the same variable scope.
Parameters
[in]NAMEName for accessing record descriptor.
[in]P_WIN_APP_IDPointer to the Windows application ID string (GUID).
[in]WIN_APP_ID_LENGTHLength of the Windows application ID.
Returns
Pointer to the description of the record.

Function Documentation

ret_code_t nfc_win_launchapp_payload_constructor ( win_launchapp_payload_desc_t p_input,
uint8_t *  p_buff,
uint32_t *  p_len 
)

Function for constructing the payload for a Windows LaunchApp record.

This function encodes the payload according to the LaunchApp record definition. It implements an API compatible with p_payload_constructor_t.

Parameters
[in]p_inputPointer to the description of the payload.
[out]p_buffPointer to payload destination. If NULL, function will calculate the expected size of the LaunchApp record payload.
[in,out]p_lenSize of available memory to write as input. Size of generated payload as output.
Return values
NRF_SUCCESSAlways success.

Documentation feedback | Developer Zone | Subscribe | Updated