/
uid-frame.go
48 lines (37 loc) · 1.21 KB
/
uid-frame.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package eddystone
import (
"github.com/google/uuid"
"math/big"
)
type UidFrame interface {
Frame
// TxPower returns the advertised TX power measured in dBm
TxPower() int8
// RangingData returns the advertised TX power measured in
// dBm
//
// RangingData is an alias of TxPower based on the naming
// scheme from the Eddystone specification.
RangingData() int8
// NamespaceBytes returns the raw byte value of the UID
// namespace for the source device.
NamespaceBytes() [10]byte
// NamespaceString returns the stringified hex value of
// the UID namespace for the source device.
NamespaceString() string
// NamespaceInt returns the parsed big int value of the
// UID namespace for the source device.
NamespaceInt() *big.Int
// InstanceBytes returns the raw byte value of the UID
// instance identifier for the source device.
InstanceBytes() [6]byte
// InstanceString returns the stringified hex value of the
// UID instance identifier for the source device.
InstanceString() string
// InstanceInt returns the parsed uint64 value of the UID
// instance identifier for the source device.
InstanceInt() uint64
// Returns the full identifier value for the source device
// as a UUID.
Uuid() uuid.UUID
}