added type conversion for connection params

pull/8738/head
paul-szczepanek-arm 2018-11-21 11:27:04 +00:00 committed by Vincent Coubard
parent 7fb863eeb4
commit 7b0cb27427
1 changed files with 8 additions and 0 deletions

View File

@ -611,6 +611,14 @@ struct peer_address_type_t :SafeEnum<peer_address_type_t, uint8_t> {
ANONYMOUS = 0xFF
};
ble::target_peer_address_type_t getTargetAddressType() const {
if (value() == RANDOM || value() == RANDOM_STATIC_IDENTITY) {
return ble::target_peer_address_type_t::RANDOM;
}
return ble::target_peer_address_type_t::PUBLIC;
}
/**
* Construct a new instance of peer_address_type_t.
*/