src/nim_nucleuspkg/ble/common/common_types

Types

AddrType {.pure.} = enum
  Public = 0, Random = 1
LocalAddr = object
  addrType*: AddrType
  address*: uint64
PeerAddr = object
  addrType*: AddrType
  address*: uint64
  stringValue*: string
ServiceUuidType = enum
  UuidError = (0, "???"), Uuid16 = (1, "UUID16"), Uuid128 = (2, "UUID128")
Uuid = object
  case uuidType*: ServiceUuidType
  of Uuid16:
    uuid16*: array[2, uint8]
  of Uuid128:
    uuid128*: array[16, uint8]
  else:
    nil

Procs

proc `$`(x: PeerAddr): string {....raises: [], tags: [], forbids: [].}
func `$`(x: Uuid): string {....raises: [], tags: [], forbids: [].}
proc `==`(a, b: Uuid): bool {....raises: [], tags: [], forbids: [].}
proc bdAddr2string(x: uint64): string {....raises: [], tags: [], forbids: [].}
func str2uuid(s: string): Option[Uuid] {....raises: [ValueError], tags: [],
    forbids: [].}
func toUuid(x: array[2, uint8]): Uuid {....raises: [], tags: [], forbids: [].}
func toUuid(x: array[16, uint8]): Uuid {....raises: [], tags: [], forbids: [].}
func toUuid128(x: Uuid): Uuid {....raises: [], tags: [], forbids: [].}