gpt4 book ai didi

android - AltBeacon setBeaconLayout()

转载 作者:可可西里 更新时间:2023-11-01 18:55:25 24 4
gpt4 key购买 nike

我想知道信标代码代表什么。我的意思是,据我所知,它应该识别信标布局。这是否意味着我可以自定义任何类型的布局并为其分配任何类型的信标代码?我的意思是,我可以写这样的东西吗:

setBeaconLayout("m:2-3=abcd,i:4-13,i:14-23,p:24-24,d:25-25")?

谢谢你的帮助

最佳答案

根据 AltBeacon docs :

m - matching byte sequence for this beacon type to parse (exactly onerequired)

s - ServiceUuid for this beacon type to parse (optional, only forGatt-based beacons)

i - identifier (at least one required, multiple allowed)

p - power calibration field (exactly one required)

d - data field (optional, multiple allowed)

x - extra layout. Signifies that the layout is secondary to a primarylayout with the same matching byte sequence (or ServiceUuid). Extralayouts do not require power or identifier fields and create Beaconobjects without identifiers.

Example of a parser string for AltBeacon:

"m:2-3=beac,i:4-19,i:20-21,i:22-23,p:24-24,d:25-25"

This signifies that the beacon type will be decoded when anadvertisement is found with 0xbeac in bytes 2-3, and a three-partidentifier will be pulled out of bytes 4-19, bytes 20-21 and bytes22-23, respectively. A signed power calibration value will be pulledout of byte 24, and a data field will be pulled out of byte 25.

这是一个list一些信标布局

ALTBEACON      m:2-3=beac,i:4-19,i:20-21,i:22-23,p:24-24,d:25-25
EDDYSTONE TLM x,s:0-1=feaa,m:2-2=20,d:3-3,d:4-5,d:6-7,d:8-11,d:12-15
EDDYSTONE UID s:0-1=feaa,m:2-2=00,p:3-3:-41,i:4-13,i:14-19
EDDYSTONE URL s:0-1=feaa,m:2-2=10,p:3-3:-41,i:4-20v
IBEACON m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24

关于android - AltBeacon setBeaconLayout(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33594197/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com