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 "WRawDataError.h"
7#include <List>
8#include "WSensorLeds.h"
9#include "WSensorLamps.h"
10#include <array>
11#include <BadAcknowledgmentException.h>
12#include <CommunicationException.h>
13#include <SensorErrorException.h>
14#include <ThreadCreationException.h>
15#include "WContaminationStatus.h"
16#include "../StarfleetToolboxWrapper/WCommunicationStatus.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
55 CommunicationStatus status = _sensor->Initialize();
56
58 for (int i = 0; i < status.Channels.size(); i++) {
59 WChannel^ toAdd = gcnew WChannel();
60 toAdd->RawDataAvailability = static_cast<DataAvailabilityEnum>(status.Channels[i].RawDataAvailability);
61 toAdd->Type = static_cast<ChannelTypeEnum>(status.Channels[i].Type);
62
63 toReturn->Channels->Add(toAdd);
64 }
65
66 toReturn->ErrorCode = gcnew WCommunicationErrorCode();
67 toReturn->ErrorCode->ErrorCode = status.ErrorCode.ErrorCode;
68 toReturn->ErrorCode->ErrorMeaning = gcnew String(status.ErrorCode.ErrorMeaning.c_str());
69
70 toReturn->Status = static_cast<ConnectionStatusEnum>(status.Status);
71
72 return toReturn;
73 }
74
75
79 void ResetDevice() {
80 try {
81 ((RawDataSensor*)_sensor)->ResetDevice();
82 }
84 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
85 throw toThrow;
86 }
87 catch (CommunicationException e) {
88 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
89 toThrow->ErrorCode = e.GetErrorCode();
90 throw toThrow;
91 }
92 catch (SensorErrorException e) {
93 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
94 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
95 throw toThrow;
96
97 }
98 catch (ThreadCreationException e) {
99 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
100 throw toThrow;
101 }
102 }
103
108 try {
109 ((RawDataSensor*)_sensor)->RebootDevice();
110 }
112 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
113 throw toThrow;
114 }
115 catch (CommunicationException e) {
116 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
117 toThrow->ErrorCode = e.GetErrorCode();
118 throw toThrow;
119 }
120 catch (SensorErrorException e) {
121 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
122 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
123 throw toThrow;
124
125 }
126 catch (ThreadCreationException e) {
127 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
128 throw toThrow;
129 }
130 }
131
132 // Command settings management
133 // Data retrieve
139 try {
140 NetworkInformation toFetch = ((RawDataSensor*)_sensor)->GetNetworkInformation();
141
142 WNetworkInformation^ toReturn = gcnew WNetworkInformation();
143 toReturn->DhcpMode = toFetch.GetDhcpMode();
144 toReturn->Gateway = gcnew String(toFetch.GetGateway().c_str());
145 toReturn->IpAddress = gcnew String(toFetch.GetIpAddress().c_str());
146 toReturn->IpPort = toFetch.GetIpPort();
147 toReturn->SubnetMask = gcnew String(toFetch.GetSubnetMask().c_str());
148 toReturn->MacAddress = gcnew String(toFetch.GetMacAddress().c_str());
149
150 return toReturn;
151 }
153 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
154 throw toThrow;
155 }
156 catch (CommunicationException e) {
157 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
158 toThrow->ErrorCode = e.GetErrorCode();
159 throw toThrow;
160 }
161 catch (SensorErrorException e) {
162 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
163 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
164 throw toThrow;
165
166 }
167 catch (ThreadCreationException e) {
168 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
169 throw toThrow;
170 }
171 }
172
178 try {
179 PROTOCOL actual = ((RawDataSensor*)_sensor)->GetRawDataExchangeMode();
180 if (actual == UDP) {
181 return Protocol::Udp;
182 }
183 else {
184 return Protocol::Tcp;
185 }
186 }
188 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
189 throw toThrow;
190 }
191 catch (CommunicationException e) {
192 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
193 toThrow->ErrorCode = e.GetErrorCode();
194 throw toThrow;
195 }
196 catch (SensorErrorException e) {
197 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
198 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
199 throw toThrow;
200
201 }
202 catch (ThreadCreationException e) {
203 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
204 throw toThrow;
205 }
206 }
207
213 try {
214 SCAN_PACKET_TYPE actual = ((RawDataSensor*)_sensor)->GetDataPacketType();
215 if (actual == DISTANCE) {
216 return ScanPacketType::Distance;
217 }
218 else {
219 return ScanPacketType::DistanceAndIntensity;
220 }
221 }
223 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
224 throw toThrow;
225 }
226 catch (CommunicationException e) {
227 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
228 toThrow->ErrorCode = e.GetErrorCode();
229 throw toThrow;
230 }
231 catch (SensorErrorException e) {
232 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
233 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
234 throw toThrow;
235
236 }
237 catch (ThreadCreationException e) {
238 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
239 throw toThrow;
240 }
241 }
242
248 try {
249 SensorResolutionFrequencyEnum actual = ((RawDataSensor*)_sensor)->GetAngularResolution();
250
251 return static_cast<AngularResolution>(actual);
252 }
254 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
255 throw toThrow;
256 }
257 catch (CommunicationException e) {
258 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
259 toThrow->ErrorCode = e.GetErrorCode();
260 throw toThrow;
261 }
262 catch (SensorErrorException e) {
263 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
264 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
265 throw toThrow;
266
267 }
268 catch (ThreadCreationException e) {
269 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
270 throw toThrow;
271 }
272 }
273
279 try {
280 SCANNING_DIRECTION actual = ((RawDataSensor*)_sensor)->GetScanningDirection();
281 if (actual == CLOCKWISE) {
282 return ScanningDirection::Clockwise;
283 }
284 else {
285 return ScanningDirection::CounterClockwise;
286 }
287 }
289 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
290 throw toThrow;
291 }
292 catch (CommunicationException e) {
293 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
294 toThrow->ErrorCode = e.GetErrorCode();
295 throw toThrow;
296 }
297 catch (SensorErrorException e) {
298 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
299 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
300 throw toThrow;
301
302 }
303 catch (ThreadCreationException e) {
304 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
305 throw toThrow;
306 }
307 }
308
314 try {
315 WAngleRange^ toReturn = gcnew WAngleRange();
316 AngleRange actual = ((RawDataSensor*)_sensor)->GetAngleRange();
317
318 toReturn->Start = actual.GetStart();
319 toReturn->Stop = actual.GetStop();
320
321 return toReturn;
322 }
324 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
325 throw toThrow;
326 }
327 catch (CommunicationException e) {
328 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
329 toThrow->ErrorCode = e.GetErrorCode();
330 throw toThrow;
331 }
332 catch (SensorErrorException e) {
333 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
334 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
335 throw toThrow;
336
337 }
338 catch (ThreadCreationException e) {
339 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
340 throw toThrow;
341 }
342 }
343
348 unsigned int GetSkipScan() {
349 try {
350 return ((RawDataSensor*)_sensor)->GetSkipScan();
351 }
353 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
354 throw toThrow;
355 }
356 catch (CommunicationException e) {
357 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
358 toThrow->ErrorCode = e.GetErrorCode();
359 throw toThrow;
360 }
361 catch (SensorErrorException e) {
362 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
363 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
364 throw toThrow;
365
366 }
367 catch (ThreadCreationException e) {
368 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
369 throw toThrow;
370 }
371 }
372
377 unsigned int GetImmunityLevel() {
378 try {
379 return ((RawDataSensor*)_sensor)->GetImmunityLevel();
380 }
382 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
383 throw toThrow;
384 }
385 catch (CommunicationException e) {
386 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
387 toThrow->ErrorCode = e.GetErrorCode();
388 throw toThrow;
389 }
390 catch (SensorErrorException e) {
391 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
392 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
393 throw toThrow;
394
395 }
396 catch (ThreadCreationException e) {
397 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
398 throw toThrow;
399 }
400 }
401
407 try {
409 ContaminationThreshold actual = ((RawDataSensor*)_sensor)->GetContaminationThreshold();
410
411 toReturn->Error = actual.GetError();
412 toReturn->Warning = actual.GetWarning();
413
414 return toReturn;
415 }
417 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
418 throw toThrow;
419 }
420 catch (CommunicationException e) {
421 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
422 toThrow->ErrorCode = e.GetErrorCode();
423 throw toThrow;
424 }
425 catch (SensorErrorException e) {
426 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
427 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
428 throw toThrow;
429
430 }
431 catch (ThreadCreationException e) {
432 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
433 throw toThrow;
434 }
435 }
436
442 try {
443 ContaminationStatus toFetch = ((RawDataSensor*)_sensor)->GetContaminationStatus();
444
445 WContaminationStatus^ toReturn = gcnew WContaminationStatus();
446 toReturn->DataLeft = toFetch.GetDataLeft();
447 toReturn->DataMiddle = toFetch.GetDataMiddle();
448 toReturn->DataRight = toFetch.GetDataRight();
449
450 return toReturn;
451 }
453 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
454 throw toThrow;
455 }
456 catch (CommunicationException e) {
457 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
458 toThrow->ErrorCode = e.GetErrorCode();
459 throw toThrow;
460 }
461 catch (SensorErrorException e) {
462 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
463 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
464 throw toThrow;
465
466 }
467 catch (ThreadCreationException e) {
468 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
469 throw toThrow;
470 }
471 }
472
478 try {
479 WSoftwareVersion^ toReturn = gcnew WSoftwareVersion();
480 SoftwareVersion actual = ((RawDataSensor*)_sensor)->GetVersion();
481
482 toReturn->PartNumber = actual.GetPartNumber();
483 toReturn->Prototype = actual.GetPrototype();
484 toReturn->Revision = actual.GetRevision();
485 toReturn->HardwareVersion = actual.GetHardwareVersion();
486 toReturn->CanNumber = actual.GetCanNumber();
487 toReturn->Version = actual.GetVersion();
488 switch (actual.GetProductIdentification()) {
489 case RAW_DATA:
490 toReturn->ProductTypeIdentification = ProductIdentification::RawData;
491 break;
492 case NAVIGATION:
493 toReturn->ProductTypeIdentification = ProductIdentification::Navigation;
494 break;
495 case ANTI_COLLISION:
496 toReturn->ProductTypeIdentification = ProductIdentification::AntiCollision;
497 break;
498 case ROD_300:
499 toReturn->ProductTypeIdentification = ProductIdentification::Rod300;
500 break;
501 case ROD_500:
502 toReturn->ProductTypeIdentification = ProductIdentification::Rod500;
503 break;
504 case ROD_120:
505 toReturn->ProductTypeIdentification = ProductIdentification::Rod120;
506 break;
507 case ROD_130:
508 toReturn->ProductTypeIdentification = ProductIdentification::Rod130;
509 break;
510 default:
511 toReturn->ProductTypeIdentification = ProductIdentification::Unknown;
512 break;
513 }
514
515
516 return toReturn;
517 }
519 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
520 throw toThrow;
521 }
522 catch (CommunicationException e) {
523 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
524 toThrow->ErrorCode = e.GetErrorCode();
525 throw toThrow;
526 }
527 catch (SensorErrorException e) {
528 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
529 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
530 throw toThrow;
531
532 }
533 catch (ThreadCreationException e) {
534 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
535 throw toThrow;
536 }
537 }
538
544 try {
545 return ((RawDataSensor*)_sensor)->GetTemperature();
546 }
548 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
549 throw toThrow;
550 }
551 catch (CommunicationException e) {
552 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
553 toThrow->ErrorCode = e.GetErrorCode();
554 throw toThrow;
555 }
556 catch (SensorErrorException e) {
557 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
558 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
559 throw toThrow;
560
561 }
562 catch (ThreadCreationException e) {
563 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
564 throw toThrow;
565 }
566 }
567
572 List<WRawDataError^>^ GetErrorLog() {
573 try {
574 vector<RawDataError> actual = ((RawDataSensor*)_sensor)->GetErrorLog();
575 List<WRawDataError^>^ toReturn = gcnew List<WRawDataError^>();
576 WRawDataError^ toAdd;
577 for (int i = 0; i < actual.size(); i++) {
578 toAdd = gcnew WRawDataError();
579 toAdd->ErrorCode = actual[i].GetErrorCode();
580 toAdd->ErrorDate = actual[i].GetErrorDate();
581
582 toReturn->Add(toAdd);
583 }
584
585 return toReturn;
586 }
588 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
589 throw toThrow;
590 }
591 catch (CommunicationException e) {
592 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
593 toThrow->ErrorCode = e.GetErrorCode();
594 throw toThrow;
595 }
596 catch (SensorErrorException e) {
597 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
598 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
599 throw toThrow;
600
601 }
602 catch (ThreadCreationException e) {
603 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
604 throw toThrow;
605 }
606 }
607
613 try {
614 SensorLeds actual = ((RawDataSensor*)_sensor)->GetSensorLeds();
615 WSensorLeds^ toReturn = gcnew WSensorLeds();
616
617 toReturn->LogoLed = actual.GetLogoLed();
618 toReturn->StatusLed = actual.GetStatusLed();
619
620 return toReturn;
621 }
623 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
624 throw toThrow;
625 }
626 catch (CommunicationException e) {
627 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
628 toThrow->ErrorCode = e.GetErrorCode();
629 throw toThrow;
630 }
631 catch (SensorErrorException e) {
632 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
633 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
634 throw toThrow;
635
636 }
637 catch (ThreadCreationException e) {
638 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
639 throw toThrow;
640 }
641 }
642
648 try {
649 WSensorLamps^ toReturn = gcnew WSensorLamps();
650 SensorLamps actual = ((RawDataSensor*)_sensor)->GetSensorLamps();
651
652 toReturn->Led1 = (LedColor)actual.GetLed1();
653 toReturn->Led2 = (LedColor)actual.GetLed2();
654 toReturn->Led3 = (LedColor)actual.GetLed3();
655 toReturn->Led4 = (LedColor)actual.GetLed4();
656
657 return toReturn;
658 }
660 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
661 throw toThrow;
662 }
663 catch (CommunicationException e) {
664 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
665 toThrow->ErrorCode = e.GetErrorCode();
666 throw toThrow;
667 }
668 catch (SensorErrorException e) {
669 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
670 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
671 throw toThrow;
672
673 }
674 catch (ThreadCreationException e) {
675 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
676 throw toThrow;
677 }
678 }
679
685 try {
686 long actual = ((RawDataSensor*)_sensor)->GetRuntimeHours();
687 return actual;
688 }
690 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
691 throw toThrow;
692 }
693 catch (CommunicationException e) {
694 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
695 toThrow->ErrorCode = e.GetErrorCode();
696 throw toThrow;
697 }
698 catch (SensorErrorException e) {
699 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
700 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
701 throw toThrow;
702
703 }
704 catch (ThreadCreationException e) {
705 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
706 throw toThrow;
707 }
708 }
709
714 String^ GetDeviceName() {
715 try {
716 string actual = ((RawDataSensor*)_sensor)->GetDeviceName();
717
718 return gcnew String(actual.c_str());
719 }
721 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
722 throw toThrow;
723 }
724 catch (CommunicationException e) {
725 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
726 toThrow->ErrorCode = e.GetErrorCode();
727 throw toThrow;
728 }
729 catch (SensorErrorException e) {
730 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
731 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
732 throw toThrow;
733
734 }
735 catch (ThreadCreationException e) {
736 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
737 throw toThrow;
738 }
739 }
740
746 try {
747 FILTER_STATUS actual = ((RawDataSensor*)_sensor)->GetFilterStatus();
748 if (actual == FILTER_OFF) {
749 return FilterStatus::Off;
750 }
751 else {
752 return FilterStatus::On;
753 }
754 }
756 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
757 throw toThrow;
758 }
759 catch (CommunicationException e) {
760 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
761 toThrow->ErrorCode = e.GetErrorCode();
762 throw toThrow;
763 }
764 catch (SensorErrorException e) {
765 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
766 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
767 throw toThrow;
768
769 }
770 catch (ThreadCreationException e) {
771 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
772 throw toThrow;
773 }
774 }
780 try {
781 WINDOW_CALIBRATION actual = ((RawDataSensor*)_sensor)->GetWindowCalibrationStatus();
782 if (actual == PROCESSING) {
783 return WindowCalibrationStatus::Processing;
784 }
785 else if (actual == DONE) {
786 return WindowCalibrationStatus::Done;
787 }
788 else {
789 return WindowCalibrationStatus::Failed;
790 }
791 }
793 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
794 throw toThrow;
795 }
796 catch (CommunicationException e) {
797 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
798 toThrow->ErrorCode = e.GetErrorCode();
799 throw toThrow;
800 }
801 catch (SensorErrorException e) {
802 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
803 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
804 throw toThrow;
805
806 }
807 catch (ThreadCreationException e) {
808 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
809 throw toThrow;
810 }
811 }
812
819 try {
820 return toManagedInstance(((RawDataSensor*)_sensor)->SetNetworkInformation(*pNetwork->__native));
821 }
823 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
824 throw toThrow;
825 }
826 catch (CommunicationException e) {
827 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
828 toThrow->ErrorCode = e.GetErrorCode();
829 throw toThrow;
830 }
831 catch (SensorErrorException e) {
832 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
833 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
834 throw toThrow;
835
836 }
837 catch (ThreadCreationException e) {
838 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
839 throw toThrow;
840 }
841 }
842
849 try {
850 PROTOCOL toSet = -1;
851 if (pProtocol == Protocol::Tcp) {
852 toSet = TCP;
853 }
854 else {
855 toSet = UDP;
856 }
857 return toManagedInstance(((RawDataSensor*)_sensor)->SetRawDataExchangeMode(toSet));
858 }
860 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
861 throw toThrow;
862 }
863 catch (CommunicationException e) {
864 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
865 toThrow->ErrorCode = e.GetErrorCode();
866 throw toThrow;
867 }
868 catch (SensorErrorException e) {
869 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
870 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
871 throw toThrow;
872
873 }
874 catch (ThreadCreationException e) {
875 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
876 throw toThrow;
877 }
878 }
879
886 try {
887 SCAN_PACKET_TYPE toSet = -1;
888 if (pPacketType == ScanPacketType::Distance) {
889 toSet = DISTANCE;
890 }
891 else {
892 toSet = DISTANCE_INTENSITY;
893 }
894 return toManagedInstance(((RawDataSensor*)_sensor)->SetDataPacketType(toSet));
895 }
897 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
898 throw toThrow;
899 }
900 catch (CommunicationException e) {
901 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
902 toThrow->ErrorCode = e.GetErrorCode();
903 throw toThrow;
904 }
905 catch (SensorErrorException e) {
906 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
907 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
908 throw toThrow;
909
910 }
911 catch (ThreadCreationException e) {
912 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
913 throw toThrow;
914 }
915 }
916
923 try {
924 SensorResolutionFrequencyEnum toSet = static_cast<SensorResolutionFrequencyEnum>(pResolution);
925
926 return toManagedInstance(((RawDataSensor*)_sensor)->SetAngularResolution(toSet));
927 }
929 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
930 throw toThrow;
931 }
932 catch (CommunicationException e) {
933 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
934 toThrow->ErrorCode = e.GetErrorCode();
935 throw toThrow;
936 }
937 catch (SensorErrorException e) {
938 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
939 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
940 throw toThrow;
941
942 }
943 catch (ThreadCreationException e) {
944 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
945 throw toThrow;
946 }
947 }
948
955 try {
956 SCANNING_DIRECTION toSet = -1;
957 if (pScanDirection == ScanningDirection::Clockwise) {
958 toSet = CLOCKWISE;
959 }
960 else {
961 toSet = COUNTER_CLOCKWISE;
962 }
963 return toManagedInstance(((RawDataSensor*)_sensor)->SetScanningDirection(toSet));
964 }
966 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
967 throw toThrow;
968 }
969 catch (CommunicationException e) {
970 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
971 toThrow->ErrorCode = e.GetErrorCode();
972 throw toThrow;
973 }
974 catch (SensorErrorException e) {
975 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
976 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
977 throw toThrow;
978
979 }
980 catch (ThreadCreationException e) {
981 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
982 throw toThrow;
983 }
984 }
985
992 try {
993 return toManagedInstance(((RawDataSensor*)_sensor)->SetAngleRange(*pAngleRange->__native));
994 }
996 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
997 throw toThrow;
998 }
999 catch (CommunicationException e) {
1000 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1001 toThrow->ErrorCode = e.GetErrorCode();
1002 throw toThrow;
1003 }
1004 catch (SensorErrorException e) {
1005 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1006 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1007 throw toThrow;
1008
1009 }
1010 catch (ThreadCreationException e) {
1011 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1012 throw toThrow;
1013 }
1014 }
1015
1022 try {
1023 return toManagedInstance(((RawDataSensor*)_sensor)->SetSkipScan(pSkipScan));
1024 }
1025 catch (BadAcknowledgmentException e) {
1026 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1027 throw toThrow;
1028 }
1029 catch (CommunicationException e) {
1030 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1031 toThrow->ErrorCode = e.GetErrorCode();
1032 throw toThrow;
1033 }
1034 catch (SensorErrorException e) {
1035 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1036 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1037 throw toThrow;
1038
1039 }
1040 catch (ThreadCreationException e) {
1041 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1042 throw toThrow;
1043 }
1044 }
1045
1046
1053 try {
1054 return toManagedInstance(((RawDataSensor*)_sensor)->SetImmunityLevel(pImmunityLevel));
1055 }
1056 catch (BadAcknowledgmentException e) {
1057 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1058 throw toThrow;
1059 }
1060 catch (CommunicationException e) {
1061 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1062 toThrow->ErrorCode = e.GetErrorCode();
1063 throw toThrow;
1064 }
1065 catch (SensorErrorException e) {
1066 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1067 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1068 throw toThrow;
1069
1070 }
1071 catch (ThreadCreationException e) {
1072 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1073 throw toThrow;
1074 }
1075 }
1076
1083 try {
1084 return toManagedInstance(((RawDataSensor*)_sensor)->SetContaminationThreshold(*pContaminationThreshold->__native));
1085 }
1086 catch (BadAcknowledgmentException e) {
1087 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1088 throw toThrow;
1089 }
1090 catch (CommunicationException e) {
1091 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1092 toThrow->ErrorCode = e.GetErrorCode();
1093 throw toThrow;
1094 }
1095 catch (SensorErrorException e) {
1096 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1097 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1098 throw toThrow;
1099
1100 }
1101 catch (ThreadCreationException e) {
1102 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1103 throw toThrow;
1104 }
1105 }
1106
1113 try {
1114 return toManagedInstance(((RawDataSensor*)_sensor)->SetSensorLeds(*pLeds->__native));
1115 }
1116 catch (BadAcknowledgmentException e) {
1117 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1118 throw toThrow;
1119 }
1120 catch (CommunicationException e) {
1121 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1122 toThrow->ErrorCode = e.GetErrorCode();
1123 throw toThrow;
1124 }
1125 catch (SensorErrorException e) {
1126 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1127 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1128 throw toThrow;
1129
1130 }
1131 catch (ThreadCreationException e) {
1132 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1133 throw toThrow;
1134 }
1135 }
1136
1137
1143 try {
1145 }
1146 catch (BadAcknowledgmentException e) {
1147 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1148 throw toThrow;
1149 }
1150 catch (CommunicationException e) {
1151 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1152 toThrow->ErrorCode = e.GetErrorCode();
1153 throw toThrow;
1154 }
1155 catch (SensorErrorException e) {
1156 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1157 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1158 throw toThrow;
1159
1160 }
1161 catch (ThreadCreationException e) {
1162 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1163 throw toThrow;
1164 }
1165 }
1166
1173 try {
1174 FILTER_STATUS toSet = -1;
1175 if (pFilterStatus == FilterStatus::Off) {
1176 toSet = FILTER_OFF;
1177 }
1178 else {
1179 toSet = FILTER_ON;
1180 }
1181 return toManagedInstance(((RawDataSensor*)_sensor)->SetFilterStatus(toSet));
1182 }
1183 catch (BadAcknowledgmentException e) {
1184 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1185 throw toThrow;
1186 }
1187 catch (CommunicationException e) {
1188 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1189 toThrow->ErrorCode = e.GetErrorCode();
1190 throw toThrow;
1191 }
1192 catch (SensorErrorException e) {
1193 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1194 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1195 throw toThrow;
1196
1197 }
1198 catch (ThreadCreationException e) {
1199 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1200 throw toThrow;
1201 }
1202 }
1203
1208 try {
1209 ((RawDataSensor*)_sensor)->StartWindowCalibration();
1210 }
1211 catch (BadAcknowledgmentException e) {
1212 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1213 throw toThrow;
1214 }
1215 catch (CommunicationException e) {
1216 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1217 toThrow->ErrorCode = e.GetErrorCode();
1218 throw toThrow;
1219 }
1220 catch (SensorErrorException e) {
1221 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1222 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1223 throw toThrow;
1224
1225 }
1226 catch (ThreadCreationException e) {
1227 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1228 throw toThrow;
1229 }
1230 }
1231
1232
1234 try {
1235 RawData data = ((RawDataSensor*)_sensor)->RetrieveRawData();
1236
1237 WRawData^ toReturn = gcnew WRawData();
1238 //if (this->Communication->IsConnected()) {
1239 if (data._scanCount > 0) {
1240
1241 toReturn->Angles = gcnew cli::array<double>(data._scanCount);
1242 toReturn->Distances = gcnew cli::array<double>(data._scanCount);
1243 toReturn->Intensities = gcnew cli::array<double>(data._scanCount);
1244 toReturn->Indexes = gcnew cli::array<int>(data._scanCount);
1245 toReturn->Timestamps = gcnew cli::array<double>(data._scanCount);
1246
1247 //pin_ptr<long> indexesStart = &toReturn->Indexes[0];
1248 //memcpy(indexesStart, data._indexes, data._scanCount * sizeof(int));
1249 Marshal::Copy(IntPtr((void*)data._indexes), toReturn->Indexes, 0, data._scanCount);
1250
1251 //pin_ptr<double> timestampsStart = &toReturn->Timestamps[0];
1252 //memcpy(timestampsStart, data._timestamps, data._scanCount * sizeof(double));
1253 Marshal::Copy(IntPtr((void*)data._timestamps), toReturn->Timestamps, 0, data._scanCount);
1254
1255 //pin_ptr<double> anglesStart = &toReturn->Angles[0];
1256 //memcpy(anglesStart, data._angles, data._scanCount * sizeof(double));
1257 Marshal::Copy(IntPtr((void*)data._angles), toReturn->Angles, 0, data._scanCount);
1258
1259
1260 //pin_ptr<double> distanceStart = &toReturn->Distances[0];
1261 //memcpy(distanceStart, data._distance, data._scanCount * sizeof(double));
1262 Marshal::Copy(IntPtr((void*)data._distances), toReturn->Distances, 0, data._scanCount);
1263
1264 if (data._intensities != NULL) {
1265 /*pin_ptr<double> intensitiesStart = &toReturn->Intensities[0];
1266 memcpy(intensitiesStart, data._intensities, data._scanCount * sizeof(double));*/
1267 Marshal::Copy(IntPtr((void*)data._intensities), toReturn->Intensities, 0, data._scanCount);
1268 }
1269 else {
1270 double* dummy = (double*)malloc(data._scanCount * sizeof(double));
1271 fill_n(dummy, data._scanCount, -1);
1272 Marshal::Copy(IntPtr((void*)dummy), toReturn->Intensities, 0, data._scanCount);
1273 free(dummy);
1274 }
1275
1276 free(data._indexes);
1277 free(data._timestamps);
1278 free(data._angles);
1279 free(data._distances);
1280 free(data._intensities);
1281 }
1282 //}
1283 return toReturn;
1284 }
1285 catch (BadAcknowledgmentException e) {
1286 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1287 throw toThrow;
1288 }
1289 catch (CommunicationException e) {
1290 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1291 toThrow->ErrorCode = e.GetErrorCode();
1292 throw toThrow;
1293 }
1294 catch (SensorErrorException e) {
1295 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1296 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1297 throw toThrow;
1298
1299 }
1300 catch (ThreadCreationException e) {
1301 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1302 throw toThrow;
1303 }
1304 }
1305
1309 void SendMdi()
1310 {
1311 try {
1312 ((RawDataSensor*)_sensor)->SendMdi();
1313 }
1314 catch (BadAcknowledgmentException e) {
1315 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1316 throw toThrow;
1317 }
1318 catch (CommunicationException e) {
1319 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1320 toThrow->ErrorCode = e.GetErrorCode();
1321 throw toThrow;
1322 }
1323 catch (SensorErrorException e) {
1324 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1325 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1326 throw toThrow;
1327
1328 }
1329 catch (ThreadCreationException e) {
1330 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1331 throw toThrow;
1332 }
1333 }
1334
1338 void StopMdi()
1339 {
1340 try {
1341 ((RawDataSensor*)_sensor)->StopMdi();
1342 }
1343 catch (BadAcknowledgmentException e) {
1344 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()));
1345 throw toThrow;
1346 }
1347 catch (CommunicationException e) {
1348 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()));
1349 toThrow->ErrorCode = e.GetErrorCode();
1350 throw toThrow;
1351 }
1352 catch (SensorErrorException e) {
1353 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()));
1354 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1355 throw toThrow;
1356
1357 }
1358 catch (ThreadCreationException e) {
1359 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()));
1360 throw toThrow;
1361 }
1362 }
1363
1364protected:
1366 WConfigurationResult^ toReturn = gcnew WConfigurationResult();
1367 toReturn->Result = pResult.GetResult();
1368 for (int i = 0; i < pResult.GetReasons().size(); i++) {
1369 toReturn->PushReason(gcnew String(pResult.GetReasons()[i].c_str()));
1370 }
1371 return toReturn;
1372 }
1373
1374
1375};
1376
Definition WAvailableResolution.h:7
Definition WBadAcknowledgmentException.h:3
Definition WBaseCommunication.h:16
Definition WEnums.h:4
ScanningDirection
Definition WEnums.h:9
FilterStatus
Definition WEnums.h:10
ScanPacketType
Definition WEnums.h:7
DataAvailabilityEnum
Definition WEnums.h:27
WindowCalibrationStatus
Definition WEnums.h:11
AngularResolution
Definition WEnums.h:8
Protocol
Definition WEnums.h:6
ChannelTypeEnum
Definition WEnums.h:26
ConnectionStatusEnum
Definition WEnums.h:25
Definition WEthernetCommunication.h:5
A wrapper on the RawData data encapsulation.
Definition WRawData.h:5
Helper to encapsulate the Angle range data.
Definition RawDataSensor/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 RawDataSensor/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 RawDataSensor/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 RawDataSensor/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
string GetMacAddress()
Get the sensor's mac adress.
Definition NetworkInformation.cpp:98
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/RawDataSensor.h:65
Helper to encapsulate the sensor lamps state.
Definition RawDataSensor/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 RawDataSensor/SensorLeds.h:11
bool GetLogoLed()
Gets the logo led.
Definition SensorLeds.cpp:44
bool GetStatusLed()
Gets the status led.
Definition SensorLeds.cpp:26
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
WConfigurationResult SetFilterStatus(FilterStatus pFilterStatus)
Sets the device's filter status.
Definition WRawDataSensor.h:1172
WConfigurationResult SetNetworkInformation(WNetworkInformation^ pNetwork)
Set the overall network information except IP v4 and Port.
Definition WRawDataSensor.h:818
WConfigurationResult SetDeviceName(String^ pName)
Sets the sensor's name.
Definition WRawDataSensor.h:1142
String GetDeviceName()
Gets the sensor's name.
Definition WRawDataSensor.h:714
Protocol GetRawDataExchangeMode()
Get the raw data exchange mode.
Definition WRawDataSensor.h:177
void StopMdi()
Request the sensor to stop sending MDI data to host.
Definition WRawDataSensor.h:1338
WConfigurationResult SetContaminationThreshold(WContaminationThreshold^ pContaminationThreshold)
Sets the contamination level threshold for warning and error.
Definition WRawDataSensor.h:1082
int GetTemperature()
Gets the temperature.
Definition WRawDataSensor.h:543
unsigned int GetImmunityLevel()
Gets the immunity level.
Definition WRawDataSensor.h:377
WRawDataSensor(WBaseCommunication^ pcomm)
Definition WRawDataSensor.h:42
ScanningDirection GetScanningDirection()
Gets the scanning direction.
Definition WRawDataSensor.h:278
WAngleRange GetAngleRange()
Gets the angle range.
Definition WRawDataSensor.h:313
WConfigurationResult SetSensorLeds(WSensorLeds^ pLeds)
Sets the sensors external leds status (ON or OFF)
Definition WRawDataSensor.h:1112
void StartWindowCalibrationStatus()
Starts the window calibration status.
Definition WRawDataSensor.h:1207
WRawData RetrieveRawData()
Definition WRawDataSensor.h:1233
WConfigurationResult SetImmunityLevel(int pImmunityLevel)
Sets the sensor's immunity level.
Definition WRawDataSensor.h:1052
WConfigurationResult SetAngularResolution(AngularResolution pResolution)
Sets the angle resolution. Can be either AngularResolution::ZeroToZeroPointOneAtFourtyHz or AngularRe...
Definition WRawDataSensor.h:922
WSensorLeds GetSensorLeds()
Gets the sensor's leds status.
Definition WRawDataSensor.h:612
long GetRuntimeHours()
Gets the sensor runtime hours.
Definition WRawDataSensor.h:684
WCommunicationStatus Initialize() override
Initializes the object to connect the sensor.
Definition WRawDataSensor.h:54
WNetworkInformation GetNetworkInformation()
Gets whole data information.
Definition WRawDataSensor.h:138
WConfigurationResult toManagedInstance(ConfigurationResult pResult)
Definition WRawDataSensor.h:1365
WConfigurationResult SetScanningDirection(ScanningDirection pScanDirection)
Sets the scanning direction. Can be either ScanningDirection::Clockwise or ScanningDirection::Counter...
Definition WRawDataSensor.h:954
ScanPacketType GetDataPacketType()
Gets the data packed type.
Definition WRawDataSensor.h:212
void ResetDevice()
Resets the device.
Definition WRawDataSensor.h:79
WConfigurationResult SetDataPacketType(ScanPacketType pPacketType)
Sets the packet type returned in raw data. Can be either ScanPacketType::Distance or ScanPacketType::...
Definition WRawDataSensor.h:885
~WRawDataSensor()
Definition WRawDataSensor.h:47
WindowCalibrationStatus GetWindowCalibrationStatus()
Gets the window calibration status.
Definition WRawDataSensor.h:779
WContaminationThreshold GetContaminationThreshold()
Gets the contamination threshold.
Definition WRawDataSensor.h:406
WConfigurationResult SetRawDataExchangeMode(Protocol pProtocol)
Sets the RAW data exchange mode. Can be either TCP or UDP.
Definition WRawDataSensor.h:848
void SendMdi()
Request the sensor to start sending MDI data to host.
Definition WRawDataSensor.h:1309
List< WRawDataError^> GetErrorLog()
Gets the error log.
Definition WRawDataSensor.h:572
FilterStatus GetFilterStatus()
Gets the filter status.
Definition WRawDataSensor.h:745
WContaminationStatus GetContaminationStatus()
Gets the contamination status.
Definition WRawDataSensor.h:441
void RebootDevice()
Reboots the device.
Definition WRawDataSensor.h:107
WSoftwareVersion GetVersion() override
Gets the sensor version data.
Definition WRawDataSensor.h:477
WRawDataSensor()
Definition WRawDataSensor.h:38
AngularResolution GetAngularResolution()
Gets the angular resolution.
Definition WRawDataSensor.h:247
WConfigurationResult SetSkipScan(int pSkipScan)
Sets the skip scan.
Definition WRawDataSensor.h:1021
unsigned int GetSkipScan()
Gets the skip scan.
Definition WRawDataSensor.h:348
WConfigurationResult SetAngleRange(WAngleRange^ pAngleRange)
Sets the Angle range (start and stop)
Definition WRawDataSensor.h:991
WSensorLamps GetSensorLamps()
Gets the sensor lamps status.
Definition WRawDataSensor.h:647
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
Helper to encapsulate the software version.
Definition RodConfigSoftware_Samples/RODConfigSoftwareSamples/includes/RawDataSensor/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
An Exception used when a bad acknowledgment error is detected.
Definition RodConfigSoftware_Samples/RODConfigSoftwareSamples/includes/Toolbox/BadAcknowledgmentException.h:14
virtual const char * what() const noexcept
Overload of message retrie.
Definition RodConfigSoftware_Samples/RODConfigSoftwareSamples/includes/Toolbox/BadAcknowledgmentException.h:39
An Exception used when a communication error is detected.
Definition RodConfigSoftware_Samples/RODConfigSoftwareSamples/includes/Toolbox/CommunicationException.h:14
Helper to encapsulate the configuration result.
Definition RodConfigSoftware_Samples/RODConfigSoftwareSamples/includes/Toolbox/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 RodConfigSoftware_Samples/RODConfigSoftwareSamples/includes/Toolbox/RawData.h:14
double * _angles
Angles array (FREE the pointer after usage !!!)
Definition RodConfigSoftware_Samples/RODConfigSoftwareSamples/includes/Toolbox/RawData.h:35
double * _distances
Distances array (FREE the pointer after usage !!!)
Definition RodConfigSoftware_Samples/RODConfigSoftwareSamples/includes/Toolbox/RawData.h:27
int * _indexes
The index of the record starting from 1 (FREE the pointer after usage !!!)
Definition RodConfigSoftware_Samples/RODConfigSoftwareSamples/includes/Toolbox/RawData.h:19
double * _intensities
Intensities array (FREE the pointer after usage !!!)
Definition RodConfigSoftware_Samples/RODConfigSoftwareSamples/includes/Toolbox/RawData.h:31
double * _timestamps
The reading timestamps elapsed from the StartMdi command expressed in nanoseconds (FREE the pointer a...
Definition RodConfigSoftware_Samples/RODConfigSoftwareSamples/includes/Toolbox/RawData.h:23
int _scanCount
Scan counts.
Definition RodConfigSoftware_Samples/RODConfigSoftwareSamples/includes/Toolbox/RawData.h:39
An exception used when the sensor returns an error related to a command excecution.
Definition RodConfigSoftware_Samples/RODConfigSoftwareSamples/includes/Toolbox/SensorErrorException.h:13
An Exception used when a thread creation error is detected.
Definition RodConfigSoftware_Samples/RODConfigSoftwareSamples/includes/Toolbox/ThreadCreationException.h:15
std::string ErrorMeaning
Definition CommunicationStructures.h:16
int ErrorCode
Definition CommunicationStructures.h:15
Definition CommunicationStructures.h:24
ConnectionState Status
Definition CommunicationStructures.h:26
vector< Channel > Channels
Definition CommunicationStructures.h:25
CommErrorCode ErrorCode
Definition CommunicationStructures.h:27
Definition WBadAcknowledgmentException.h:6
Definition WChannel.h:12
property ChannelTypeEnum Type
Definition WChannel.h:22
Definition WCommunicationErrorCode.h:6
Definition WCommunicationException.h:6
property int ErrorCode
Definition WCommunicationException.h:12
Definition WCommunicationStatus.h:16
property List< WChannel^> Channels
Definition WCommunicationStatus.h:24
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
A wrapper on the SoftwareVersion data encapsulation.
Definition WSoftwareVersion.h:12
property int Version
Definition WSoftwareVersion.h:32
Definition WThreadCreationException.h:6
static char * ConvertToNativeString(String^ toConvert)
Definition WUtilities.h:16