package Ġcom . ju ul . k able Ċ Ċ import Ġcom . ben ash er 4 4 . uuid . Uuid Ċ import Ġplatform . Core Bluetooth . CB Characteristic Ċ import Ġplatform . Core Bluetooth . CB Service Ċ Ċ internal Ġdata Ġclass ĠPlatform Service ( ĊĠĠĠ Ġoverride Ġval Ġservice Uuid : ĠU uid , ĊĠĠĠ Ġval Ġcb Service : ĠCB Service , ĊĠĠĠ Ġval Ġcharacteristics : ĠList < Platform Characteristic >, Ċ ) Ġ: ĠService Ċ Ċ internal Ġfun ĠPlatform Service . to Dis covered Service () Ġ= ĠDis covered Service ( ĊĠĠĠ Ġservice Uuid Ġ= Ġservice Uuid , ĊĠĠĠ Ġcharacteristics Ġ= Ġcharacteristics . map Ġ{ Ġit . to Dis covered Characteristic () Ġ}, Ċ ) Ċ Ċ internal Ġfun ĠCB Service . to Platform Service (): ĠPlatform Service Ġ{ ĊĠĠĠ Ġval Ġservice Uuid Ġ= ĠUUID . to Uuid () ĊĠĠĠ Ġval Ġplatform Character istics Ġ= Ġcharacteristics ?. map Ġ{ Ġcharacteristic Ġ-> ĊĠĠĠĠĠĠĠ Ġcharacteristic Ġas ĠCB Characteristic ĊĠĠĠĠĠĠĠ Ġcharacteristic . to Platform Characteristic ( service Uuid ) ĊĠĠĠ Ġ} Ġ?: Ġempty List () ĊĊĠĠĠ Ġreturn ĠPlatform Service ( ĊĠĠĠĠĠĠĠ Ġservice Uuid Ġ= Ġservice Uuid , ĊĠĠĠĠĠĠĠ Ġcharacteristics Ġ= Ġplatform Character istics , ĊĠĠĠĠĠĠĠ Ġcb Service Ġ= Ġthis , ĊĠĠĠ Ġ) Ċ } Ċ