Ċ package Ġcom . bill . kotlin _ bluetooth leg att Ċ Ċ import Ġjava . util .* Ċ Ċ /** Ċ Ġ* ĠThis Ġclass Ġincludes Ġa Ġsmall Ġsubset Ġof Ġstandard ĠG ATT Ġattributes Ġfor Ġdemonstr ation Ġpurposes . Ċ Ġ*/ Ċ object ĠSample Gatt Attributes Ġ{ ĊĠĠĠ Ġvar Ġattributes : ĠHashMap < String , ĠString > Ġ= ĠHashMap () ĊĠĠĠ Ġvar ĠHE ART _ RATE _ MEAS UREMENT Ġ= Ġ" 0 0 0 0 2 a 3 7 - 0 0 0 0 - 1 0 0 0 - 8 0 0 0 - 0 0 8 0 5 f 9 b 3 4 fb " ĊĊĊĠĠĠ Ġval ĠQ CA 4 0 2 x Service UUID : ĠUUID Ġ= ĠUUID . fromString (" 0 0 0 0 1 6 5 0 - 0 0 0 0 - 1 0 0 0 - 8 0 0 0 - 0 0 8 0 5 f 9 b 3 4 fb ") ĊĠĠĠ Ġval ĠQ CA 4 0 2 x Characteristic UUID : ĠUUID Ġ= ĠUUID . fromString (" 0 0 0 0 1 6 5 1 - 0 0 0 0 - 1 0 0 0 - 8 0 0 0 - 0 0 8 0 5 f 9 b 3 4 fb ") ĊĠĠĠ Ġval ĠQ CA 4 0 2 x Send Characteristic UUID : ĠUUID Ġ= ĠUUID . fromString (" 0 0 0 0 1 6 5 2 - 0 0 0 0 - 1 0 0 0 - 8 0 0 0 - 0 0 8 0 5 f 9 b 3 4 fb ") ĊĊĠĠĠ Ġval ĠCLIENT _ CHARACTER ISTIC _ CONFIG : UUID Ġ= ĠUUID . fromString (" 0 0 0 0 2 9 0 2 - 0 0 0 0 - 1 0 0 0 - 8 0 0 0 - 0 0 8 0 5 f 9 b 3 4 fb ") ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ Ġattributes . put (" 0 0 0 0 1 6 5 0 - 0 0 0 0 - 1 0 0 0 - 8 0 0 0 - 0 0 8 0 5 f 9 b 3 4 fb ", Ġ" Q CA 4 0 2 X ĠService ") ĊĠĠĠĠĠĠĠ Ġattributes . put (" 0 0 0 0 1 6 5 1 - 0 0 0 0 - 1 0 0 0 - 8 0 0 0 - 0 0 8 0 5 f 9 b 3 4 fb ", Ġ" Characteristic ") ĊĠĠĠĠĠĠĠ Ġattributes . put (" 0 0 0 0 1 6 5 2 - 0 0 0 0 - 1 0 0 0 - 8 0 0 0 - 0 0 8 0 5 f 9 b 3 4 fb ", Ġ" Send ĠCharacter istic ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġlookup ( uuid : ĠString , Ġdefault Name : ĠString ): ĠString Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġname Ġ= Ġattributes . get ( uuid ) ĊĠĠĠĠĠĠĠ Ġreturn Ġname Ġ?: Ġdefault Name ĊĠĠĠ Ġ} Ċ } Ċ