메소드 | 설명 | |
---|---|---|
BeaconCodeToString ( ushort beaconCode ) : string |
Converts the given beacon code to string.
|
|
BeaconFromBluetoothLeAdvertisementReceivedEventArgs ( BluetoothLEAdvertisementReceivedEventArgs args ) : Beacon |
Constructs a Beacon instance and sets the properties based on the given data.
|
|
BeaconFromByteArray ( [ data ) : Beacon |
Constructs a Beacon instance and sets the properties based on the given data. The expected specification of the data is as follows: Byte(s) Name -------------------------- 0-1 Manufacturer ID (16-bit unsigned integer, big endian) 2-3 Beacon code (two 8-bit unsigned integers, but can be considered as one 16-bit unsigned integer in little endian) 4-19 ID1 (UUID) 20-21 ID2 (16-bit unsigned integer, big endian) 22-23 ID3 (16-bit unsigned integer, big endian) 24 Measured Power (signed 8-bit integer) 25 Additional information byte (optional) For more details on the beacon specifications see https://github.com/AltBeacon/spec The minimum length of the given byte array is 25. If it is longer than 26 bits, everything after the 26th bit is ignored.
|
|
BeaconFromDataSection ( BluetoothLEAdvertisementDataSection dataSection ) : Beacon |
Constructs a Beacon instance and sets the properties based on the given data.
|
|
BeaconFromDataSectionList ( IList |
Constructs a Beacon instance and sets the properties based on the given data.
|
|
BeaconManufacturerData ( ushort manufacturerId, ushort beaconCode ) : BluetoothLEManufacturerData |
Creates a BluetoothLEManufacturerData instance based on the given manufacturer ID and beacon code. The returned instance can be used as a filter for a BLE advertisement watcher.
|
|
BeaconToSecondDataSection ( Beacon beacon, bool includeAuxByte = false ) : BluetoothLEAdvertisementDataSection |
Creates the second part of the beacon advertizing packet. Uses the beacon IDs 1, 2, 3 and measured power to create the data section.
|
|
CalculateDistanceFromRssi ( double rawSignalStrengthInDBm, int measuredPower ) : double |
Calculates the beacon distance based on the given values. http://developer.radiusnetworks.com/2014/12/04/fundamentals-of-beacon-ranging.html
|
|
DataSectionToRawString ( BluetoothLEAdvertisementDataSection dataSection ) : string |
Converts the data of the given BluetoothLEAdvertisementDataSection to a string.
|
|
FormatUuid ( string uuid ) : string |
Formats the given UUID. The method also accepts strings, which do not have the full UUID (are shorter than expected). Too long strings are truncated. An example of a formatted UUID: de305d54-75b4-431b-adb2-eb6b9e546014
|
|
ManufacturerIdToString ( ushort manufacturerId ) : string |
Converts the given manufacturer ID to string.
|
|
UuidToAdvertisementBytePattern ( string uuid, ushort manufacturerId, ushort beaconCode ) : BluetoothLEAdvertisementBytePattern |
Constructs a BluetoothLEAdvertisementBytePattern instance from the given UUID. UUID doesn't have to be full 32 hex digits, but length needs to be even.
|
메소드 | 설명 | |
---|---|---|
ChangeInt16ArrayEndianess ( byte byteArray ) : byte[] |
Switches the endianess of the given byte array so that every two bytes are switched.
|
|
HexStringToByteArray ( string hexString ) : byte[] |
Converts the given hex string to byte array.
|
public static BeaconCodeToString ( ushort beaconCode ) : string | ||
beaconCode | ushort | The beacon code as Uint16. |
리턴 | string |
public static BeaconFromBluetoothLeAdvertisementReceivedEventArgs ( BluetoothLEAdvertisementReceivedEventArgs args ) : Beacon | ||
args | BluetoothLEAdvertisementReceivedEventArgs | |
리턴 | Beacon |
public static BeaconFromByteArray ( [ data ) : Beacon | ||
data | [ | The data to populate the Beacon instance properties with. |
리턴 | Beacon |
public static BeaconFromDataSection ( BluetoothLEAdvertisementDataSection dataSection ) : Beacon | ||
dataSection | BluetoothLEAdvertisementDataSection | A data section containing beacon data. |
리턴 | Beacon |
public static BeaconFromDataSectionList ( IList |
||
dataSections | IList |
A data section containing beacon data. |
리턴 | Beacon |
public static BeaconManufacturerData ( ushort manufacturerId, ushort beaconCode ) : BluetoothLEManufacturerData | ||
manufacturerId | ushort | The manufacturer ID. |
beaconCode | ushort | The beacon code. |
리턴 | BluetoothLEManufacturerData |
public static BeaconToSecondDataSection ( Beacon beacon, bool includeAuxByte = false ) : BluetoothLEAdvertisementDataSection | ||
beacon | Beacon | A beacon instance. |
includeAuxByte | bool | Defines whether we should add the additional byte or not. |
리턴 | BluetoothLEAdvertisementDataSection |
public static CalculateDistanceFromRssi ( double rawSignalStrengthInDBm, int measuredPower ) : double | ||
rawSignalStrengthInDBm | double | The detected signal strength. |
measuredPower | int | The device specific measured power as reported by the beacon. |
리턴 | double |
public static DataSectionToRawString ( BluetoothLEAdvertisementDataSection dataSection ) : string | ||
dataSection | BluetoothLEAdvertisementDataSection | The data section instance. |
리턴 | string |
public static FormatUuid ( string uuid ) : string | ||
uuid | string | A UUID to format. |
리턴 | string |
public static ManufacturerIdToString ( ushort manufacturerId ) : string | ||
manufacturerId | ushort | The manufacturer ID as Uint16. |
리턴 | string |
public static UuidToAdvertisementBytePattern ( string uuid, ushort manufacturerId, ushort beaconCode ) : BluetoothLEAdvertisementBytePattern | ||
uuid | string | The UUID. |
manufacturerId | ushort | The manufacturer ID. |
beaconCode | ushort | The beacon code. |
리턴 | BluetoothLEAdvertisementBytePattern |