|
6 | 6 | using System; |
7 | 7 | using nanoFramework.Runtime.Events; |
8 | 8 |
|
9 | | -namespace nanoFramework.Device.Bluetooth |
| 9 | +namespace nanoFramework.Device.Bluetooth |
10 | 10 | { |
11 | | - internal class BluetoothEventClient : BaseEvent |
| 11 | + internal class BluetoothEventServer : BaseEvent |
12 | 12 | { |
13 | 13 | /// <summary> |
14 | | - /// Type of Bluetooth event |
| 14 | + /// Type of Bluetooth event. |
15 | 15 | /// </summary> |
16 | 16 | public BluetoothEventType type; |
17 | 17 |
|
18 | 18 | /// <summary> |
19 | | - /// Event or Connect id |
| 19 | + /// Event or Connect id. |
20 | 20 | /// </summary> |
21 | 21 | public ushort id; |
22 | 22 |
|
23 | 23 | /// <summary> |
24 | | - /// id of Characteristic |
| 24 | + /// id of Characteristic. |
25 | 25 | /// </summary> |
26 | 26 | public ushort characteristicId; |
27 | 27 |
|
28 | 28 | /// <summary> |
29 | | - /// id of Descriptor |
| 29 | + /// id of Descriptor. |
30 | 30 | /// </summary> |
31 | 31 | public ushort descriptorId; |
32 | 32 | } |
33 | 33 |
|
34 | 34 | internal class BluetoothEventScan : BaseEvent |
35 | 35 | { |
36 | 36 | /// <summary> |
37 | | - /// Type of Bluetooth event |
| 37 | + /// Type of Bluetooth event. |
38 | 38 | /// </summary> |
39 | 39 | public BluetoothEventType type; |
40 | 40 |
|
41 | 41 | /// <summary> |
42 | | - /// Event id |
| 42 | + /// Event id. |
43 | 43 | /// </summary> |
44 | 44 | public ushort id; |
45 | 45 | } |
46 | 46 |
|
47 | 47 | internal class BluetoothEventCentral : BaseEvent |
48 | 48 | { |
49 | 49 | /// <summary> |
50 | | - /// Type of Bluetooth event |
| 50 | + /// Type of Bluetooth event. |
51 | 51 | /// </summary> |
52 | 52 | public BluetoothEventType type; |
53 | 53 |
|
54 | 54 | /// <summary> |
55 | | - /// Connection Handle |
| 55 | + /// Connection Handle. |
56 | 56 | /// </summary> |
57 | 57 | public ushort connectionHandle; |
58 | 58 |
|
59 | 59 | /// <summary> |
60 | | - /// status of event |
| 60 | + /// status of event. |
61 | 61 | /// </summary> |
62 | 62 | public ushort status; |
63 | 63 |
|
64 | 64 | /// <summary> |
65 | | - /// Attribute Handle of service |
| 65 | + /// Attribute Handle of service. |
66 | 66 | /// </summary> |
67 | 67 | public ushort serviceHandle; |
68 | 68 |
|
69 | 69 | /// <summary> |
70 | | - /// Attribute Handle of characteristic |
| 70 | + /// Attribute Handle of characteristic. |
71 | 71 | /// </summary> |
72 | 72 | public ushort characteristicHandle; |
73 | 73 | } |
74 | 74 |
|
| 75 | + internal class BluetoothEventSesssion : BaseEvent |
| 76 | + { |
| 77 | + /// <summary> |
| 78 | + /// Type of Bluetooth event. |
| 79 | + /// </summary> |
| 80 | + public BluetoothEventType type; |
| 81 | + |
| 82 | + /// <summary> |
| 83 | + /// Connection Handle. |
| 84 | + /// </summary> |
| 85 | + public ushort connectionHandle; |
| 86 | + |
| 87 | + /// <summary> |
| 88 | + /// status of event. |
| 89 | + /// </summary> |
| 90 | + public ushort status; |
| 91 | + |
| 92 | + /// <summary> |
| 93 | + /// Any extra data. |
| 94 | + /// </summary> |
| 95 | + public ushort data; |
| 96 | + |
| 97 | + /// <summary> |
| 98 | + /// Used for when 32 bit data supplied (pin). |
| 99 | + /// </summary> |
| 100 | + public UInt32 data32; |
| 101 | + } |
75 | 102 | } |
0 commit comments