Mistake on this page?
Report an issue in GitHub or email us
lctr_api_adv_master.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief Link layer controller scanning master interface file.
6  *
7  * Copyright (c) 2013-2018 Arm Ltd. All Rights Reserved.
8  *
9  * Copyright (c) 2019 Packetcraft, Inc.
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 /*************************************************************************************************/
24 
25 #ifndef LCTR_API_ADV_MASTER_H
26 #define LCTR_API_ADV_MASTER_H
27 
28 #include "lctr_api.h"
29 #include "lmgr_api_adv_master.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /*!
36  * \addtogroup LL_LCTR_API_ADV_MST
37  * \{
38  */
39 
40 /**************************************************************************************************
41  Constants
42 **************************************************************************************************/
43 
44 /*! \brief Master scan task messages for \a LCTR_DISP_SCAN dispatcher. */
45 enum
46 {
47  /* Broadcast events */
48  LCTR_SCAN_MSG_RESET = LCTR_MSG_RESET, /*!< Reset API message. */
49  /* Scan events */
50  LCTR_SCAN_MSG_DISCOVER_ENABLE, /*!< Scan enable API event. */
51  LCTR_SCAN_MSG_DISCOVER_DISABLE, /*!< Scan disable API event. */
52  LCTR_SCAN_MSG_TERMINATE, /*!< Scan BOD terminated event. */
53  LCTR_SCAN_MSG_PARAM_UPD, /*!< Scan parameter update event. */
54  LCTR_SCAN_MSG_TOTAL /*!< Total number of scan events. */
55 };
56 
57 /**************************************************************************************************
58  Data Types
59 **************************************************************************************************/
60 
61 /*! \brief Scan parameter message. */
62 typedef struct
63 {
64  lctrMsgHdr_t hdr; /*!< Message header. */
65  lmgrScanParam_t param; /*!< Scan parameters. */
67 
68 /*! \brief Scan enable message. */
69 typedef struct
70 {
71  lctrMsgHdr_t hdr; /*!< Message header. */
72  bool_t filtDup; /*!< Filter out duplicate advertisers. */
74 
75 /*! \brief Initiate message. */
76 typedef struct
77 {
78  lctrMsgHdr_t hdr; /*!< Message header. */
79  LlConnSpec_t connSpec; /*!< Connection spec. */
80  lmgrScanParam_t scanParam; /*!< Scan parameters. */
81  uint64_t peerAddr; /*!< Peer address. */
82  uint8_t peerAddrType; /*!< Peer address type. */
84 
85 /*! \brief Advertising report message. */
86 typedef struct
87 {
88  lctrMsgHdr_t hdr; /*!< Message header. */
89  LlAdvReportInd_t rpt; /*!< Report data. */
90  uint32_t hash; /*!< Event data hash. */
92 
93 /**************************************************************************************************
94  Function Declarations
95 **************************************************************************************************/
96 
97 /* Initialization */
98 void LctrMstScanInit(void);
99 void LctrMstScanDefaults(void);
100 
101 /* Helpers */
102 void lctrAdvReportsInc(void);
103 void lctrAdvReportsDec(void);
104 
105 /* Utility */
106 bool_t LctrMstScanIsEnabled(void);
107 bool_t LctrMstScanIsPrivAddr(void);
108 
109 /*! \} */ /* LL_LCTR_API_ADV_MST */
110 
111 #ifdef __cplusplus
112 };
113 #endif
114 
115 #endif /* LCTR_API_ADV_MASTER_H */
Link layer manager advertising master interface file.
LlAdvReportInd_t rpt
Link layer controller common interface file.
Scan parameter message.
Advertising report indication.
Definition: ll_api.h:973
Scan parameters.
Initiate message.
Common message structure passed to event handler.
Definition: lctr_api.h:109
Advertising report message.
Scan enable message.
lmgrScanParam_t scanParam
Connection specification (LlCreateConn(), LlConnUpdate() and LlExtCreateConn()).
Definition: ll_api.h:624
lmgrScanParam_t param
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.