Visioscan Set SDK Libraries 1.0.14
Visioscan Set SDK Help documentation file for C++ and C++/CLI
 
Loading...
Searching...
No Matches
WRawDataSensor.h
1#pragma once
2#include <RawDataSensor.h>
3#include "WNetworkInformation.h"
4#include "WAngleRange.h"
5#include "WContaminationThreshold.h"
6#include "WSoftwareVersion.h"
7#include "WRawDataError.h"
8#include <List>
9#include "WSensorLeds.h"
10#include "WSensorLamps.h"
11#include <array>
12#include <BadAcknowledgmentException.h>
13#include <CommunicationException.h>
14#include <SensorErrorException.h>
15#include <ThreadCreationException.h>
16#include "WContaminationStatus.h"
17
18#pragma make_public(ConfigurationResult)
19
20using namespace System::Collections;
21using namespace System::Collections::Generic;
22using namespace WBase;
23using namespace WUtils;
24using namespace WCommunication;
25using namespace WToolboxException;
26using namespace WSensorData;
27using namespace System::Runtime::InteropServices;
28using namespace WEnumerations;
29
35public ref class WRawDataSensor : public WBaseSensor
36{
37public:
39 this->_sensor = (BaseSensor*)new RawDataSensor();
40 }
41
42 WRawDataSensor(WBaseCommunication^ pcomm) {
43 _sensor = (BaseSensor*)new RawDataSensor(pcomm->__nativeCommunication);
44 Communication = pcomm;
45 }
46
48 delete(_sensor);
49 }
50
54 void Initialize() override {
55 _sensor->Initialize();
56 }
57
58
62 void ResetDevice() {
63 try {
64 ((RawDataSensor*)_sensor)->ResetDevice();
65 }
67 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
68 throw toThrow;
69 }
70 catch (CommunicationException e) {
71 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
72 toThrow->ErrorCode = e.GetErrorCode();
73 throw toThrow;
74 }
75 catch (SensorErrorException e) {
76 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
77 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
78 throw toThrow;
79
80 }
81 catch (ThreadCreationException e) {
82 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
83 throw toThrow;
84 }
85 }
86
90 void RebootDevice() {
91 try {
92 ((RawDataSensor*)_sensor)->RebootDevice();
93 }
95 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
96 throw toThrow;
97 }
98 catch (CommunicationException e) {
99 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
100 toThrow->ErrorCode = e.GetErrorCode();
101 throw toThrow;
102 }
103 catch (SensorErrorException e) {
104 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
105 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
106 throw toThrow;
107
108 }
109 catch (ThreadCreationException e) {
110 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
111 throw toThrow;
112 }
113 }
114
115 // Command settings management
116 // Data retrieve
122 try {
123 NetworkInformation toFetch = ((RawDataSensor*)_sensor)->GetNetworkInformation();
124
125 WNetworkInformation^ toReturn = gcnew WNetworkInformation();
126 toReturn->DhcpMode = toFetch.GetDhcpMode();
127 toReturn->Gateway = gcnew String(toFetch.GetGateway().c_str());
128 toReturn->IpAddress = gcnew String(toFetch.GetIpAddress().c_str());
129 toReturn->IpPort = toFetch.GetIpPort();
130 toReturn->SubnetMask = gcnew String(toFetch.GetSubnetMask().c_str());
131
132
133 return toReturn;
134 }
136 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
137 throw toThrow;
138 }
139 catch (CommunicationException e) {
140 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
141 toThrow->ErrorCode = e.GetErrorCode();
142 throw toThrow;
143 }
144 catch (SensorErrorException e) {
145 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
146 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
147 throw toThrow;
148
149 }
150 catch (ThreadCreationException e) {
151 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
152 throw toThrow;
153 }
154 }
155
161 try {
162 PROTOCOL actual = ((RawDataSensor*)_sensor)->GetRawDataExchangeMode();
163 if (actual == UDP) {
164 return Protocol::Udp;
165 }
166 else {
167 return Protocol::Tcp;
168 }
169 }
171 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
172 throw toThrow;
173 }
174 catch (CommunicationException e) {
175 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
176 toThrow->ErrorCode = e.GetErrorCode();
177 throw toThrow;
178 }
179 catch (SensorErrorException e) {
180 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
181 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
182 throw toThrow;
183
184 }
185 catch (ThreadCreationException e) {
186 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
187 throw toThrow;
188 }
189 }
190
196 try {
197 SCAN_PACKET_TYPE actual = ((RawDataSensor*)_sensor)->GetDataPacketType();
198 if (actual == DISTANCE) {
199 return ScanPacketType::Distance;
200 }
201 else {
202 return ScanPacketType::DistanceAndIntensity;
203 }
204 }
206 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
207 throw toThrow;
208 }
209 catch (CommunicationException e) {
210 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
211 toThrow->ErrorCode = e.GetErrorCode();
212 throw toThrow;
213 }
214 catch (SensorErrorException e) {
215 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
216 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
217 throw toThrow;
218
219 }
220 catch (ThreadCreationException e) {
221 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
222 throw toThrow;
223 }
224 }
225
231 try {
232 ANGULAR_RESOLUTION actual = ((RawDataSensor*)_sensor)->GetAngularResolution();
233 if (actual == ZERO_TO_ZERO_POINT_ONE_AT_FOURTY_HZ) {
234 return AngularResolution::ZeroToZeroPointOneAtFourtyHz;
235 }
236 else {
237 return AngularResolution::ZeroToZeroPointTwoAtEightyHz;
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
266 try {
267 SCANNING_DIRECTION actual = ((RawDataSensor*)_sensor)->GetScanningDirection();
268 if (actual == CLOCKWISE) {
269 return ScanningDirection::Clockwise;
270 }
271 else {
272 return ScanningDirection::CounterClockwise;
273 }
274 }
276 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
277 throw toThrow;
278 }
279 catch (CommunicationException e) {
280 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
281 toThrow->ErrorCode = e.GetErrorCode();
282 throw toThrow;
283 }
284 catch (SensorErrorException e) {
285 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
286 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
287 throw toThrow;
288
289 }
290 catch (ThreadCreationException e) {
291 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
292 throw toThrow;
293 }
294 }
295
301 try {
302 WAngleRange^ toReturn = gcnew WAngleRange();
303 AngleRange actual = ((RawDataSensor*)_sensor)->GetAngleRange();
304
305 toReturn->Start = actual.GetStart();
306 toReturn->Stop = actual.GetStop();
307
308 return toReturn;
309 }
311 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
312 throw toThrow;
313 }
314 catch (CommunicationException e) {
315 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
316 toThrow->ErrorCode = e.GetErrorCode();
317 throw toThrow;
318 }
319 catch (SensorErrorException e) {
320 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
321 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
322 throw toThrow;
323
324 }
325 catch (ThreadCreationException e) {
326 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
327 throw toThrow;
328 }
329 }
330
335 unsigned int GetSkipScan() {
336 try {
337 return ((RawDataSensor*)_sensor)->GetSkipScan();
338 }
340 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
341 throw toThrow;
342 }
343 catch (CommunicationException e) {
344 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
345 toThrow->ErrorCode = e.GetErrorCode();
346 throw toThrow;
347 }
348 catch (SensorErrorException e) {
349 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
350 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
351 throw toThrow;
352
353 }
354 catch (ThreadCreationException e) {
355 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
356 throw toThrow;
357 }
358 }
359
364 unsigned int GetImmunityLevel() {
365 try {
366 return ((RawDataSensor*)_sensor)->GetImmunityLevel();
367 }
369 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
370 throw toThrow;
371 }
372 catch (CommunicationException e) {
373 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
374 toThrow->ErrorCode = e.GetErrorCode();
375 throw toThrow;
376 }
377 catch (SensorErrorException e) {
378 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
379 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
380 throw toThrow;
381
382 }
383 catch (ThreadCreationException e) {
384 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
385 throw toThrow;
386 }
387 }
388
394 try {
396 ContaminationThreshold actual = ((RawDataSensor*)_sensor)->GetContaminationThreshold();
397
398 toReturn->Error = actual.GetError();
399 toReturn->Warning = actual.GetWarning();
400
401 return toReturn;
402 }
404 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
405 throw toThrow;
406 }
407 catch (CommunicationException e) {
408 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
409 toThrow->ErrorCode = e.GetErrorCode();
410 throw toThrow;
411 }
412 catch (SensorErrorException e) {
413 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
414 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
415 throw toThrow;
416
417 }
418 catch (ThreadCreationException e) {
419 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
420 throw toThrow;
421 }
422 }
423
429 try {
430 ContaminationStatus toFetch = ((RawDataSensor*)_sensor)->GetContaminationStatus();
431
432 WContaminationStatus^ toReturn = gcnew WContaminationStatus();
433 toReturn->DataLeft = toFetch.GetDataLeft();
434 toReturn->DataMiddle = toFetch.GetDataMiddle();
435 toReturn->DataRight = toFetch.GetDataRight();
436
437 return toReturn;
438 }
440 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
441 throw toThrow;
442 }
443 catch (CommunicationException e) {
444 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
445 toThrow->ErrorCode = e.GetErrorCode();
446 throw toThrow;
447 }
448 catch (SensorErrorException e) {
449 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
450 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
451 throw toThrow;
452
453 }
454 catch (ThreadCreationException e) {
455 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
456 throw toThrow;
457 }
458 }
459
465 try {
466 WSoftwareVersion^ toReturn = gcnew WSoftwareVersion();
467 SoftwareVersion actual = ((RawDataSensor*)_sensor)->GetVersion();
468
469 toReturn->PartNumber = actual.GetPartNumber();
470 toReturn->Prototype = actual.GetPrototype();
471 toReturn->Revision = actual.GetRevision();
472 toReturn->HardwareVersion = actual.GetHardwareVersion();
473 toReturn->CanNumber = actual.GetCanNumber();
474 toReturn->Version = actual.GetVersion();
475 switch (actual.GetProductIdentification()) {
476 case RAW_DATA:
477 toReturn->ProductTypeIdentification = ProductIdentification::RawData;
478 break;
479 case NAVIGATION:
480 toReturn->ProductTypeIdentification = ProductIdentification::Navigation;
481 break;
482 case ANTI_COLLISION:
483 toReturn->ProductTypeIdentification = ProductIdentification::AntiCollision;
484 break;
485 default:
486 toReturn->ProductTypeIdentification = ProductIdentification::Unknown;
487 break;
488 }
489
490
491 return toReturn;
492 }
494 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
495 throw toThrow;
496 }
497 catch (CommunicationException e) {
498 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
499 toThrow->ErrorCode = e.GetErrorCode();
500 throw toThrow;
501 }
502 catch (SensorErrorException e) {
503 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
504 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
505 throw toThrow;
506
507 }
508 catch (ThreadCreationException e) {
509 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
510 throw toThrow;
511 }
512 }
513
519 try {
520 return ((RawDataSensor*)_sensor)->GetTemperature();
521 }
523 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
524 throw toThrow;
525 }
526 catch (CommunicationException e) {
527 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
528 toThrow->ErrorCode = e.GetErrorCode();
529 throw toThrow;
530 }
531 catch (SensorErrorException e) {
532 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
533 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
534 throw toThrow;
535
536 }
537 catch (ThreadCreationException e) {
538 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
539 throw toThrow;
540 }
541 }
542
547 List<WRawDataError^>^ GetErrorLog() {
548 try {
549 vector<RawDataError> actual = ((RawDataSensor*)_sensor)->GetErrorLog();
550 List<WRawDataError^>^ toReturn = gcnew List<WRawDataError^>();
551 WRawDataError^ toAdd;
552 for (int i = 0; i < actual.size(); i++) {
553 toAdd = gcnew WRawDataError();
554 toAdd->ErrorCode = actual[i].GetErrorCode();
555 toAdd->ErrorDate = actual[i].GetErrorDate();
556
557 toReturn->Add(toAdd);
558 }
559
560 return toReturn;
561 }
563 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
564 throw toThrow;
565 }
566 catch (CommunicationException e) {
567 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
568 toThrow->ErrorCode = e.GetErrorCode();
569 throw toThrow;
570 }
571 catch (SensorErrorException e) {
572 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
573 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
574 throw toThrow;
575
576 }
577 catch (ThreadCreationException e) {
578 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
579 throw toThrow;
580 }
581 }
582
588 try {
589 SensorLeds actual = ((RawDataSensor*)_sensor)->GetSensorLeds();
590 WSensorLeds^ toReturn = gcnew WSensorLeds();
591
592 toReturn->LogoLed = actual.GetLogoLed();
593 toReturn->StatusLed = actual.GetStatusLed();
594
595 return toReturn;
596 }
598 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
599 throw toThrow;
600 }
601 catch (CommunicationException e) {
602 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
603 toThrow->ErrorCode = e.GetErrorCode();
604 throw toThrow;
605 }
606 catch (SensorErrorException e) {
607 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
608 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
609 throw toThrow;
610
611 }
612 catch (ThreadCreationException e) {
613 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
614 throw toThrow;
615 }
616 }
617
623 try {
624 WSensorLamps^ toReturn = gcnew WSensorLamps();
625 SensorLamps actual = ((RawDataSensor*)_sensor)->GetSensorLamps();
626
627 toReturn->Led1 = (LedColor)actual.GetLed1();
628 toReturn->Led2 = (LedColor)actual.GetLed2();
629 toReturn->Led3 = (LedColor)actual.GetLed3();
630 toReturn->Led4 = (LedColor)actual.GetLed4();
631
632 return toReturn;
633 }
635 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
636 throw toThrow;
637 }
638 catch (CommunicationException e) {
639 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
640 toThrow->ErrorCode = e.GetErrorCode();
641 throw toThrow;
642 }
643 catch (SensorErrorException e) {
644 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
645 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
646 throw toThrow;
647
648 }
649 catch (ThreadCreationException e) {
650 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
651 throw toThrow;
652 }
653 }
654
660 try {
661 long actual = ((RawDataSensor*)_sensor)->GetRuntimeHours();
662 return actual;
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
689 String^ GetDeviceName() {
690 try {
691 string actual = ((RawDataSensor*)_sensor)->GetDeviceName();
692
693 return gcnew String(actual.c_str());
694 }
696 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
697 throw toThrow;
698 }
699 catch (CommunicationException e) {
700 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
701 toThrow->ErrorCode = e.GetErrorCode();
702 throw toThrow;
703 }
704 catch (SensorErrorException e) {
705 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
706 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
707 throw toThrow;
708
709 }
710 catch (ThreadCreationException e) {
711 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
712 throw toThrow;
713 }
714 }
715
721 try {
722 FILTER_STATUS actual = ((RawDataSensor*)_sensor)->GetFilterStatus();
723 if (actual == FILTER_OFF) {
724 return FilterStatus::Off;
725 }
726 else {
727 return FilterStatus::On;
728 }
729 }
731 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
732 throw toThrow;
733 }
734 catch (CommunicationException e) {
735 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
736 toThrow->ErrorCode = e.GetErrorCode();
737 throw toThrow;
738 }
739 catch (SensorErrorException e) {
740 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
741 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
742 throw toThrow;
743
744 }
745 catch (ThreadCreationException e) {
746 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
747 throw toThrow;
748 }
749 }
755 try {
756 WINDOW_CALIBRATION actual = ((RawDataSensor*)_sensor)->GetWindowCalibrationStatus();
757 if (actual == PROCESSING) {
758 return WindowCalibrationStatus::Processing;
759 }
760 else if (actual == DONE) {
761 return WindowCalibrationStatus::Done;
762 }
763 else {
764 return WindowCalibrationStatus::Failed;
765 }
766 }
768 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
769 throw toThrow;
770 }
771 catch (CommunicationException e) {
772 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
773 toThrow->ErrorCode = e.GetErrorCode();
774 throw toThrow;
775 }
776 catch (SensorErrorException e) {
777 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
778 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
779 throw toThrow;
780
781 }
782 catch (ThreadCreationException e) {
783 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
784 throw toThrow;
785 }
786 }
787
793 WConfigurationResult^ SetIpAddress(String^ pIpAddress) {
794 try {
796 }
798 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
799 throw toThrow;
800 }
801 catch (CommunicationException e) {
802 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
803 toThrow->ErrorCode = e.GetErrorCode();
804 throw toThrow;
805 }
806 catch (SensorErrorException e) {
807 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
808 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
809 throw toThrow;
810
811 }
812 catch (ThreadCreationException e) {
813 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
814 throw toThrow;
815 }
816 }
817
824 try {
825 return toManagedInstance(((RawDataSensor*)_sensor)->SetIpPort(pPort));
826 }
828 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
829 throw toThrow;
830 }
831 catch (CommunicationException e) {
832 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
833 toThrow->ErrorCode = e.GetErrorCode();
834 throw toThrow;
835 }
836 catch (SensorErrorException e) {
837 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
838 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
839 throw toThrow;
840
841 }
842 catch (ThreadCreationException e) {
843 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
844 throw toThrow;
845 }
846 }
847
854 try {
855 return toManagedInstance(((RawDataSensor*)_sensor)->SetNetworkInformation(*pNetwork->__native));
856 }
858 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
859 throw toThrow;
860 }
861 catch (CommunicationException e) {
862 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
863 toThrow->ErrorCode = e.GetErrorCode();
864 throw toThrow;
865 }
866 catch (SensorErrorException e) {
867 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
868 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
869 throw toThrow;
870
871 }
872 catch (ThreadCreationException e) {
873 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
874 throw toThrow;
875 }
876 }
877
884 try {
885 PROTOCOL toSet = -1;
886 if (pProtocol == Protocol::Tcp) {
887 toSet = TCP;
888 }
889 else {
890 toSet = UDP;
891 }
892 return toManagedInstance(((RawDataSensor*)_sensor)->SetRawDataExchangeMode(toSet));
893 }
895 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
896 throw toThrow;
897 }
898 catch (CommunicationException e) {
899 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
900 toThrow->ErrorCode = e.GetErrorCode();
901 throw toThrow;
902 }
903 catch (SensorErrorException e) {
904 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
905 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
906 throw toThrow;
907
908 }
909 catch (ThreadCreationException e) {
910 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
911 throw toThrow;
912 }
913 }
914
921 try {
922 SCAN_PACKET_TYPE toSet = -1;
923 if (pPacketType == ScanPacketType::Distance) {
924 toSet = DISTANCE;
925 }
926 else {
927 toSet = DISTANCE_INTENSITY;
928 }
929 return toManagedInstance(((RawDataSensor*)_sensor)->SetDataPacketType(toSet));
930 }
932 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
933 throw toThrow;
934 }
935 catch (CommunicationException e) {
936 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
937 toThrow->ErrorCode = e.GetErrorCode();
938 throw toThrow;
939 }
940 catch (SensorErrorException e) {
941 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
942 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
943 throw toThrow;
944
945 }
946 catch (ThreadCreationException e) {
947 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
948 throw toThrow;
949 }
950 }
951
958 try {
959 ANGULAR_RESOLUTION toSet = -1;
960 if (pResolution == AngularResolution::ZeroToZeroPointOneAtFourtyHz) {
961 toSet = ZERO_TO_ZERO_POINT_ONE_AT_FOURTY_HZ;
962 }
963 else {
964 toSet = ZERO_TO_ZERO_POINT_TWO_AT_EIGHTY_HZ;
965 }
966 return toManagedInstance(((RawDataSensor*)_sensor)->SetAngularResolution(toSet));
967 }
969 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
970 throw toThrow;
971 }
972 catch (CommunicationException e) {
973 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
974 toThrow->ErrorCode = e.GetErrorCode();
975 throw toThrow;
976 }
977 catch (SensorErrorException e) {
978 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
979 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
980 throw toThrow;
981
982 }
983 catch (ThreadCreationException e) {
984 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
985 throw toThrow;
986 }
987 }
988
995 try {
996 SCANNING_DIRECTION toSet = -1;
997 if (pScanDirection == ScanningDirection::Clockwise) {
998 toSet = CLOCKWISE;
999 }
1000 else {
1001 toSet = COUNTER_CLOCKWISE;
1002 }
1003 return toManagedInstance(((RawDataSensor*)_sensor)->SetScanningDirection(toSet));
1004 }
1005 catch (BadAcknowledgmentException e) {
1006 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1007 throw toThrow;
1008 }
1009 catch (CommunicationException e) {
1010 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1011 toThrow->ErrorCode = e.GetErrorCode();
1012 throw toThrow;
1013 }
1014 catch (SensorErrorException e) {
1015 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1016 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1017 throw toThrow;
1018
1019 }
1020 catch (ThreadCreationException e) {
1021 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1022 throw toThrow;
1023 }
1024 }
1025
1032 try {
1033 return toManagedInstance(((RawDataSensor*)_sensor)->SetAngleRange(*pAngleRange->__native));
1034 }
1035 catch (BadAcknowledgmentException e) {
1036 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1037 throw toThrow;
1038 }
1039 catch (CommunicationException e) {
1040 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1041 toThrow->ErrorCode = e.GetErrorCode();
1042 throw toThrow;
1043 }
1044 catch (SensorErrorException e) {
1045 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1046 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1047 throw toThrow;
1048
1049 }
1050 catch (ThreadCreationException e) {
1051 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1052 throw toThrow;
1053 }
1054 }
1055
1062 try {
1063 return toManagedInstance(((RawDataSensor*)_sensor)->SetSkipScan(pSkipScan));
1064 }
1065 catch (BadAcknowledgmentException e) {
1066 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1067 throw toThrow;
1068 }
1069 catch (CommunicationException e) {
1070 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1071 toThrow->ErrorCode = e.GetErrorCode();
1072 throw toThrow;
1073 }
1074 catch (SensorErrorException e) {
1075 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1076 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1077 throw toThrow;
1078
1079 }
1080 catch (ThreadCreationException e) {
1081 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1082 throw toThrow;
1083 }
1084 }
1085
1086
1093 try {
1094 return toManagedInstance(((RawDataSensor*)_sensor)->SetImmunityLevel(pImmunityLevel));
1095 }
1096 catch (BadAcknowledgmentException e) {
1097 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1098 throw toThrow;
1099 }
1100 catch (CommunicationException e) {
1101 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1102 toThrow->ErrorCode = e.GetErrorCode();
1103 throw toThrow;
1104 }
1105 catch (SensorErrorException e) {
1106 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1107 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1108 throw toThrow;
1109
1110 }
1111 catch (ThreadCreationException e) {
1112 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1113 throw toThrow;
1114 }
1115 }
1116
1123 try {
1124 return toManagedInstance(((RawDataSensor*)_sensor)->SetContaminationThreshold(*pContaminationThreshold->__native));
1125 }
1126 catch (BadAcknowledgmentException e) {
1127 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1128 throw toThrow;
1129 }
1130 catch (CommunicationException e) {
1131 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1132 toThrow->ErrorCode = e.GetErrorCode();
1133 throw toThrow;
1134 }
1135 catch (SensorErrorException e) {
1136 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1137 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1138 throw toThrow;
1139
1140 }
1141 catch (ThreadCreationException e) {
1142 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1143 throw toThrow;
1144 }
1145 }
1146
1153 try {
1154 return toManagedInstance(((RawDataSensor*)_sensor)->SetSensorLeds(*pLeds->__native));
1155 }
1156 catch (BadAcknowledgmentException e) {
1157 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1158 throw toThrow;
1159 }
1160 catch (CommunicationException e) {
1161 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1162 toThrow->ErrorCode = e.GetErrorCode();
1163 throw toThrow;
1164 }
1165 catch (SensorErrorException e) {
1166 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1167 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1168 throw toThrow;
1169
1170 }
1171 catch (ThreadCreationException e) {
1172 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1173 throw toThrow;
1174 }
1175 }
1176
1177
1183 try {
1185 }
1186 catch (BadAcknowledgmentException e) {
1187 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1188 throw toThrow;
1189 }
1190 catch (CommunicationException e) {
1191 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1192 toThrow->ErrorCode = e.GetErrorCode();
1193 throw toThrow;
1194 }
1195 catch (SensorErrorException e) {
1196 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1197 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1198 throw toThrow;
1199
1200 }
1201 catch (ThreadCreationException e) {
1202 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1203 throw toThrow;
1204 }
1205 }
1206
1213 try {
1214 FILTER_STATUS toSet = -1;
1215 if (pFilterStatus == FilterStatus::Off) {
1216 toSet = FILTER_OFF;
1217 }
1218 else {
1219 toSet = FILTER_ON;
1220 }
1221 return toManagedInstance(((RawDataSensor*)_sensor)->SetFilterStatus(toSet));
1222 }
1223 catch (BadAcknowledgmentException e) {
1224 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1225 throw toThrow;
1226 }
1227 catch (CommunicationException e) {
1228 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1229 toThrow->ErrorCode = e.GetErrorCode();
1230 throw toThrow;
1231 }
1232 catch (SensorErrorException e) {
1233 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1234 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1235 throw toThrow;
1236
1237 }
1238 catch (ThreadCreationException e) {
1239 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1240 throw toThrow;
1241 }
1242 }
1243
1248 try {
1249 ((RawDataSensor*)_sensor)->StartWindowCalibration();
1250 }
1251 catch (BadAcknowledgmentException e) {
1252 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1253 throw toThrow;
1254 }
1255 catch (CommunicationException e) {
1256 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1257 toThrow->ErrorCode = e.GetErrorCode();
1258 throw toThrow;
1259 }
1260 catch (SensorErrorException e) {
1261 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1262 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1263 throw toThrow;
1264
1265 }
1266 catch (ThreadCreationException e) {
1267 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1268 throw toThrow;
1269 }
1270 }
1271
1272
1274 try {
1275 RawData data = ((RawDataSensor*)_sensor)->RetrieveRawData();
1276
1277 WRawData^ toReturn = gcnew WRawData();
1278 //if (this->Communication->IsConnected()) {
1279 if (data._scanCount > 0) {
1280
1281 toReturn->Angles = gcnew cli::array<double>(data._scanCount);
1282 toReturn->Distances = gcnew cli::array<double>(data._scanCount);
1283 toReturn->Intensities = gcnew cli::array<double>(data._scanCount);
1284 toReturn->Indexes = gcnew cli::array<int>(data._scanCount);
1285 toReturn->Timestamps = gcnew cli::array<double>(data._scanCount);
1286
1287 //pin_ptr<long> indexesStart = &toReturn->Indexes[0];
1288 //memcpy(indexesStart, data._indexes, data._scanCount * sizeof(int));
1289 Marshal::Copy(IntPtr((void*)data._indexes), toReturn->Indexes, 0, data._scanCount);
1290
1291 //pin_ptr<double> timestampsStart = &toReturn->Timestamps[0];
1292 //memcpy(timestampsStart, data._timestamps, data._scanCount * sizeof(double));
1293 Marshal::Copy(IntPtr((void*)data._timestamps), toReturn->Timestamps, 0, data._scanCount);
1294
1295 //pin_ptr<double> anglesStart = &toReturn->Angles[0];
1296 //memcpy(anglesStart, data._angles, data._scanCount * sizeof(double));
1297 Marshal::Copy(IntPtr((void*)data._angles), toReturn->Angles, 0, data._scanCount);
1298
1299
1300 //pin_ptr<double> distanceStart = &toReturn->Distances[0];
1301 //memcpy(distanceStart, data._distance, data._scanCount * sizeof(double));
1302 Marshal::Copy(IntPtr((void*)data._distances), toReturn->Distances, 0, data._scanCount);
1303
1304 if (data._intensities != NULL) {
1305 /*pin_ptr<double> intensitiesStart = &toReturn->Intensities[0];
1306 memcpy(intensitiesStart, data._intensities, data._scanCount * sizeof(double));*/
1307 Marshal::Copy(IntPtr((void*)data._intensities), toReturn->Intensities, 0, data._scanCount);
1308 }
1309 else {
1310 double* dummy = (double*)malloc(data._scanCount * sizeof(double));
1311 fill_n(dummy, data._scanCount, -1);
1312 Marshal::Copy(IntPtr((void*)dummy), toReturn->Intensities, 0, data._scanCount);
1313 free(dummy);
1314 }
1315
1316 free(data._indexes);
1317 free(data._timestamps);
1318 free(data._angles);
1319 free(data._distances);
1320 free(data._intensities);
1321 }
1322 //}
1323 return toReturn;
1324 }
1325 catch (BadAcknowledgmentException e) {
1326 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1327 throw toThrow;
1328 }
1329 catch (CommunicationException e) {
1330 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1331 toThrow->ErrorCode = e.GetErrorCode();
1332 throw toThrow;
1333 }
1334 catch (SensorErrorException e) {
1335 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1336 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1337 throw toThrow;
1338
1339 }
1340 catch (ThreadCreationException e) {
1341 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1342 throw toThrow;
1343 }
1344 }
1345
1349 void SendMdi()
1350 {
1351 try {
1352 ((RawDataSensor*)_sensor)->SendMdi();
1353 }
1354 catch (BadAcknowledgmentException e) {
1355 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1356 throw toThrow;
1357 }
1358 catch (CommunicationException e) {
1359 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1360 toThrow->ErrorCode = e.GetErrorCode();
1361 throw toThrow;
1362 }
1363 catch (SensorErrorException e) {
1364 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1365 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1366 throw toThrow;
1367
1368 }
1369 catch (ThreadCreationException e) {
1370 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1371 throw toThrow;
1372 }
1373 }
1374
1378 void StopMdi()
1379 {
1380 try {
1381 ((RawDataSensor*)_sensor)->StopMdi();
1382 }
1383 catch (BadAcknowledgmentException e) {
1384 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1385 throw toThrow;
1386 }
1387 catch (CommunicationException e) {
1388 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1389 toThrow->ErrorCode = e.GetErrorCode();
1390 throw toThrow;
1391 }
1392 catch (SensorErrorException e) {
1393 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1394 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1395 throw toThrow;
1396
1397 }
1398 catch (ThreadCreationException e) {
1399 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1400 throw toThrow;
1401 }
1402 }
1403
1404protected:
1406 WConfigurationResult^ toReturn = gcnew WConfigurationResult();
1407 toReturn->Result = pResult.GetResult();
1408 for (int i = 0; i < pResult.GetReasons().size(); i++) {
1409 toReturn->PushReason(gcnew String(pResult.GetReasons()[i].c_str()));
1410 }
1411 return toReturn;
1412 }
1413
1414
1415};
1416
Definition WBadAcknowledgmentException.h:3
Definition WBaseCommunication.h:25
Definition WEnums.h:3
ScanningDirection
Definition WEnums.h:7
FilterStatus
Definition WEnums.h:8
ScanPacketType
Definition WEnums.h:5
WindowCalibrationStatus
Definition WEnums.h:9
AngularResolution
Definition WEnums.h:6
Protocol
Definition WEnums.h:4
Definition WEthernetCommunication.h:5
A wrapper on the RawData data encapsulation.
Definition WRawData.h:5
Definition WUtilities.h:12
Helper to encapsulate the Angle range data.
Definition AngleRange.h:13
int GetStart()
Gets the start angle.
Definition AngleRange.cpp:7
int GetStop()
Gets the stop angle.
Definition AngleRange.cpp:25
Helper to encapsulate the contamination threshold.
Definition ContaminationStatus.h:12
unsigned int GetDataRight()
Gets the contamination status on sensor's right side.
Definition ContaminationStatus.cpp:40
unsigned int GetDataMiddle()
Gets the contamination status on sensor's middle side.
Definition ContaminationStatus.cpp:24
unsigned int GetDataLeft()
Gets the contamination status on sensor's left side.
Definition ContaminationStatus.cpp:8
Helper to encapsulate the contamination threshold.
Definition ContaminationThreshold.h:12
unsigned int GetWarning()
Gets the warning status.
Definition ContaminationThreshold.cpp:8
unsigned int GetError()
Gets the error status.
Definition ContaminationThreshold.cpp:26
Helper to encapsulate the network information.
Definition NetworkInformation.h:15
string GetSubnetMask()
Gets the subnet mask.
Definition NetworkInformation.cpp:62
string GetGateway()
Gets the gateway Address.
Definition NetworkInformation.cpp:44
bool GetDhcpMode()
Gets the dhcp mode.
Definition NetworkInformation.cpp:80
string GetIpAddress()
Gets the IP v4 Address.
Definition NetworkInformation.cpp:8
int GetIpPort()
Gets the tcp/ip comm port.
Definition NetworkInformation.cpp:26
Definition of the Raw data sensor services. This header will let the programmer to handle all the req...
Definition RawDataSensor.h:61
Helper to encapsulate the sensor lamps state.
Definition SensorLamps.h:20
LEDCOLOR GetLed4()
Gets the LED4 status.
Definition SensorLamps.cpp:84
LEDCOLOR GetLed3()
Gets the LED3 status.
Definition SensorLamps.cpp:66
LEDCOLOR GetLed2()
Gets the LED2 status.
Definition SensorLamps.cpp:48
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
bool GetStatusLed()
Gets the status led.
Definition SensorLeds.cpp:26
Helper to encapsulate the software version.
Definition SoftwareVersion.h:19
unsigned int GetRevision()
Gets the internal software revision.
Definition SoftwareVersion.cpp:26
unsigned int GetPrototype()
Gets the internal prototype code.
Definition SoftwareVersion.cpp:44
unsigned int GetVersion()
Gets the internal software version.
Definition SoftwareVersion.cpp:8
PRODUCT_IDENTIFICATION GetProductIdentification()
Gets the product identification.
Definition SoftwareVersion.cpp:113
unsigned long GetPartNumber()
Gets the internal part number.
Definition SoftwareVersion.cpp:95
unsigned long GetCanNumber()
Gets the internal CAN number.
Definition SoftwareVersion.cpp:63
unsigned int GetHardwareVersion()
Gets the Hardware version.
Definition SoftwareVersion.cpp:80
A wrapper on the AngleRange data encapsulation.
Definition WAngleRange.h:7
property int Start
Definition WAngleRange.h:21
Definition WContaminationStatus.h:4
property int DataLeft
Definition WContaminationStatus.h:21
A wrapper on the ContaminationThreshold data encapsulation.
Definition WContaminationThreshold.h:7
property int Warning
Definition WContaminationThreshold.h:23
A wrapper on the NetworkInformation data encapsulation.
Definition WNetworkInformation.h:14
property String IpAddress
Definition WNetworkInformation.h:34
A wrapper on the RawDataError data encapsulation.
Definition WRawDataError.h:7
property int ErrorCode
Definition WRawDataError.h:23
This class is a wrapper around the unmanaged code RawDataSensor. The goal of this classe is make acce...
Definition WRawDataSensor.h:36
WSoftwareVersion GetVersion()
Gets the sensor version data.
Definition WRawDataSensor.h:464
WConfigurationResult SetFilterStatus(FilterStatus pFilterStatus)
Sets the device's filter status.
Definition WRawDataSensor.h:1212
WConfigurationResult SetNetworkInformation(WNetworkInformation^ pNetwork)
Set the overall network information except IP v4 and Port.
Definition WRawDataSensor.h:853
WConfigurationResult SetDeviceName(String^ pName)
Sets the sensor's name.
Definition WRawDataSensor.h:1182
void Initialize() override
Initializes the object to connect the sensor.
Definition WRawDataSensor.h:54
String GetDeviceName()
Gets the sensor's name.
Definition WRawDataSensor.h:689
Protocol GetRawDataExchangeMode()
Get the raw data exchange mode.
Definition WRawDataSensor.h:160
void StopMdi()
Request the sensor to stop sending MDI data to host.
Definition WRawDataSensor.h:1378
WConfigurationResult SetIpPort(int pPort)
Sets the IP port of the sensor.
Definition WRawDataSensor.h:823
WConfigurationResult SetContaminationThreshold(WContaminationThreshold^ pContaminationThreshold)
Sets the contamination level threshold for warning and error.
Definition WRawDataSensor.h:1122
int GetTemperature()
Gets the temperature.
Definition WRawDataSensor.h:518
unsigned int GetImmunityLevel()
Gets the immunity level.
Definition WRawDataSensor.h:364
WRawDataSensor(WBaseCommunication^ pcomm)
Definition WRawDataSensor.h:42
ScanningDirection GetScanningDirection()
Gets the scanning direction.
Definition WRawDataSensor.h:265
WAngleRange GetAngleRange()
Gets the angle range.
Definition WRawDataSensor.h:300
WConfigurationResult SetSensorLeds(WSensorLeds^ pLeds)
Sets the sensors external leds status (ON or OFF)
Definition WRawDataSensor.h:1152
void StartWindowCalibrationStatus()
Starts the window calibration status.
Definition WRawDataSensor.h:1247
WRawData RetrieveRawData()
Definition WRawDataSensor.h:1273
WConfigurationResult SetImmunityLevel(int pImmunityLevel)
Sets the sensor's immunity level.
Definition WRawDataSensor.h:1092
WConfigurationResult SetAngularResolution(AngularResolution pResolution)
Sets the angle resolution. Can be either AngularResolution::ZeroToZeroPointOneAtFourtyHz or AngularRe...
Definition WRawDataSensor.h:957
WSensorLeds GetSensorLeds()
Gets the sensor's leds status.
Definition WRawDataSensor.h:587
long GetRuntimeHours()
Gets the sensor runtime hours.
Definition WRawDataSensor.h:659
WNetworkInformation GetNetworkInformation()
Gets whole data information.
Definition WRawDataSensor.h:121
WConfigurationResult toManagedInstance(ConfigurationResult pResult)
Definition WRawDataSensor.h:1405
WConfigurationResult SetScanningDirection(ScanningDirection pScanDirection)
Sets the scanning direction. Can be either ScanningDirection::Clockwise or ScanningDirection::Counter...
Definition WRawDataSensor.h:994
ScanPacketType GetDataPacketType()
Gets the data packed type.
Definition WRawDataSensor.h:195
void ResetDevice()
Resets the device.
Definition WRawDataSensor.h:62
WConfigurationResult SetDataPacketType(ScanPacketType pPacketType)
Sets the packet type returned in raw data. Can be either ScanPacketType::Distance or ScanPacketType::...
Definition WRawDataSensor.h:920
~WRawDataSensor()
Definition WRawDataSensor.h:47
WindowCalibrationStatus GetWindowCalibrationStatus()
Gets the window calibration status.
Definition WRawDataSensor.h:754
WContaminationThreshold GetContaminationThreshold()
Gets the contamination threshold.
Definition WRawDataSensor.h:393
WConfigurationResult SetRawDataExchangeMode(Protocol pProtocol)
Sets the RAW data exchange mode. Can be either TCP or UDP.
Definition WRawDataSensor.h:883
void SendMdi()
Request the sensor to start sending MDI data to host.
Definition WRawDataSensor.h:1349
List< WRawDataError^> GetErrorLog()
Gets the error log.
Definition WRawDataSensor.h:547
FilterStatus GetFilterStatus()
Gets the filter status.
Definition WRawDataSensor.h:720
WConfigurationResult SetIpAddress(String^ pIpAddress)
Sets the IP v4 address of the sensor.
Definition WRawDataSensor.h:793
WContaminationStatus GetContaminationStatus()
Gets the contamination status.
Definition WRawDataSensor.h:428
void RebootDevice()
Reboots the device.
Definition WRawDataSensor.h:90
WRawDataSensor()
Definition WRawDataSensor.h:38
AngularResolution GetAngularResolution()
Gets the angular resolution.
Definition WRawDataSensor.h:230
WConfigurationResult SetSkipScan(int pSkipScan)
Sets the skip scan.
Definition WRawDataSensor.h:1061
unsigned int GetSkipScan()
Gets the skip scan.
Definition WRawDataSensor.h:335
WConfigurationResult SetAngleRange(WAngleRange^ pAngleRange)
Sets the Angle range (start and stop)
Definition WRawDataSensor.h:1031
WSensorLamps GetSensorLamps()
Gets the sensor lamps status.
Definition WRawDataSensor.h:622
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
property bool StatusLed
Definition WSensorLeds.h:24
A wrapper on the SoftwareVersion data encapsulation.
Definition WSoftwareVersion.h:10
property int Version
Definition WSoftwareVersion.h:30
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
Helper to encapsulate the configuration result.
Definition ConfigurationResult.h:15
bool GetResult()
Gets the result.
Definition ConfigurationResult.cpp:33
vector< string > GetReasons()
Gets the reason of failure.
Definition ConfigurationResult.cpp:42
The base class encapsulating sensor's RAW data.
Definition RawData.h:14
int * _indexes
The index of the record starting from 1 (FREE the pointer after usage !!!)
Definition RawData.h:19
double * _angles
Angles array (FREE the pointer after usage !!!)
Definition RawData.h:35
double * _distances
Distances array (FREE the pointer after usage !!!)
Definition RawData.h:27
double * _timestamps
The reading timestamps elapsed from the StartMdi command expressed in nanoseconds (FREE the pointer a...
Definition RawData.h:23
int _scanCount
Scan counts.
Definition RawData.h:39
double * _intensities
Intensities array (FREE the pointer after usage !!!)
Definition RawData.h:31
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
property bool Result
Definition WConfigurationResult.h:30
Definition WRawData.h:7
property cli::array< int > Indexes
Definition WRawData.h:21
Definition WSensorException.h:6
property String ErrorCode
Definition WSensorException.h:12
Definition WThreadCreationException.h:6
static char * ConvertToNativeString(String^ toConvert)
Definition WUtilities.h:16