mirror of https://github.com/ARMmbed/mbed-os.git
docs
parent
57e4cdd732
commit
d01b4a53ee
|
|
@ -1134,35 +1134,26 @@ public:
|
||||||
typedef CallChainOfFunctionPointersWithContext<const Gap *>
|
typedef CallChainOfFunctionPointersWithContext<const Gap *>
|
||||||
GapShutdownCallbackChain_t;
|
GapShutdownCallbackChain_t;
|
||||||
|
|
||||||
/**
|
/** Advertising handle used to identify advertising sets. */
|
||||||
* FIXME
|
|
||||||
*/
|
|
||||||
typedef ble::advertising_handle_t AdvHandle_t;
|
typedef ble::advertising_handle_t AdvHandle_t;
|
||||||
|
|
||||||
/**
|
/** Advertising handle used to identify periodic advertising sets. */
|
||||||
* FIXME
|
|
||||||
*/
|
|
||||||
typedef ble::periodic_sync_handle_t PeriodicSyncHandle_t;
|
typedef ble::periodic_sync_handle_t PeriodicSyncHandle_t;
|
||||||
|
|
||||||
/**
|
/** Type of advertisement scanned. */
|
||||||
* FIXME
|
|
||||||
*/
|
|
||||||
typedef ble::advertising_event_t AdvertisingEventType_t;
|
typedef ble::advertising_event_t AdvertisingEventType_t;
|
||||||
|
|
||||||
/**
|
/** Special advertising set handle used for the legacy advertising set. */
|
||||||
* FIXME
|
|
||||||
*/
|
|
||||||
static const AdvHandle_t LEGACY_ADVERTISING_HANDLE = 0x00;
|
static const AdvHandle_t LEGACY_ADVERTISING_HANDLE = 0x00;
|
||||||
|
|
||||||
/**
|
/** Special advertising set handle used as return or parameter to signify an invalid handle. */
|
||||||
* FIXME
|
|
||||||
*/
|
|
||||||
static const AdvHandle_t INVALID_ADVERTISING_HANDLE = 0xFF;
|
static const AdvHandle_t INVALID_ADVERTISING_HANDLE = 0xFF;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Definition of the general handler of Gap related events.
|
* Definition of the general handler of Gap related events.
|
||||||
*/
|
*/
|
||||||
struct EventHandler {
|
struct EventHandler {
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
struct AdvertisingReportEvent {
|
struct AdvertisingReportEvent {
|
||||||
AdvertisingReportEvent(
|
AdvertisingReportEvent(
|
||||||
|
|
@ -1253,24 +1244,28 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AdvertisingEventType_t type;
|
AdvertisingEventType_t type; /**< Type of advertising used. */
|
||||||
PeerAddressType_t peerAddressType;
|
PeerAddressType_t peerAddressType; /**< Peer address type of advertiser. */
|
||||||
const ble::address_t &peerAddress;
|
ble::address_t const &peerAddress; /**< Peer address of advertiser. */
|
||||||
Phy_t primaryPhy;
|
Phy_t primaryPhy; /**< PHY used on the primary channels. */
|
||||||
Phy_t secondaryPhy;
|
Phy_t secondaryPhy; /**< PHY used on secondary channels. */
|
||||||
ble::advertising_sid_t SID;
|
ble::advertising_sid_t SID; /**< Set identification number. */
|
||||||
ble::advertising_power_t txPower;
|
ble::advertising_power_t txPower; /**< Transmission power reported by the packet. */
|
||||||
ble::rssi_t rssi;
|
ble::rssi_t rssi; /**< Measured signal strength. */
|
||||||
UnitPeriodicInterval_t periodicInterval;
|
UnitPeriodicInterval_t periodicInterval; /**< Interval of periodic advertising. */
|
||||||
PeerAddressType_t directAddressType;
|
PeerAddressType_t directAddressType;/**< Directed advertising target address type. */
|
||||||
const ble::address_t &directAddress;
|
const ble::address_t &directAddress; /**< Directed advertising target address. */
|
||||||
mbed::Span<const uint8_t> advertisingData;
|
mbed::Span<const uint8_t> advertisingData; /**< Advertising payload. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** Called when scanning reads an advertising packet during passive scan or receives
|
||||||
* FIXME
|
* a scan response during an active scan.
|
||||||
|
*
|
||||||
|
* @param event Advertising report @see AdvertisingReportEvent_t for details.
|
||||||
*/
|
*/
|
||||||
virtual void onAdvertisingReport(const AdvertisingReportEvent &event) {
|
void onAdvertisingReport(
|
||||||
|
const AdvertisingReportEvent_t &event
|
||||||
|
) {
|
||||||
(void) event;
|
(void) event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1356,17 +1351,17 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool success;
|
bool success; /**< True if connection succeeded. */
|
||||||
Handle_t connectionHandle;
|
Handle_t connectionHandle; /**< Connection handle if successful. */
|
||||||
Role_t ownRole;
|
Role_t ownRole; /**< Role of the local device. */
|
||||||
PeerAddressType_t peerAddressType;
|
PeerAddressType_t peerAddressType; /**< Peer address type. */
|
||||||
const ble::address_t &peerAddress;
|
const ble::address_t &peerAddress; /**< Peer address. */
|
||||||
const ble::address_t &localResolvablePrivateAddress;
|
const ble::address_t &localResolvablePrivateAddress; /**< Local address type if privacy enabled. */
|
||||||
const ble::address_t &peerResolvablePrivateAddress;
|
const ble::address_t &peerResolvablePrivateAddress; /**< Peer address type if privacy enabled. */
|
||||||
UnitConnInterval_t connectionInterval;
|
UnitConnInterval_t connectionInterval; /**< Connection interval. */
|
||||||
UnitConnInterval_t connectionLatency;
|
UnitSlaveLatency_t connectionLatency; /**< Connection latency in events. */
|
||||||
UnitSupervisionTimeout_t supervisionTimeout;
|
UnitSupervisionTimeout_t supervisionTimeout; /**< Supervision timeout. */
|
||||||
uint16_t masterClockAccuracy /* parts per million */;
|
uint16_t masterClockAccuracy; /**< Peer clock accuracy in parts per million. */
|
||||||
};
|
};
|
||||||
|
|
||||||
void onConnectionComplete(
|
void onConnectionComplete(
|
||||||
|
|
@ -1533,6 +1528,13 @@ public:
|
||||||
virtual void onScanTimeout(const ScanTimeoutEvent &) { }
|
virtual void onScanTimeout(const ScanTimeoutEvent &) { }
|
||||||
|
|
||||||
struct AdvertisingEndEvent_t {
|
struct AdvertisingEndEvent_t {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param advHandle Advertising set handle.
|
||||||
|
* @param connection Connection handle.
|
||||||
|
* @param completed_events Number of events created during before advertising end.
|
||||||
|
* @param connected True if connection has been established.
|
||||||
|
*/
|
||||||
AdvertisingEndEvent_t(
|
AdvertisingEndEvent_t(
|
||||||
AdvHandle_t advHandle,
|
AdvHandle_t advHandle,
|
||||||
Handle_t connection,
|
Handle_t connection,
|
||||||
|
|
@ -1571,10 +1573,13 @@ public:
|
||||||
bool connected;
|
bool connected;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** Called when advertising ends.
|
||||||
* FIXME
|
*
|
||||||
|
* @param event Advertising end event: @see AdvertisingEndEvent_t for details.
|
||||||
*/
|
*/
|
||||||
virtual void onAdvertisingEnd(const AdvertisingEndEvent_t& event) {
|
virtual void onAdvertisingEnd(
|
||||||
|
const AdvertisingEndEvent_t& event
|
||||||
|
) {
|
||||||
(void) event;
|
(void) event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1612,10 +1617,13 @@ public:
|
||||||
const ble::address_t &peerAddress;
|
const ble::address_t &peerAddress;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** Called when a scanning device request a scan response.
|
||||||
* FIXME
|
*
|
||||||
|
* @param event Scan request event: @see ScanRequestEvent_t for details.
|
||||||
*/
|
*/
|
||||||
virtual void onScanRequest(const ScanRequestEvent_t& event) {
|
virtual void onScanRequest(
|
||||||
|
const ScanRequestEvent_t& event
|
||||||
|
) {
|
||||||
(void) event;
|
(void) event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue