more docs

pull/8738/head
paul-szczepanek-arm 2018-11-13 11:18:39 +00:00 committed by Vincent Coubard
parent cfde4ed019
commit bb8892a956
1 changed files with 86 additions and 73 deletions

View File

@ -1364,6 +1364,10 @@ public:
uint16_t masterClockAccuracy; /**< Peer clock accuracy in parts per million. */ uint16_t masterClockAccuracy; /**< Peer clock accuracy in parts per million. */
}; };
/** Called when connection attempt ends.
*
* @param event Connection event @see ConnectionCompleteEvent_t for details.
*/
void onConnectionComplete( void onConnectionComplete(
const ConnectionCompleteEvent &event const ConnectionCompleteEvent &event
) { ) {
@ -2113,29 +2117,34 @@ public:
/* advertising */ /* advertising */
/** /** Return currently available number of supported advertising sets.
* FIXME * This may change at runtime.
* @return *
* @return Number of advertising sets that may be created at the same time.
*/ */
virtual uint8_t getMaxAdvertisingSetNumber() { virtual uint8_t getMaxAdvertisingSetNumber() {
/* Requesting action from porter(s): override this API if this capability is supported. */ /* Requesting action from porter(s): override this API if this capability is supported. */
return 1; return 1;
} }
/** /** Return maximum advertising data length supported.
* FIXME *
* @return * @return Maximum advertising data length supported.
*/ */
virtual uint8_t getMaxAdvertisingDataLength() { virtual uint8_t getMaxAdvertisingDataLength() {
/* Requesting action from porter(s): override this API if this capability is supported. */ /* Requesting action from porter(s): override this API if this capability is supported. */
return 0x1F; return 0x1F;
} }
/** /** Create an advertising set and apply the passed in parameters. The handle returned
* FIXME * by this function must be used for all other calls that accept an advertising handle.
* @param handle * When done with advertising, remove from the system using destroyAdvertisingSet().
* @param parameters *
* @return * @note The exception is the LEGACY_ADVERTISING_HANDLE which may be used at any time.
*
* @param[out] handle Advertising handle returned, valid only if function returned success.
* @param parameters Advertising parameters for the newly created set.
* @return BLE_ERROR_NONE on success.
*/ */
virtual ble_error_t createAdvertisingSet( virtual ble_error_t createAdvertisingSet(
AdvHandle_t *handle, AdvHandle_t *handle,
@ -2147,10 +2156,13 @@ public:
return BLE_ERROR_NOT_IMPLEMENTED; return BLE_ERROR_NOT_IMPLEMENTED;
} }
/** /** Remove the advertising set (resets its set parameters). The advertising set must not
* FIXME * be active.
* @param handle *
* @return * @note LEGACY_ADVERTISING_HANDLE may not be destroyed.
*
* @param handle Advertising set handle.
* @return BLE_ERROR_NONE on success.
*/ */
virtual ble_error_t destroyAdvertisingSet(AdvHandle_t handle) { virtual ble_error_t destroyAdvertisingSet(AdvHandle_t handle) {
(void) handle; (void) handle;
@ -2158,11 +2170,11 @@ public:
return BLE_ERROR_NOT_IMPLEMENTED; return BLE_ERROR_NOT_IMPLEMENTED;
} }
/** /** Set advertising parameters of an existing set.
* FIXME *
* @param handle * @param handle Advertising set handle.
* @param params * @param params New advertising parameters.
* @return * @return BLE_ERROR_NONE on success.
*/ */
virtual ble_error_t setAdvertisingParams( virtual ble_error_t setAdvertisingParams(
AdvHandle_t handle, AdvHandle_t handle,
@ -2174,12 +2186,12 @@ public:
return BLE_ERROR_NOT_IMPLEMENTED; return BLE_ERROR_NOT_IMPLEMENTED;
} }
/** /** Set new advertising payload for a given advertising set.
* FIXME *
* @param handle * @param handle Advertising set handle.
* @param payload * @param payload Advertising payload.
* @param minimiseFragmentation * @param minimiseFragmentation Preference for fragmentation.
* @return * @return BLE_ERROR_NONE on success.
*/ */
virtual ble_error_t setAdvertisingPayload( virtual ble_error_t setAdvertisingPayload(
AdvHandle_t handle, AdvHandle_t handle,
@ -2193,12 +2205,12 @@ public:
return BLE_ERROR_NOT_IMPLEMENTED; return BLE_ERROR_NOT_IMPLEMENTED;
} }
/** /** Set new advertising payload for a given advertising set.
* FIXME *
* @param handle * @param handle Advertising set handle.
* @param response * @param response Advertising scan response.
* @param minimiseFragmentation * @param minimiseFragmentation Preference for fragmentation.
* @return * @return BLE_ERROR_NONE on success.
*/ */
virtual ble_error_t setAdvertisingScanResponse( virtual ble_error_t setAdvertisingScanResponse(
AdvHandle_t handle, AdvHandle_t handle,
@ -2213,12 +2225,12 @@ public:
return BLE_ERROR_NOT_IMPLEMENTED; return BLE_ERROR_NOT_IMPLEMENTED;
} }
/** /** Start advertising using the given advertising set.
* FIXME *
* @param handle * @param handle Advertising set handle.
* @param maxDuration * @param maxDuration Max duration for advertising (in units of 10ms) - 0 means no limit.
* @param maxEvents * @param maxEvents Max number of events produced during advertising - 0 means no limit.
* @return * @return BLE_ERROR_NONE on success.
*/ */
virtual ble_error_t startAdvertising( virtual ble_error_t startAdvertising(
AdvHandle_t handle, AdvHandle_t handle,
@ -2232,10 +2244,10 @@ public:
return BLE_ERROR_NOT_IMPLEMENTED; return BLE_ERROR_NOT_IMPLEMENTED;
} }
/** /** Stop advertising given advertising set.
* FIXME *
* @param handle * @param handle Advertising set handle.
* @return * @return BLE_ERROR_NONE on success.
*/ */
virtual ble_error_t stopAdvertising(AdvHandle_t handle) { virtual ble_error_t stopAdvertising(AdvHandle_t handle) {
(void) handle; (void) handle;
@ -2243,42 +2255,42 @@ public:
return BLE_ERROR_NOT_IMPLEMENTED; return BLE_ERROR_NOT_IMPLEMENTED;
} }
/** /** Check if advertising is active for a given advertising set.
* FIXME *
* @param handle * @param handle Advertising set handle.
* @return * @return True if advertising is active on this set.
*/ */
virtual bool isAdvertisingActive(AdvHandle_t handle) { virtual bool isAdvertisingActive(AdvHandle_t handle) {
return false; return false;
} }
/** /** Set periodic advertising parameters for a given advertising set.
* FIXME *
* @param handle * @param handle Advertising set handle.
* @param periodicAdvertisingIntervalMinMs * @param periodicAdvertisingIntervalMin
* @param periodicAdvertisingIntervalMaxMs * @param periodicAdvertisingIntervalMax
* @param advertiseTxPower * @param advertiseTxPower
* @return * @return BLE_ERROR_NONE on success.
*/ */
virtual ble_error_t setPeriodicAdvertisingParameters( virtual ble_error_t setPeriodicAdvertisingParameters(
AdvHandle_t handle, AdvHandle_t handle,
UnitPeriodicInterval_t periodicAdvertisingIntervalMinMs, UnitPeriodicInterval_t periodicAdvertisingIntervalMin,
UnitPeriodicInterval_t periodicAdvertisingIntervalMaxMs, UnitPeriodicInterval_t periodicAdvertisingIntervalMax,
bool advertiseTxPower = true bool advertiseTxPower = true
) { ) {
(void) handle; (void) handle;
(void) periodicAdvertisingIntervalMinMs; (void) periodicAdvertisingIntervalMin;
(void) periodicAdvertisingIntervalMaxMs; (void) periodicAdvertisingIntervalMax;
(void) advertiseTxPower; (void) advertiseTxPower;
/* Requesting action from porter(s): override this API if this capability is supported. */ /* Requesting action from porter(s): override this API if this capability is supported. */
return BLE_ERROR_NOT_IMPLEMENTED; return BLE_ERROR_NOT_IMPLEMENTED;
} }
/** /** Set new periodic advertising payload for a given advertising set.
* FIXME *
* @param handle * @param handle Advertising set handle.
* @param payload * @param payload Advertising payload.
* @return * @return BLE_ERROR_NONE on success.
*/ */
virtual ble_error_t setPeriodicAdvertisingPayload( virtual ble_error_t setPeriodicAdvertisingPayload(
AdvHandle_t handle, AdvHandle_t handle,
@ -2290,10 +2302,11 @@ public:
return BLE_ERROR_NOT_IMPLEMENTED; return BLE_ERROR_NOT_IMPLEMENTED;
} }
/** /** Start periodic advertising for a given set. Periodic advertising will not start until
* FIXME * normal advertising is running but will continue to run after normal advertising has stopped.
* @param handle *
* @return * @param handle Advertising set handle.
* @return BLE_ERROR_NONE on success.
*/ */
virtual ble_error_t startPeriodicAdvertising(AdvHandle_t handle) virtual ble_error_t startPeriodicAdvertising(AdvHandle_t handle)
{ {
@ -2302,10 +2315,10 @@ public:
return BLE_ERROR_NOT_IMPLEMENTED; return BLE_ERROR_NOT_IMPLEMENTED;
} }
/** /** Stop periodic advertising for a given set.
* FIXME *
* @param handle * @param handle Advertising set handle.
* @return * @return BLE_ERROR_NONE on success.
*/ */
virtual ble_error_t stopPeriodicAdvertising(AdvHandle_t handle) virtual ble_error_t stopPeriodicAdvertising(AdvHandle_t handle)
{ {
@ -2314,10 +2327,10 @@ public:
return BLE_ERROR_NOT_IMPLEMENTED; return BLE_ERROR_NOT_IMPLEMENTED;
} }
/** /** Check if periodic advertising is active for a given advertising set.
* FIXME *
* @param handle * @param handle Advertising set handle.
* @return * @return True if periodic advertising is active on this set.
*/ */
virtual bool isPeriodicAdvertisingActive(AdvHandle_t handle) virtual bool isPeriodicAdvertisingActive(AdvHandle_t handle)
{ {