-
-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
135 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
namespace Shiny.BluetoothLE; | ||
|
||
|
||
public record ScanConfig( | ||
/// <summary> | ||
/// Filters scan to peripherals that advertise specified service UUIDs | ||
/// iOS - you must set this to initiate a background scan | ||
/// </summary> | ||
params string[] ServiceUuids | ||
); | ||
|
||
|
||
public record ScanResult( | ||
IPeripheral Peripheral, | ||
int Rssi, | ||
IAdvertisementData AdvertisementData | ||
); | ||
|
||
|
||
public record BleServiceInfo(string Uuid); | ||
|
||
|
||
public record BleCharacteristicInfo( | ||
BleServiceInfo Service, | ||
string Uuid, | ||
bool IsNotifying, | ||
CharacteristicProperties Properties | ||
); | ||
|
||
|
||
public record BleDescriptorInfo( | ||
BleCharacteristicInfo Characteristic, | ||
string Uuid | ||
); | ||
|
||
|
||
public record BleCharacteristicResult( | ||
BleCharacteristicInfo Characteristic, | ||
BleCharacteristicEvent Event, | ||
byte[]? Data | ||
); | ||
|
||
|
||
public enum BleCharacteristicEvent | ||
{ | ||
Read, | ||
Write, | ||
WriteWithoutResponse, | ||
Notification | ||
} | ||
|
||
|
||
public record BleDescriptorResult( | ||
BleDescriptorInfo Descriptor, | ||
byte[]? Data | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.