Visioscan Set SDK Libraries 1.0.14
Visioscan Set SDK Help documentation file for C++ and C++/CLI
 
Loading...
Searching...
No Matches
WNavigationSensor.h
1#pragma once
2
3#include <NavigationSensor.h>
4#include "WFilterType.h"
5#include <List>
6
7#include <CommunicationException.h>
8#include <SensorErrorException.h>
9#include <ThreadCreationException.h>
10#include <BadAcknowledgmentException.h>
11#include <CommunicationException.h>
12
13using namespace WBase;
14using namespace WCommunication;
15using namespace WToolboxException;
16using namespace WEnumerations;
17using namespace System::Collections;
18using namespace System::Collections::Generic;
19
20public ref class WNavigationSensor :
21 public WRawDataSensor
22{
23public:
25 this->_sensor = (BaseSensor*)new NavigationSensor();
26 }
27
28 WNavigationSensor(WBaseCommunication^ pcomm) : WRawDataSensor(pcomm) {
29 _sensor = (BaseSensor*)new NavigationSensor(pcomm->__nativeCommunication);
30 Communication = pcomm;
31 }
32
34 delete(_sensor);
35 }
36
40 void Initialize() new {
41 _sensor->Initialize();
42 }
43
45 try {
46 WFilterType^ toReturn = gcnew WFilterType();
47 FilterType toFetch = ((NavigationSensor*)_sensor)->GetFilterType();
48 switch (toFetch.GetFilterMode()) {
49 case MEDIAN_FILTER:
50 toReturn->FilterTypeValue = FilterMode::Median;
51 break;
52 case AVERAGE_FILTER:
53 toReturn->FilterTypeValue = FilterMode::Average;
54 break;
55 case MAX_FILTER:
56 toReturn->FilterTypeValue = FilterMode::Max;
57 break;
58 }
59
60 toReturn->NumH = toFetch.GetNumH();
61 toReturn->NumS = toFetch.GetNumS();
62
63 return toReturn;
64 }
66 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
67 throw toThrow;
68 }
69 catch (CommunicationException e) {
70 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
71 toThrow->ErrorCode = e.GetErrorCode();
72 throw toThrow;
73 }
74 catch (SensorErrorException e) {
75 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
76 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
77 throw toThrow;
78
79 }
80 catch (ThreadCreationException e) {
81 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
82 throw toThrow;
83 }
84 }
85
87 try {
88 FilterType toSet;
89
90 switch (pFilterType->FilterTypeValue) {
91 case FilterMode::Median:
92 toSet.SetFilterMode(MEDIAN_FILTER);
93 break;
94 case FilterMode::Average:
95 toSet.SetFilterMode(AVERAGE_FILTER);
96 break;
97 case FilterMode::Max:
98 toSet.SetFilterMode(MAX_FILTER);
99 break;
100 }
101
102 toSet.SetNumH(pFilterType->NumH);
103 toSet.SetNumS(pFilterType->NumS);
104
105 return toManagedInstance(&((NavigationSensor*)_sensor)->SetFilterType(toSet));
106 }
108 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
109 throw toThrow;
110 }
111 catch (CommunicationException e) {
112 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
113 toThrow->ErrorCode = e.GetErrorCode();
114 throw toThrow;
115 }
116 catch (SensorErrorException e) {
117 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
118 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
119 throw toThrow;
120
121 }
122 catch (ThreadCreationException e) {
123 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
124 throw toThrow;
125 }
126 }
127
133 try {
134 ANGULAR_RESOLUTION actual = ((NavigationSensor*)_sensor)->GetAngularResolution();
135 if (actual == ZERO_TO_ZERO_POINT_ONE_AT_FOURTY_HZ) {
136 return AngularResolution::ZeroToZeroPointOneAtFourtyHz;
137 }
138 else if (actual == ZERO_TO_ZERO_POINT_TWO_AT_EIGHTY_HZ) {
139 return AngularResolution::ZeroToZeroPointTwoAtEightyHz;
140 }
141 else if (actual == ZERO_TO_ZERO_POINT_ZERO_FIVE_AT_TWENTY_HZ) {
142 return AngularResolution::ZeroToZeroPointZeroFiveAtTwentyHz;
143 }
144 else if (actual == ZERO_TO_ZERO_POINT_ZERO_TWENTYFIVE_AT_TEN_HZ) {
145 return AngularResolution::ZeroToZeroPointZeroTwoFiveAtTenHz;
146 }
147 }
149 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
150 throw toThrow;
151 }
152 catch (CommunicationException e) {
153 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
154 toThrow->ErrorCode = e.GetErrorCode();
155 throw toThrow;
156 }
157 catch (SensorErrorException e) {
158 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
159 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
160 throw toThrow;
161
162 }
163 catch (ThreadCreationException e) {
164 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
165 throw toThrow;
166 }
167 }
168
169
176 try {
177 ANGULAR_RESOLUTION toSet = -1;
178 if (pResolution == AngularResolution::ZeroToZeroPointOneAtFourtyHz) {
179 toSet = ZERO_TO_ZERO_POINT_ONE_AT_FOURTY_HZ;
180 }
181 else if(pResolution == AngularResolution::ZeroToZeroPointTwoAtEightyHz) {
182 toSet = ZERO_TO_ZERO_POINT_TWO_AT_EIGHTY_HZ;
183 }
184 else if (pResolution == AngularResolution::ZeroToZeroPointZeroFiveAtTwentyHz) {
185 toSet = ZERO_TO_ZERO_POINT_ZERO_FIVE_AT_TWENTY_HZ;
186 }
187 else if (pResolution == AngularResolution::ZeroToZeroPointZeroTwoFiveAtTenHz) {
188 toSet = ZERO_TO_ZERO_POINT_ZERO_TWENTYFIVE_AT_TEN_HZ;
189 }
190
191 return toManagedInstance(&((NavigationSensor*)_sensor)->SetAngularResolution(toSet));
192 }
194 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
195 throw toThrow;
196 }
197 catch (CommunicationException e) {
198 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
199 toThrow->ErrorCode = e.GetErrorCode();
200 throw toThrow;
201 }
202 catch (SensorErrorException e) {
203 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
204 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
205 throw toThrow;
206
207 }
208 catch (ThreadCreationException e) {
209 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
210 throw toThrow;
211 }
212 }
213
219 try {
220 PAGE_INDEX actual = ((NavigationSensor*)_sensor)->GetDisplayPageIndex();
221 if (actual == CUSTOMIZE_LOGO_PAGE) {
222 return DisplayPageIndex::CustomLogoPage;
223 }
224 else if (actual == OPERATING_STATUS_PAGE) {
225 return DisplayPageIndex::OperatingStatus;
226 }
227 else if (actual == WMS_STATUS_PAGE) {
228 return DisplayPageIndex::WmsStatus;
229 }
230 else if (actual == ETH_USB_CONNECT_STATUS_PAGE) {
231 return DisplayPageIndex::EthUsbConnectStatus;
232 }
233 else if (actual == NETWORK_INFORMATION_PAGE) {
234 return DisplayPageIndex::NetworkInfo;
235 }
236 else if (actual == BLUETHOOT_CONNECTION_PAGE) {
237 return DisplayPageIndex::BluethootConnection;
238 }
239 }
241 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
242 throw toThrow;
243 }
244 catch (CommunicationException e) {
245 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
246 toThrow->ErrorCode = e.GetErrorCode();
247 throw toThrow;
248 }
249 catch (SensorErrorException e) {
250 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
251 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
252 throw toThrow;
253
254 }
255 catch (ThreadCreationException e) {
256 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
257 throw toThrow;
258 }
259 }
260
267 try {
268 PAGE_INDEX toSet = -1;
269 if (pPageIndex == DisplayPageIndex::CustomLogoPage) {
270 toSet = CUSTOMIZE_LOGO_PAGE;
271 }
272 else if (pPageIndex == DisplayPageIndex::OperatingStatus) {
273 toSet = OPERATING_STATUS_PAGE;
274 }
275 else if (pPageIndex == DisplayPageIndex::WmsStatus) {
276 toSet = WMS_STATUS_PAGE;
277 }
278 else if (pPageIndex == DisplayPageIndex::EthUsbConnectStatus) {
279 toSet = ETH_USB_CONNECT_STATUS_PAGE;
280 }
281 else if (pPageIndex == DisplayPageIndex::NetworkInfo) {
282 toSet = NETWORK_INFORMATION_PAGE;
283 }
284 else if (pPageIndex == DisplayPageIndex::BluethootConnection) {
285 toSet = BLUETHOOT_CONNECTION_PAGE;
286 }
287
288 return toManagedInstance(&((NavigationSensor*)_sensor)->SetDisplayPageIndex(toSet));
289 }
291 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
292 throw toThrow;
293 }
294 catch (CommunicationException e) {
295 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
296 toThrow->ErrorCode = e.GetErrorCode();
297 throw toThrow;
298 }
299 catch (SensorErrorException e) {
300 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
301 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
302 throw toThrow;
303
304 }
305 catch (ThreadCreationException e) {
306 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
307 throw toThrow;
308 }
309 }
310
316 try {
317 PAGE_DIRECTION actual = ((NavigationSensor*)_sensor)->GetDisplayPageDirection();
318 if (actual == NORMAL) {
319 return PageDirection::Normal;
320 }
321 else if (actual == UPSIDE_DOWN) {
322 return PageDirection::UpsideDown;
323 }
324 }
326 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
327 throw toThrow;
328 }
329 catch (CommunicationException e) {
330 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
331 toThrow->ErrorCode = e.GetErrorCode();
332 throw toThrow;
333 }
334 catch (SensorErrorException e) {
335 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
336 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
337 throw toThrow;
338
339 }
340 catch (ThreadCreationException e) {
341 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
342 throw toThrow;
343 }
344 }
345
352 try {
353 PAGE_DIRECTION toSet = -1;
354 if (pPageDirection == PageDirection::Normal) {
355 toSet = NORMAL;
356 }
357 else if (pPageDirection == PageDirection::UpsideDown) {
358 toSet = UPSIDE_DOWN;
359 }
360
362 }
364 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
365 throw toThrow;
366 }
367 catch (CommunicationException e) {
368 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
369 toThrow->ErrorCode = e.GetErrorCode();
370 throw toThrow;
371 }
372 catch (SensorErrorException e) {
373 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
374 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
375 throw toThrow;
376
377 }
378 catch (ThreadCreationException e) {
379 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
380 throw toThrow;
381 }
382 }
383
389 try {
390 DISPLAY_MODE actual = ((NavigationSensor*)_sensor)->GetDisplayMode();
391 if (actual == NORMAL_MODE) {
392 return DisplayMode::Normal;
393 }
394 else if (actual == ON_MODE) {
395 return DisplayMode::On;
396 }
397 else if (actual == OFF_MODE) {
398 return DisplayMode::Off;
399 }
400 }
402 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
403 throw toThrow;
404 }
405 catch (CommunicationException e) {
406 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
407 toThrow->ErrorCode = e.GetErrorCode();
408 throw toThrow;
409 }
410 catch (SensorErrorException e) {
411 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
412 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
413 throw toThrow;
414
415 }
416 catch (ThreadCreationException e) {
417 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
418 throw toThrow;
419 }
420 }
421
422
429 try {
430 DISPLAY_MODE toSet = -1;
431 if (pdisplayMode == DisplayMode::Normal) {
432 toSet = NORMAL;
433 }
434 else if (pdisplayMode == DisplayMode::On) {
435 toSet = ON_MODE;
436 }
437 else if (pdisplayMode == DisplayMode::Off) {
438 toSet = OFF_MODE;
439 }
440
441 return toManagedInstance(&((NavigationSensor*)_sensor)->SetDisplayMode(toSet));
442 }
444 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
445 throw toThrow;
446 }
447 catch (CommunicationException e) {
448 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
449 toThrow->ErrorCode = e.GetErrorCode();
450 throw toThrow;
451 }
452 catch (SensorErrorException e) {
453 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
454 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
455 throw toThrow;
456
457 }
458 catch (ThreadCreationException e) {
459 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
460 throw toThrow;
461 }
462 }
463
468 List<List<UInt16>^>^ GetLogoImage() {
469 try {
470 List<List<UInt16>^>^ toReturn = gcnew List<List<UInt16>^>();
471
472 vector<LOGO_IMAGE_SEGMENT> sensorImage = ((NavigationSensor*)_sensor)->GetLogoImage();
473
474 for (int segment = 0; segment < IMAGE_SEGMENT_SIZE; segment++) {
475 List<UInt16>^ segmentOfPixelToAdd = gcnew List<UInt16>();
476 for (int pixel = 0; pixel < PIXELS_PER_SEGMENT; pixel++) {
477 segmentOfPixelToAdd->Add( sensorImage[segment][pixel]);
478 }
479 toReturn->Add(segmentOfPixelToAdd);
480 }
481
482 return toReturn;
483 }
485 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
486 throw toThrow;
487 }
488 catch (CommunicationException e) {
489 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
490 toThrow->ErrorCode = e.GetErrorCode();
491 throw toThrow;
492 }
493 catch (SensorErrorException e) {
494 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
495 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
496 throw toThrow;
497
498 }
499 catch (ThreadCreationException e) {
500 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
501 throw toThrow;
502 }
503 }
504
505
511 WConfigurationResult^ SetLogoImage(List<List<UInt16>^>^ logoToFetch) {
512 WConfigurationResult^ toReturn;
513 vector<LOGO_IMAGE_SEGMENT> toFetch;
514
515 try {
516 for each (List<UInt16>^ segment in logoToFetch) {
517 vector<IMAGE_PIXEL> segmentToFetch;
518
519 for each (UInt16 pixel in segment) {
520 segmentToFetch.push_back(pixel);
521 }
522
523 toFetch.push_back(segmentToFetch);
524 }
525 return toManagedInstance(&((NavigationSensor*)_sensor)->SetLogoImage(toFetch));
526 }
528 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
529 throw toThrow;
530 }
531 catch (CommunicationException e) {
532 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
533 toThrow->ErrorCode = e.GetErrorCode();
534 throw toThrow;
535 }
536 catch (SensorErrorException e) {
537 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
538 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
539 throw toThrow;
540
541 }
542 catch (ThreadCreationException e) {
543 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
544 throw toThrow;
545 }
546
547
548 return toReturn;
549 }
555
556 try {
557 return toManagedInstance(&((NavigationSensor*)_sensor)->ResetLogoImage());
558 }
560 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
561 throw toThrow;
562 }
563 catch (CommunicationException e) {
564 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
565 toThrow->ErrorCode = e.GetErrorCode();
566 throw toThrow;
567 }
568 catch (SensorErrorException e) {
569 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
570 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
571 throw toThrow;
572
573 }
574 catch (ThreadCreationException e) {
575 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
576 throw toThrow;
577 }
578 }
583 List<unsigned int>^ GetWms() {
584 try {
585 vector<unsigned int> actual = ((NavigationSensor*)_sensor)->GetWms();
586 List<unsigned int>^ toReturn = gcnew List<unsigned int>();
587
588 for (int i = 0; i < actual.size(); i++) {
589
590 toReturn->Add(actual[i]);
591 }
592
593 return toReturn;
594 }
596 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
597 throw toThrow;
598 }
599 catch (CommunicationException e) {
600 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
601 toThrow->ErrorCode = e.GetErrorCode();
602 throw toThrow;
603 }
604 catch (SensorErrorException e) {
605 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
606 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
607 throw toThrow;
608
609 }
610 catch (ThreadCreationException e) {
611 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
612 throw toThrow;
613 }
614 }
615
621 try {
622 SensorLeds actual = ((NavigationSensor*)_sensor)->GetSensorLeds();
623 WSensorLeds^ toReturn = gcnew WSensorLeds();
624
625 toReturn->LogoLed = actual.GetLogoLed();
626
627 return toReturn;
628 }
630 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
631 throw toThrow;
632 }
633 catch (CommunicationException e) {
634 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
635 toThrow->ErrorCode = e.GetErrorCode();
636 throw toThrow;
637 }
638 catch (SensorErrorException e) {
639 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
640 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
641 throw toThrow;
642
643 }
644 catch (ThreadCreationException e) {
645 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
646 throw toThrow;
647 }
648 }
649
650
657 try {
658 SensorLeds toSet;
659
660 toSet.SetStatusLed(pLeds->StatusLed);
661
662 return toManagedInstance(&((NavigationSensor*)_sensor)->SetSensorLeds(toSet));
663 }
665 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
666 throw toThrow;
667 }
668 catch (CommunicationException e) {
669 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
670 toThrow->ErrorCode = e.GetErrorCode();
671 throw toThrow;
672 }
673 catch (SensorErrorException e) {
674 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
675 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
676 throw toThrow;
677
678 }
679 catch (ThreadCreationException e) {
680 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
681 throw toThrow;
682 }
683 }
684
685
691 try {
692 WSensorLamps^ toReturn = gcnew WSensorLamps();
693 SensorLamps actual = ((NavigationSensor*)_sensor)->GetSensorLamps();
694
695 toReturn->Led1 = (LedColor)actual.GetLed1();
696 toReturn->Led2 = LedColor::Black;
697 toReturn->Led3 = LedColor::Black;
698 toReturn->Led4 = LedColor::Black;
699
700 return toReturn;
701 }
703 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
704 throw toThrow;
705 }
706 catch (CommunicationException e) {
707 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
708 toThrow->ErrorCode = e.GetErrorCode();
709 throw toThrow;
710 }
711 catch (SensorErrorException e) {
712 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
713 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
714 throw toThrow;
715
716 }
717 catch (ThreadCreationException e) {
718 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
719 throw toThrow;
720 }
721 }
722
728 try {
729 ContaminationStatus toFetch = ((NavigationSensor*)_sensor)->GetContaminationStatus();
730
731 WContaminationStatus^ toReturn = gcnew WContaminationStatus();
732 toReturn->Z1 = toFetch.GetZ1();
733 toReturn->Z2 = toFetch.GetZ2();
734 toReturn->Z3 = toFetch.GetZ3();
735 toReturn->Z4 = toFetch.GetZ4();
736 toReturn->Z5 = toFetch.GetZ5();
737 toReturn->Z6 = toFetch.GetZ6();
738
739 return toReturn;
740 }
742 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
743 throw toThrow;
744 }
745 catch (CommunicationException e) {
746 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
747 toThrow->ErrorCode = e.GetErrorCode();
748 throw toThrow;
749 }
750 catch (SensorErrorException e) {
751 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
752 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
753 throw toThrow;
754
755 }
756 catch (ThreadCreationException e) {
757 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
758 throw toThrow;
759 }
760 }
761};
762
Definition WBadAcknowledgmentException.h:3
Definition WBaseCommunication.h:25
Definition WEnums.h:3
PageDirection
Definition WEnums.h:11
DisplayPageIndex
Definition WEnums.h:10
DisplayMode
Definition WEnums.h:12
AngularResolution
Definition WEnums.h:6
Definition WEthernetCommunication.h:5
Helper to encapsulate the the raw data error.
Definition FilterType.h:19
unsigned int GetNumH()
Gets historical spots number at current position.
Definition FilterType.cpp:42
void SetNumS(unsigned int numS)
Sets historical spots number on both sides.
Definition FilterType.cpp:66
void SetNumH(unsigned int numH)
Sets historical spots number at current position.
Definition FilterType.cpp:50
FILTER_MODE GetFilterMode()
Gets the filter mode.
Definition FilterType.cpp:26
unsigned int GetNumS()
Gets historical spots number on both sides.
Definition FilterType.cpp:58
void SetFilterMode(FILTER_MODE filterMode)
Sets the filter mode.
Definition FilterType.cpp:34
Definition NavigationSensor.h:42
Definition WFilterType.h:9
property unsigned int NumH
Definition WFilterType.h:26
Definition WNavigationSensor.h:22
WFilterType GetFilterType()
Definition WNavigationSensor.h:44
~WNavigationSensor()
Definition WNavigationSensor.h:33
WSensorLeds GetSensorLeds() new
Gets the sensor's status led.
Definition WNavigationSensor.h:620
WContaminationStatus GetContaminationStatus() new
Gets the contamination status.
Definition WNavigationSensor.h:727
WSensorLamps GetSensorLamps()
Gets the sensor lamps status.
Definition WNavigationSensor.h:690
WConfigurationResult SetDisplayMode(DisplayMode pdisplayMode)
sets the display mode (Accepted values: Normal, On, Off)
Definition WNavigationSensor.h:428
WNavigationSensor(WBaseCommunication^ pcomm)
Definition WNavigationSensor.h:28
PageDirection GetDisplayPageDirection()
Returns the display page direction.
Definition WNavigationSensor.h:315
WNavigationSensor()
Definition WNavigationSensor.h:24
AngularResolution GetAngularResolution() new
Gets the angular resolution.
Definition WNavigationSensor.h:132
List< List< UInt16 >^> GetLogoImage()
Returns the sensor's logo image.
Definition WNavigationSensor.h:468
DisplayPageIndex GetDisplayPageIndex()
Returns the display page index.
Definition WNavigationSensor.h:218
List< unsigned int > GetWms()
Returns the window monitoring system of each sector (SECTORS_COUNT sectors - 132 -)
Definition WNavigationSensor.h:583
WConfigurationResult SetAngularResolution(AngularResolution pResolution) new
Sets the angle resolution. Can be either AngularResolution::ZeroToZeroPointOneAtFourtyHz,...
Definition WNavigationSensor.h:175
WConfigurationResult SetDisplayPageIndex(DisplayPageIndex pPageIndex)
Sets the display page on the given direction.
Definition WNavigationSensor.h:266
WConfigurationResult ResetLogoImage()
Resets the logo image to its default.
Definition WNavigationSensor.h:554
DisplayMode GetDisplayMode()
Returns the display mode (values are NORMAL_MODE, ON_MODE or OFF_MODE)
Definition WNavigationSensor.h:388
WConfigurationResult SetDisplayPageDirection(PageDirection pPageDirection)
Sets the display page on the given direction (Accepted values: NORMAL or UPDIDE_DOWN)
Definition WNavigationSensor.h:351
WConfigurationResult SetFilterType(WFilterType^ pFilterType)
Definition WNavigationSensor.h:86
void Initialize() new
Initializes the object to connect the sensor.
Definition WNavigationSensor.h:40
WConfigurationResult SetLogoImage(List< List< UInt16 >^>^ logoToFetch)
Sets the sensor's logo image.
Definition WNavigationSensor.h:511
WConfigurationResult SetSensorLeds(WSensorLeds^ pLeds) new
Sets the sensors leds status led (ON or OFF)
Definition WNavigationSensor.h:656
Helper to encapsulate the contamination threshold.
Definition ContaminationStatus.h:12
unsigned int GetZ3()
Gets the Navigation sensor's Z3 contamination state.
Definition ContaminationStatus.cpp:89
unsigned int GetZ5()
Gets the Navigation sensor's Z5 contamination state.
Definition ContaminationStatus.cpp:121
unsigned int GetZ2()
Gets the Navigation sensor's Z2 contamination state.
Definition ContaminationStatus.cpp:74
unsigned int GetZ1()
Gets the Navigation sensor's Z1 contamination state.
Definition ContaminationStatus.cpp:58
unsigned int GetZ6()
Gets the Navigation sensor's Z6 contamination state.
Definition ContaminationStatus.cpp:143
unsigned int GetZ4()
Gets the Navigation sensor's Z4 contamination state.
Definition ContaminationStatus.cpp:105
Helper to encapsulate the sensor lamps state.
Definition SensorLamps.h:20
LEDCOLOR GetLed1()
Gets the LED1 status.
Definition SensorLamps.cpp:30
Helper to encapsulate the sensor leds state.
Definition SensorLeds.h:11
bool GetLogoLed()
Gets the logo led.
Definition SensorLeds.cpp:44
void SetStatusLed(bool pStatusLed)
Sets the status led.
Definition SensorLeds.cpp:35
Definition WContaminationStatus.h:4
This class is a wrapper around the unmanaged code RawDataSensor. The goal of this classe is make acce...
Definition WRawDataSensor.h:36
WConfigurationResult toManagedInstance(ConfigurationResult pResult)
Definition WRawDataSensor.h:1405
A wrapper on the SensorLamps data encapsulation.
Definition WSensorLamps.h:11
property LedColor Led1
Definition WSensorLamps.h:29
A wrapper on the SensorLeds data encapsulation.
Definition WSensorLeds.h:8
An Exception used when a bad acknowledgment error is detected.
Definition BadAcknowledgmentException.h:14
virtual const char * what() const noexcept
Overload of message retrie.
Definition BadAcknowledgmentException.h:39
An Exception used when a communication error is detected.
Definition CommunicationException.h:14
An exception used when the sensor returns an error related to a command excecution.
Definition SensorErrorException.h:13
An Exception used when a thread creation error is detected.
Definition ThreadCreationException.h:15
Definition WBadAcknowledgmentException.h:6
Definition WCommunicationException.h:6
property int ErrorCode
Definition WCommunicationException.h:12
A wrapper on the ConfigurationResult data encapsulation.
Definition WConfigurationResult.h:16
Definition WSensorException.h:6
property String ErrorCode
Definition WSensorException.h:12
Definition WThreadCreationException.h:6