LeReportMsg le_report_msg;
std::vector<LeAdvertisingReport> advertisements;
LeAdvertisingReport le_advertising_report;
- le_advertising_report.address_type_ = report->address_type_;
+ le_advertising_report.address_type_ = static_cast<AddressType>(report->address_type_);
le_advertising_report.address_ = report->address_;
le_advertising_report.advertising_data_ = report->gap_data_;
le_advertising_report.event_type_ = report->advertising_event_type_;
LeReportMsg le_report_msg;
std::vector<LeExtendedAdvertisingReport> advertisements;
LeExtendedAdvertisingReport le_extended_advertising_report;
+ le_extended_advertising_report.address_type_ = report->address_type_;
le_extended_advertising_report.address_ = report->address_;
le_extended_advertising_report.advertising_data_ = report->gap_data_;
le_extended_advertising_report.rssi_ = report->rssi_;
class LeReport {
public:
explicit LeReport(const LeAdvertisingReport& advertisement)
- : report_type_(ReportType::ADVERTISING_EVENT), advertising_event_type_(advertisement.event_type_),
- address_(advertisement.address_), address_type_(advertisement.address_type_), rssi_(advertisement.rssi_),
+ : report_type_(ReportType::ADVERTISING_EVENT),
+ advertising_event_type_(advertisement.event_type_),
+ address_(advertisement.address_),
+ address_type_(static_cast<DirectAdvertisingAddressType>(advertisement.address_type_)),
+ rssi_(advertisement.rssi_),
gap_data_(advertisement.advertising_data_) {}
explicit LeReport(const LeDirectedAdvertisingReport& advertisement)
- : report_type_(ReportType::DIRECTED_ADVERTISING_EVENT), address_(advertisement.address_),
+ : report_type_(ReportType::DIRECTED_ADVERTISING_EVENT),
+ address_(advertisement.address_),
+ address_type_(advertisement.address_type_),
rssi_(advertisement.rssi_) {}
explicit LeReport(const LeExtendedAdvertisingReport& advertisement)
- : report_type_(ReportType::EXTENDED_ADVERTISING_EVENT), address_(advertisement.address_),
- rssi_(advertisement.rssi_), gap_data_(advertisement.advertising_data_) {}
+ : report_type_(ReportType::EXTENDED_ADVERTISING_EVENT),
+ address_(advertisement.address_),
+ address_type_(advertisement.address_type_),
+ rssi_(advertisement.rssi_),
+ gap_data_(advertisement.advertising_data_) {}
virtual ~LeReport() = default;
enum class ReportType {
// Advertising Event
const AdvertisingEventType advertising_event_type_{};
const Address address_{};
- const AddressType address_type_{};
+ const DirectAdvertisingAddressType address_type_{};
const int8_t rssi_;
const std::vector<GapData> gap_data_{};
};