File tree Expand file tree Collapse file tree 1 file changed +44
-2
lines changed Expand file tree Collapse file tree 1 file changed +44
-2
lines changed Original file line number Diff line number Diff line change 21
21
#include < stdint.h>
22
22
#include < string.h>
23
23
#include " ble/SafeEnum.h"
24
- #include " ble/BLEProtocol.h"
25
24
#include " platform/Span.h"
26
25
#include " ble/gap/Types.h"
27
26
@@ -837,10 +836,53 @@ struct coded_symbol_per_bit_t :SafeEnum<coded_symbol_per_bit_t, uint8_t> {
837
836
* Representation of a whitelist of addresses.
838
837
*/
839
838
struct whitelist_t {
839
+ /* *
840
+ * BLE address representation.
841
+ *
842
+ * It contains an address-type (peer_address_type_t) and the address value
843
+ * (address_t).
844
+ */
845
+ struct entry_t {
846
+ /* *
847
+ * Construct an entry_t object with the supplied type and address.
848
+ *
849
+ * @param[in] typeIn The peer address type.
850
+ * @param[in] addressIn The peer address.
851
+ *
852
+ * @post type is equal to typeIn and address is equal to the content
853
+ * present in addressIn.
854
+ */
855
+ entry_t (peer_address_type_t typeIn, const address_t &addressIn) :
856
+ type (typeIn),
857
+ address (addressIn)
858
+ { }
859
+
860
+ /* *
861
+ * Empty constructor.
862
+ *
863
+ * @note The address constructed with the empty constructor is not
864
+ * valid.
865
+ *
866
+ * @post type is equal to PUBLIC and the address value is equal to
867
+ * 00:00:00:00:00:00
868
+ */
869
+ entry_t (void ) : type(), address() { }
870
+
871
+ /* *
872
+ * Type of the peer address.
873
+ */
874
+ peer_address_type_t type;
875
+
876
+ /* *
877
+ * Value of the peer address.
878
+ */
879
+ address_t address;
880
+ };
881
+
840
882
/* *
841
883
* Pointer to the array of the addresses composing the whitelist.
842
884
*/
843
- BLEProtocol::Address_t *addresses;
885
+ entry_t *addresses;
844
886
845
887
/* *
846
888
* Number addresses in this whitelist.
You can’t perform that action at this time.
0 commit comments