This repository has been archived by the owner on Feb 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
BGLib.cs
3252 lines (3083 loc) · 183 KB
/
BGLib.cs
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Bluegiga BGLib C# interface library
// 2015-03-19 by Jeff Rowberg <[email protected]
// Updates should (hopefully) always be available at https://github.com/jrowberg/bglib
/* ============================================
BGLib C# interface library code is placed under the MIT license
Copyright (c) 2015 Jeff Rowberg
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===============================================
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Bluegiga {
namespace BLE {
namespace Responses {
namespace System {
public delegate void ResetEventHandler(object sender, Bluegiga.BLE.Responses.System.ResetEventArgs e);
public class ResetEventArgs : EventArgs {
public ResetEventArgs() { }
}
public delegate void HelloEventHandler(object sender, Bluegiga.BLE.Responses.System.HelloEventArgs e);
public class HelloEventArgs : EventArgs {
public HelloEventArgs() { }
}
public delegate void AddressGetEventHandler(object sender, Bluegiga.BLE.Responses.System.AddressGetEventArgs e);
public class AddressGetEventArgs : EventArgs {
public readonly Byte[] address;
public AddressGetEventArgs(Byte[] address) {
this.address = address;
}
}
public delegate void RegWriteEventHandler(object sender, Bluegiga.BLE.Responses.System.RegWriteEventArgs e);
public class RegWriteEventArgs : EventArgs {
public readonly UInt16 result;
public RegWriteEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void RegReadEventHandler(object sender, Bluegiga.BLE.Responses.System.RegReadEventArgs e);
public class RegReadEventArgs : EventArgs {
public readonly UInt16 address;
public readonly Byte value;
public RegReadEventArgs(UInt16 address, Byte value) {
this.address = address;
this.value = value;
}
}
public delegate void GetCountersEventHandler(object sender, Bluegiga.BLE.Responses.System.GetCountersEventArgs e);
public class GetCountersEventArgs : EventArgs {
public readonly Byte txok;
public readonly Byte txretry;
public readonly Byte rxok;
public readonly Byte rxfail;
public readonly Byte mbuf;
public GetCountersEventArgs(Byte txok, Byte txretry, Byte rxok, Byte rxfail, Byte mbuf) {
this.txok = txok;
this.txretry = txretry;
this.rxok = rxok;
this.rxfail = rxfail;
this.mbuf = mbuf;
}
}
public delegate void GetConnectionsEventHandler(object sender, Bluegiga.BLE.Responses.System.GetConnectionsEventArgs e);
public class GetConnectionsEventArgs : EventArgs {
public readonly Byte maxconn;
public GetConnectionsEventArgs(Byte maxconn) {
this.maxconn = maxconn;
}
}
public delegate void ReadMemoryEventHandler(object sender, Bluegiga.BLE.Responses.System.ReadMemoryEventArgs e);
public class ReadMemoryEventArgs : EventArgs {
public readonly UInt32 address;
public readonly Byte[] data;
public ReadMemoryEventArgs(UInt32 address, Byte[] data) {
this.address = address;
this.data = data;
}
}
public delegate void GetInfoEventHandler(object sender, Bluegiga.BLE.Responses.System.GetInfoEventArgs e);
public class GetInfoEventArgs : EventArgs {
public readonly UInt16 major;
public readonly UInt16 minor;
public readonly UInt16 patch;
public readonly UInt16 build;
public readonly UInt16 ll_version;
public readonly Byte protocol_version;
public readonly Byte hw;
public GetInfoEventArgs(UInt16 major, UInt16 minor, UInt16 patch, UInt16 build, UInt16 ll_version, Byte protocol_version, Byte hw) {
this.major = major;
this.minor = minor;
this.patch = patch;
this.build = build;
this.ll_version = ll_version;
this.protocol_version = protocol_version;
this.hw = hw;
}
}
public delegate void EndpointTXEventHandler(object sender, Bluegiga.BLE.Responses.System.EndpointTXEventArgs e);
public class EndpointTXEventArgs : EventArgs {
public readonly UInt16 result;
public EndpointTXEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void WhitelistAppendEventHandler(object sender, Bluegiga.BLE.Responses.System.WhitelistAppendEventArgs e);
public class WhitelistAppendEventArgs : EventArgs {
public readonly UInt16 result;
public WhitelistAppendEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void WhitelistRemoveEventHandler(object sender, Bluegiga.BLE.Responses.System.WhitelistRemoveEventArgs e);
public class WhitelistRemoveEventArgs : EventArgs {
public readonly UInt16 result;
public WhitelistRemoveEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void WhitelistClearEventHandler(object sender, Bluegiga.BLE.Responses.System.WhitelistClearEventArgs e);
public class WhitelistClearEventArgs : EventArgs {
public WhitelistClearEventArgs() { }
}
public delegate void EndpointRXEventHandler(object sender, Bluegiga.BLE.Responses.System.EndpointRXEventArgs e);
public class EndpointRXEventArgs : EventArgs {
public readonly UInt16 result;
public readonly Byte[] data;
public EndpointRXEventArgs(UInt16 result, Byte[] data) {
this.result = result;
this.data = data;
}
}
public delegate void EndpointSetWatermarksEventHandler(object sender, Bluegiga.BLE.Responses.System.EndpointSetWatermarksEventArgs e);
public class EndpointSetWatermarksEventArgs : EventArgs {
public readonly UInt16 result;
public EndpointSetWatermarksEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void AesSetkeyEventHandler(object sender, Bluegiga.BLE.Responses.System.AesSetkeyEventArgs e);
public class AesSetkeyEventArgs : EventArgs {
public AesSetkeyEventArgs() { }
}
public delegate void AesEncryptEventHandler(object sender, Bluegiga.BLE.Responses.System.AesEncryptEventArgs e);
public class AesEncryptEventArgs : EventArgs {
public readonly Byte[] data;
public AesEncryptEventArgs(Byte[] data) {
this.data = data;
}
}
public delegate void AesDecryptEventHandler(object sender, Bluegiga.BLE.Responses.System.AesDecryptEventArgs e);
public class AesDecryptEventArgs : EventArgs {
public readonly Byte[] data;
public AesDecryptEventArgs(Byte[] data) {
this.data = data;
}
}
}
namespace Flash {
public delegate void PSDefragEventHandler(object sender, Bluegiga.BLE.Responses.Flash.PSDefragEventArgs e);
public class PSDefragEventArgs : EventArgs {
public PSDefragEventArgs() { }
}
public delegate void PSDumpEventHandler(object sender, Bluegiga.BLE.Responses.Flash.PSDumpEventArgs e);
public class PSDumpEventArgs : EventArgs {
public PSDumpEventArgs() { }
}
public delegate void PSEraseAllEventHandler(object sender, Bluegiga.BLE.Responses.Flash.PSEraseAllEventArgs e);
public class PSEraseAllEventArgs : EventArgs {
public PSEraseAllEventArgs() { }
}
public delegate void PSSaveEventHandler(object sender, Bluegiga.BLE.Responses.Flash.PSSaveEventArgs e);
public class PSSaveEventArgs : EventArgs {
public readonly UInt16 result;
public PSSaveEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void PSLoadEventHandler(object sender, Bluegiga.BLE.Responses.Flash.PSLoadEventArgs e);
public class PSLoadEventArgs : EventArgs {
public readonly UInt16 result;
public readonly Byte[] value;
public PSLoadEventArgs(UInt16 result, Byte[] value) {
this.result = result;
this.value = value;
}
}
public delegate void PSEraseEventHandler(object sender, Bluegiga.BLE.Responses.Flash.PSEraseEventArgs e);
public class PSEraseEventArgs : EventArgs {
public PSEraseEventArgs() { }
}
public delegate void ErasePageEventHandler(object sender, Bluegiga.BLE.Responses.Flash.ErasePageEventArgs e);
public class ErasePageEventArgs : EventArgs {
public readonly UInt16 result;
public ErasePageEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void WriteDataEventHandler(object sender, Bluegiga.BLE.Responses.Flash.WriteDataEventArgs e);
public class WriteDataEventArgs : EventArgs {
public readonly UInt16 result;
public WriteDataEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void ReadDataEventHandler(object sender, Bluegiga.BLE.Responses.Flash.ReadDataEventArgs e);
public class ReadDataEventArgs : EventArgs {
public readonly Byte[] data;
public ReadDataEventArgs(Byte[] data) {
this.data = data;
}
}
}
namespace Attributes {
public delegate void WriteEventHandler(object sender, Bluegiga.BLE.Responses.Attributes.WriteEventArgs e);
public class WriteEventArgs : EventArgs {
public readonly UInt16 result;
public WriteEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void ReadEventHandler(object sender, Bluegiga.BLE.Responses.Attributes.ReadEventArgs e);
public class ReadEventArgs : EventArgs {
public readonly UInt16 handle;
public readonly UInt16 offset;
public readonly UInt16 result;
public readonly Byte[] value;
public ReadEventArgs(UInt16 handle, UInt16 offset, UInt16 result, Byte[] value) {
this.handle = handle;
this.offset = offset;
this.result = result;
this.value = value;
}
}
public delegate void ReadTypeEventHandler(object sender, Bluegiga.BLE.Responses.Attributes.ReadTypeEventArgs e);
public class ReadTypeEventArgs : EventArgs {
public readonly UInt16 handle;
public readonly UInt16 result;
public readonly Byte[] value;
public ReadTypeEventArgs(UInt16 handle, UInt16 result, Byte[] value) {
this.handle = handle;
this.result = result;
this.value = value;
}
}
public delegate void UserReadResponseEventHandler(object sender, Bluegiga.BLE.Responses.Attributes.UserReadResponseEventArgs e);
public class UserReadResponseEventArgs : EventArgs {
public UserReadResponseEventArgs() { }
}
public delegate void UserWriteResponseEventHandler(object sender, Bluegiga.BLE.Responses.Attributes.UserWriteResponseEventArgs e);
public class UserWriteResponseEventArgs : EventArgs {
public UserWriteResponseEventArgs() { }
}
public delegate void SendEventHandler(object sender, Bluegiga.BLE.Responses.Attributes.SendEventArgs e);
public class SendEventArgs : EventArgs {
public readonly UInt16 result;
public SendEventArgs(UInt16 result) {
this.result = result;
}
}
}
namespace Connection {
public delegate void DisconnectEventHandler(object sender, Bluegiga.BLE.Responses.Connection.DisconnectEventArgs e);
public class DisconnectEventArgs : EventArgs {
public readonly Byte connection;
public readonly UInt16 result;
public DisconnectEventArgs(Byte connection, UInt16 result) {
this.connection = connection;
this.result = result;
}
}
public delegate void GetRssiEventHandler(object sender, Bluegiga.BLE.Responses.Connection.GetRssiEventArgs e);
public class GetRssiEventArgs : EventArgs {
public readonly Byte connection;
public readonly SByte rssi;
public GetRssiEventArgs(Byte connection, SByte rssi) {
this.connection = connection;
this.rssi = rssi;
}
}
public delegate void UpdateEventHandler(object sender, Bluegiga.BLE.Responses.Connection.UpdateEventArgs e);
public class UpdateEventArgs : EventArgs {
public readonly Byte connection;
public readonly UInt16 result;
public UpdateEventArgs(Byte connection, UInt16 result) {
this.connection = connection;
this.result = result;
}
}
public delegate void VersionUpdateEventHandler(object sender, Bluegiga.BLE.Responses.Connection.VersionUpdateEventArgs e);
public class VersionUpdateEventArgs : EventArgs {
public readonly Byte connection;
public readonly UInt16 result;
public VersionUpdateEventArgs(Byte connection, UInt16 result) {
this.connection = connection;
this.result = result;
}
}
public delegate void ChannelMapGetEventHandler(object sender, Bluegiga.BLE.Responses.Connection.ChannelMapGetEventArgs e);
public class ChannelMapGetEventArgs : EventArgs {
public readonly Byte connection;
public readonly Byte[] map;
public ChannelMapGetEventArgs(Byte connection, Byte[] map) {
this.connection = connection;
this.map = map;
}
}
public delegate void ChannelMapSetEventHandler(object sender, Bluegiga.BLE.Responses.Connection.ChannelMapSetEventArgs e);
public class ChannelMapSetEventArgs : EventArgs {
public readonly Byte connection;
public readonly UInt16 result;
public ChannelMapSetEventArgs(Byte connection, UInt16 result) {
this.connection = connection;
this.result = result;
}
}
public delegate void FeaturesGetEventHandler(object sender, Bluegiga.BLE.Responses.Connection.FeaturesGetEventArgs e);
public class FeaturesGetEventArgs : EventArgs {
public readonly Byte connection;
public readonly UInt16 result;
public FeaturesGetEventArgs(Byte connection, UInt16 result) {
this.connection = connection;
this.result = result;
}
}
public delegate void GetStatusEventHandler(object sender, Bluegiga.BLE.Responses.Connection.GetStatusEventArgs e);
public class GetStatusEventArgs : EventArgs {
public readonly Byte connection;
public GetStatusEventArgs(Byte connection) {
this.connection = connection;
}
}
public delegate void RawTXEventHandler(object sender, Bluegiga.BLE.Responses.Connection.RawTXEventArgs e);
public class RawTXEventArgs : EventArgs {
public readonly Byte connection;
public RawTXEventArgs(Byte connection) {
this.connection = connection;
}
}
}
namespace ATTClient {
public delegate void FindByTypeValueEventHandler(object sender, Bluegiga.BLE.Responses.ATTClient.FindByTypeValueEventArgs e);
public class FindByTypeValueEventArgs : EventArgs {
public readonly Byte connection;
public readonly UInt16 result;
public FindByTypeValueEventArgs(Byte connection, UInt16 result) {
this.connection = connection;
this.result = result;
}
}
public delegate void ReadByGroupTypeEventHandler(object sender, Bluegiga.BLE.Responses.ATTClient.ReadByGroupTypeEventArgs e);
public class ReadByGroupTypeEventArgs : EventArgs {
public readonly Byte connection;
public readonly UInt16 result;
public ReadByGroupTypeEventArgs(Byte connection, UInt16 result) {
this.connection = connection;
this.result = result;
}
}
public delegate void ReadByTypeEventHandler(object sender, Bluegiga.BLE.Responses.ATTClient.ReadByTypeEventArgs e);
public class ReadByTypeEventArgs : EventArgs {
public readonly Byte connection;
public readonly UInt16 result;
public ReadByTypeEventArgs(Byte connection, UInt16 result) {
this.connection = connection;
this.result = result;
}
}
public delegate void FindInformationEventHandler(object sender, Bluegiga.BLE.Responses.ATTClient.FindInformationEventArgs e);
public class FindInformationEventArgs : EventArgs {
public readonly Byte connection;
public readonly UInt16 result;
public FindInformationEventArgs(Byte connection, UInt16 result) {
this.connection = connection;
this.result = result;
}
}
public delegate void ReadByHandleEventHandler(object sender, Bluegiga.BLE.Responses.ATTClient.ReadByHandleEventArgs e);
public class ReadByHandleEventArgs : EventArgs {
public readonly Byte connection;
public readonly UInt16 result;
public ReadByHandleEventArgs(Byte connection, UInt16 result) {
this.connection = connection;
this.result = result;
}
}
public delegate void AttributeWriteEventHandler(object sender, Bluegiga.BLE.Responses.ATTClient.AttributeWriteEventArgs e);
public class AttributeWriteEventArgs : EventArgs {
public readonly Byte connection;
public readonly UInt16 result;
public AttributeWriteEventArgs(Byte connection, UInt16 result) {
this.connection = connection;
this.result = result;
}
}
public delegate void WriteCommandEventHandler(object sender, Bluegiga.BLE.Responses.ATTClient.WriteCommandEventArgs e);
public class WriteCommandEventArgs : EventArgs {
public readonly Byte connection;
public readonly UInt16 result;
public WriteCommandEventArgs(Byte connection, UInt16 result) {
this.connection = connection;
this.result = result;
}
}
public delegate void IndicateConfirmEventHandler(object sender, Bluegiga.BLE.Responses.ATTClient.IndicateConfirmEventArgs e);
public class IndicateConfirmEventArgs : EventArgs {
public readonly UInt16 result;
public IndicateConfirmEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void ReadLongEventHandler(object sender, Bluegiga.BLE.Responses.ATTClient.ReadLongEventArgs e);
public class ReadLongEventArgs : EventArgs {
public readonly Byte connection;
public readonly UInt16 result;
public ReadLongEventArgs(Byte connection, UInt16 result) {
this.connection = connection;
this.result = result;
}
}
public delegate void PrepareWriteEventHandler(object sender, Bluegiga.BLE.Responses.ATTClient.PrepareWriteEventArgs e);
public class PrepareWriteEventArgs : EventArgs {
public readonly Byte connection;
public readonly UInt16 result;
public PrepareWriteEventArgs(Byte connection, UInt16 result) {
this.connection = connection;
this.result = result;
}
}
public delegate void ExecuteWriteEventHandler(object sender, Bluegiga.BLE.Responses.ATTClient.ExecuteWriteEventArgs e);
public class ExecuteWriteEventArgs : EventArgs {
public readonly Byte connection;
public readonly UInt16 result;
public ExecuteWriteEventArgs(Byte connection, UInt16 result) {
this.connection = connection;
this.result = result;
}
}
public delegate void ReadMultipleEventHandler(object sender, Bluegiga.BLE.Responses.ATTClient.ReadMultipleEventArgs e);
public class ReadMultipleEventArgs : EventArgs {
public readonly Byte connection;
public readonly UInt16 result;
public ReadMultipleEventArgs(Byte connection, UInt16 result) {
this.connection = connection;
this.result = result;
}
}
}
namespace SM {
public delegate void EncryptStartEventHandler(object sender, Bluegiga.BLE.Responses.SM.EncryptStartEventArgs e);
public class EncryptStartEventArgs : EventArgs {
public readonly Byte handle;
public readonly UInt16 result;
public EncryptStartEventArgs(Byte handle, UInt16 result) {
this.handle = handle;
this.result = result;
}
}
public delegate void SetBondableModeEventHandler(object sender, Bluegiga.BLE.Responses.SM.SetBondableModeEventArgs e);
public class SetBondableModeEventArgs : EventArgs {
public SetBondableModeEventArgs() { }
}
public delegate void DeleteBondingEventHandler(object sender, Bluegiga.BLE.Responses.SM.DeleteBondingEventArgs e);
public class DeleteBondingEventArgs : EventArgs {
public readonly UInt16 result;
public DeleteBondingEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void SetParametersEventHandler(object sender, Bluegiga.BLE.Responses.SM.SetParametersEventArgs e);
public class SetParametersEventArgs : EventArgs {
public SetParametersEventArgs() { }
}
public delegate void PasskeyEntryEventHandler(object sender, Bluegiga.BLE.Responses.SM.PasskeyEntryEventArgs e);
public class PasskeyEntryEventArgs : EventArgs {
public readonly UInt16 result;
public PasskeyEntryEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void GetBondsEventHandler(object sender, Bluegiga.BLE.Responses.SM.GetBondsEventArgs e);
public class GetBondsEventArgs : EventArgs {
public readonly Byte bonds;
public GetBondsEventArgs(Byte bonds) {
this.bonds = bonds;
}
}
public delegate void SetOobDataEventHandler(object sender, Bluegiga.BLE.Responses.SM.SetOobDataEventArgs e);
public class SetOobDataEventArgs : EventArgs {
public SetOobDataEventArgs() { }
}
public delegate void WhitelistBondsEventHandler(object sender, Bluegiga.BLE.Responses.SM.WhitelistBondsEventArgs e);
public class WhitelistBondsEventArgs : EventArgs {
public readonly UInt16 result;
public readonly Byte count;
public WhitelistBondsEventArgs(UInt16 result, Byte count) {
this.result = result;
this.count = count;
}
}
}
namespace GAP {
public delegate void SetPrivacyFlagsEventHandler(object sender, Bluegiga.BLE.Responses.GAP.SetPrivacyFlagsEventArgs e);
public class SetPrivacyFlagsEventArgs : EventArgs {
public SetPrivacyFlagsEventArgs() { }
}
public delegate void SetModeEventHandler(object sender, Bluegiga.BLE.Responses.GAP.SetModeEventArgs e);
public class SetModeEventArgs : EventArgs {
public readonly UInt16 result;
public SetModeEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void DiscoverEventHandler(object sender, Bluegiga.BLE.Responses.GAP.DiscoverEventArgs e);
public class DiscoverEventArgs : EventArgs {
public readonly UInt16 result;
public DiscoverEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void ConnectDirectEventHandler(object sender, Bluegiga.BLE.Responses.GAP.ConnectDirectEventArgs e);
public class ConnectDirectEventArgs : EventArgs {
public readonly UInt16 result;
public readonly Byte connection_handle;
public ConnectDirectEventArgs(UInt16 result, Byte connection_handle) {
this.result = result;
this.connection_handle = connection_handle;
}
}
public delegate void EndProcedureEventHandler(object sender, Bluegiga.BLE.Responses.GAP.EndProcedureEventArgs e);
public class EndProcedureEventArgs : EventArgs {
public readonly UInt16 result;
public EndProcedureEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void ConnectSelectiveEventHandler(object sender, Bluegiga.BLE.Responses.GAP.ConnectSelectiveEventArgs e);
public class ConnectSelectiveEventArgs : EventArgs {
public readonly UInt16 result;
public readonly Byte connection_handle;
public ConnectSelectiveEventArgs(UInt16 result, Byte connection_handle) {
this.result = result;
this.connection_handle = connection_handle;
}
}
public delegate void SetFilteringEventHandler(object sender, Bluegiga.BLE.Responses.GAP.SetFilteringEventArgs e);
public class SetFilteringEventArgs : EventArgs {
public readonly UInt16 result;
public SetFilteringEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void SetScanParametersEventHandler(object sender, Bluegiga.BLE.Responses.GAP.SetScanParametersEventArgs e);
public class SetScanParametersEventArgs : EventArgs {
public readonly UInt16 result;
public SetScanParametersEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void SetAdvParametersEventHandler(object sender, Bluegiga.BLE.Responses.GAP.SetAdvParametersEventArgs e);
public class SetAdvParametersEventArgs : EventArgs {
public readonly UInt16 result;
public SetAdvParametersEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void SetAdvDataEventHandler(object sender, Bluegiga.BLE.Responses.GAP.SetAdvDataEventArgs e);
public class SetAdvDataEventArgs : EventArgs {
public readonly UInt16 result;
public SetAdvDataEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void SetDirectedConnectableModeEventHandler(object sender, Bluegiga.BLE.Responses.GAP.SetDirectedConnectableModeEventArgs e);
public class SetDirectedConnectableModeEventArgs : EventArgs {
public readonly UInt16 result;
public SetDirectedConnectableModeEventArgs(UInt16 result) {
this.result = result;
}
}
}
namespace Hardware {
public delegate void IOPortConfigIrqEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.IOPortConfigIrqEventArgs e);
public class IOPortConfigIrqEventArgs : EventArgs {
public readonly UInt16 result;
public IOPortConfigIrqEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void SetSoftTimerEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.SetSoftTimerEventArgs e);
public class SetSoftTimerEventArgs : EventArgs {
public readonly UInt16 result;
public SetSoftTimerEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void ADCReadEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.ADCReadEventArgs e);
public class ADCReadEventArgs : EventArgs {
public readonly UInt16 result;
public ADCReadEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void IOPortConfigDirectionEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.IOPortConfigDirectionEventArgs e);
public class IOPortConfigDirectionEventArgs : EventArgs {
public readonly UInt16 result;
public IOPortConfigDirectionEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void IOPortConfigFunctionEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.IOPortConfigFunctionEventArgs e);
public class IOPortConfigFunctionEventArgs : EventArgs {
public readonly UInt16 result;
public IOPortConfigFunctionEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void IOPortConfigPullEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.IOPortConfigPullEventArgs e);
public class IOPortConfigPullEventArgs : EventArgs {
public readonly UInt16 result;
public IOPortConfigPullEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void IOPortWriteEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.IOPortWriteEventArgs e);
public class IOPortWriteEventArgs : EventArgs {
public readonly UInt16 result;
public IOPortWriteEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void IOPortReadEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.IOPortReadEventArgs e);
public class IOPortReadEventArgs : EventArgs {
public readonly UInt16 result;
public readonly Byte port;
public readonly Byte data;
public IOPortReadEventArgs(UInt16 result, Byte port, Byte data) {
this.result = result;
this.port = port;
this.data = data;
}
}
public delegate void SPIConfigEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.SPIConfigEventArgs e);
public class SPIConfigEventArgs : EventArgs {
public readonly UInt16 result;
public SPIConfigEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void SPITransferEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.SPITransferEventArgs e);
public class SPITransferEventArgs : EventArgs {
public readonly UInt16 result;
public readonly Byte channel;
public readonly Byte[] data;
public SPITransferEventArgs(UInt16 result, Byte channel, Byte[] data) {
this.result = result;
this.channel = channel;
this.data = data;
}
}
public delegate void I2CReadEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.I2CReadEventArgs e);
public class I2CReadEventArgs : EventArgs {
public readonly UInt16 result;
public readonly Byte[] data;
public I2CReadEventArgs(UInt16 result, Byte[] data) {
this.result = result;
this.data = data;
}
}
public delegate void I2CWriteEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.I2CWriteEventArgs e);
public class I2CWriteEventArgs : EventArgs {
public readonly Byte written;
public I2CWriteEventArgs(Byte written) {
this.written = written;
}
}
public delegate void SetTxpowerEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.SetTxpowerEventArgs e);
public class SetTxpowerEventArgs : EventArgs {
public SetTxpowerEventArgs() { }
}
public delegate void TimerComparatorEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.TimerComparatorEventArgs e);
public class TimerComparatorEventArgs : EventArgs {
public readonly UInt16 result;
public TimerComparatorEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void IOPortIrqEnableEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.IOPortIrqEnableEventArgs e);
public class IOPortIrqEnableEventArgs : EventArgs {
public readonly UInt16 result;
public IOPortIrqEnableEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void IOPortIrqDirectionEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.IOPortIrqDirectionEventArgs e);
public class IOPortIrqDirectionEventArgs : EventArgs {
public readonly UInt16 result;
public IOPortIrqDirectionEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void AnalogComparatorEnableEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.AnalogComparatorEnableEventArgs e);
public class AnalogComparatorEnableEventArgs : EventArgs {
public AnalogComparatorEnableEventArgs() { }
}
public delegate void AnalogComparatorReadEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.AnalogComparatorReadEventArgs e);
public class AnalogComparatorReadEventArgs : EventArgs {
public readonly UInt16 result;
public readonly Byte output;
public AnalogComparatorReadEventArgs(UInt16 result, Byte output) {
this.result = result;
this.output = output;
}
}
public delegate void AnalogComparatorConfigIrqEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.AnalogComparatorConfigIrqEventArgs e);
public class AnalogComparatorConfigIrqEventArgs : EventArgs {
public readonly UInt16 result;
public AnalogComparatorConfigIrqEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void SetRxgainEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.SetRxgainEventArgs e);
public class SetRxgainEventArgs : EventArgs {
public SetRxgainEventArgs() { }
}
public delegate void UsbEnableEventHandler(object sender, Bluegiga.BLE.Responses.Hardware.UsbEnableEventArgs e);
public class UsbEnableEventArgs : EventArgs {
public readonly UInt16 result;
public UsbEnableEventArgs(UInt16 result) {
this.result = result;
}
}
}
namespace Test {
public delegate void PHYTXEventHandler(object sender, Bluegiga.BLE.Responses.Test.PHYTXEventArgs e);
public class PHYTXEventArgs : EventArgs {
public PHYTXEventArgs() { }
}
public delegate void PHYRXEventHandler(object sender, Bluegiga.BLE.Responses.Test.PHYRXEventArgs e);
public class PHYRXEventArgs : EventArgs {
public PHYRXEventArgs() { }
}
public delegate void PHYEndEventHandler(object sender, Bluegiga.BLE.Responses.Test.PHYEndEventArgs e);
public class PHYEndEventArgs : EventArgs {
public readonly UInt16 counter;
public PHYEndEventArgs(UInt16 counter) {
this.counter = counter;
}
}
public delegate void PHYResetEventHandler(object sender, Bluegiga.BLE.Responses.Test.PHYResetEventArgs e);
public class PHYResetEventArgs : EventArgs {
public PHYResetEventArgs() { }
}
public delegate void GetChannelMapEventHandler(object sender, Bluegiga.BLE.Responses.Test.GetChannelMapEventArgs e);
public class GetChannelMapEventArgs : EventArgs {
public readonly Byte[] channel_map;
public GetChannelMapEventArgs(Byte[] channel_map) {
this.channel_map = channel_map;
}
}
public delegate void DebugEventHandler(object sender, Bluegiga.BLE.Responses.Test.DebugEventArgs e);
public class DebugEventArgs : EventArgs {
public readonly Byte[] output;
public DebugEventArgs(Byte[] output) {
this.output = output;
}
}
public delegate void ChannelModeEventHandler(object sender, Bluegiga.BLE.Responses.Test.ChannelModeEventArgs e);
public class ChannelModeEventArgs : EventArgs {
public ChannelModeEventArgs() { }
}
}
namespace DFU {
public delegate void ResetEventHandler(object sender, Bluegiga.BLE.Responses.DFU.ResetEventArgs e);
public class ResetEventArgs : EventArgs {
public ResetEventArgs() { }
}
public delegate void FlashSetAddressEventHandler(object sender, Bluegiga.BLE.Responses.DFU.FlashSetAddressEventArgs e);
public class FlashSetAddressEventArgs : EventArgs {
public readonly UInt16 result;
public FlashSetAddressEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void FlashUploadEventHandler(object sender, Bluegiga.BLE.Responses.DFU.FlashUploadEventArgs e);
public class FlashUploadEventArgs : EventArgs {
public readonly UInt16 result;
public FlashUploadEventArgs(UInt16 result) {
this.result = result;
}
}
public delegate void FlashUploadFinishEventHandler(object sender, Bluegiga.BLE.Responses.DFU.FlashUploadFinishEventArgs e);
public class FlashUploadFinishEventArgs : EventArgs {
public readonly UInt16 result;
public FlashUploadFinishEventArgs(UInt16 result) {
this.result = result;
}
}
}
}
namespace Events {
namespace System {
public delegate void BootEventHandler(object sender, Bluegiga.BLE.Events.System.BootEventArgs e);
public class BootEventArgs : EventArgs {
public readonly UInt16 major;
public readonly UInt16 minor;
public readonly UInt16 patch;
public readonly UInt16 build;
public readonly UInt16 ll_version;
public readonly Byte protocol_version;
public readonly Byte hw;
public BootEventArgs(UInt16 major, UInt16 minor, UInt16 patch, UInt16 build, UInt16 ll_version, Byte protocol_version, Byte hw) {
this.major = major;
this.minor = minor;
this.patch = patch;
this.build = build;
this.ll_version = ll_version;
this.protocol_version = protocol_version;
this.hw = hw;
}
}
public delegate void DebugEventHandler(object sender, Bluegiga.BLE.Events.System.DebugEventArgs e);
public class DebugEventArgs : EventArgs {
public readonly Byte[] data;
public DebugEventArgs(Byte[] data) {
this.data = data;
}
}
public delegate void EndpointWatermarkRXEventHandler(object sender, Bluegiga.BLE.Events.System.EndpointWatermarkRXEventArgs e);
public class EndpointWatermarkRXEventArgs : EventArgs {
public readonly Byte endpoint;
public readonly Byte data;
public EndpointWatermarkRXEventArgs(Byte endpoint, Byte data) {
this.endpoint = endpoint;
this.data = data;
}
}
public delegate void EndpointWatermarkTXEventHandler(object sender, Bluegiga.BLE.Events.System.EndpointWatermarkTXEventArgs e);
public class EndpointWatermarkTXEventArgs : EventArgs {
public readonly Byte endpoint;
public readonly Byte data;
public EndpointWatermarkTXEventArgs(Byte endpoint, Byte data) {
this.endpoint = endpoint;
this.data = data;
}
}
public delegate void ScriptFailureEventHandler(object sender, Bluegiga.BLE.Events.System.ScriptFailureEventArgs e);
public class ScriptFailureEventArgs : EventArgs {
public readonly UInt16 address;
public readonly UInt16 reason;
public ScriptFailureEventArgs(UInt16 address, UInt16 reason) {
this.address = address;
this.reason = reason;
}
}
public delegate void NoLicenseKeyEventHandler(object sender, Bluegiga.BLE.Events.System.NoLicenseKeyEventArgs e);
public class NoLicenseKeyEventArgs : EventArgs {
public NoLicenseKeyEventArgs() { }
}
public delegate void ProtocolErrorEventHandler(object sender, Bluegiga.BLE.Events.System.ProtocolErrorEventArgs e);
public class ProtocolErrorEventArgs : EventArgs {
public readonly UInt16 reason;
public ProtocolErrorEventArgs(UInt16 reason) {
this.reason = reason;
}
}