Visioscan Set SDK Libraries 1.3.5
Visioscan Set SDK Help documentation file for C++ and C++/CLI
 
Loading...
Searching...
No Matches
WAgvSensor.h
1#pragma once
2#include "../AgvSensor/AgvSensor.h"
3#include "WFieldName.h"
4#include "WObjectSize.h"
5#include "WWarningSpot.h"
6#include "WUncoverZone.h"
7#include "WDefaultValues.h"
8#include "WFieldData.h"
9#include "WMultipleSampling.h"
10#include "WHoldTime.h"
11#include "WOnOffDelay.h"
12#include "WActiveLevel.h"
13#include "WOutputFunction.h"
14#include "WAgvSensorLeds.h"
15#include <ThreadCreationException.h>
16#include <SensorErrorException.h>
17#include <BadAcknowledgmentException.h>
18#include <CommunicationException.h>
19
20using namespace WUtils;
21using namespace WBase;
22using namespace WCommunication;
23using namespace WToolboxException;
24using namespace WEnumerations;
25using namespace System::Collections;
26using namespace System::Collections::Generic;
27using namespace Com::AgvSensorWrapper::Structs;
28using namespace WSensorData;
29
30namespace Com {
31 namespace AgvSensorWrapper {
32 namespace Sensor {
33 public ref class WAgvSensor :
34 public WBaseSensor
35 {
36 public:
38 _sensor = (BaseSensor*)new AgvSensor();
39 _wRawData = gcnew WRawDataSensor();
40 }
41
42 WAgvSensor(WBaseCommunication^ pcomm) {
43 Communication = pcomm;
44 }
45
47 delete(_sensor);
48 }
49
54 if (_sensor != nullptr) {
55 delete(_sensor);
56 }
57 _sensor = (BaseSensor*)new AgvSensor(Communication->__nativeCommunication);
58 _wRawData = gcnew WRawDataSensor(Communication);
59
60 //_wRawData->Communication = this->Communication;
61 //_sensor->SetCommunication(this->Communication->__nativeCommunication);
62 WCommunicationStatus^ toReturn = _wRawData->Initialize();
63
64 if (toReturn->Status == ConnectionStatusEnum::Connected) {
65 _sensor->GetVersion();
66 }
67
68 return toReturn;
69 }
70
72 return _wRawData->RetrieveRawData();
73 }
77 void SendMdi() {
78 _wRawData->SendMdi();
79 }
80
84 void StopMdi() {
85 _wRawData->StopMdi();
86 }
87
93 return _wRawData->GetRawDataExchangeMode();
94 }
95
101 return _wRawData->GetAngleRange();
102 }
103
109 return _wRawData->GetDataPacketType();
110 }
111
116 unsigned int GetImmunityLevel() {
117 return _wRawData->GetImmunityLevel();
118 }
119
127
133 return _wRawData->GetVersion();
134 }
135
140 int GetTemperature() override {
141 return _wRawData->GetTemperature();
142 }
143
149 throw gcnew NotImplementedException("Not implemented in this sensor version");
150 }
151
156 long GetRuntimeHours() override {
157 return _wRawData->GetRuntimeHours();
158 }
159
164 List<WRawDataError^>^ GetErrorLog() {
165 return _wRawData->GetErrorLog();
166 }
167
168 // Command settings management
169 // Data retrieve
177
182 String^ GetDeviceName() override {
183 return _wRawData->GetDeviceName();
184 }
185
192 return _wRawData->SetRawDataExchangeMode(pProtocol);
193 }
194
201 return _wRawData->SetDataPacketType(pPacketType);
202 }
203
210 return _wRawData->SetAngleRange(pAngleRange);
211 }
212
219 return _wRawData->SetImmunityLevel(pImmunityLevel);
220 }
221
228 return _wRawData->SetContaminationThreshold(pContaminationThreshold);
229 }
230
231
238 return _wRawData->SetNetworkInformation(pNetwork);
239 }
240
245 WConfigurationResult^ SetDeviceName(String^ pName) override {
246 return _wRawData->SetDeviceName(pName);
247 }
248
252 void ResetDevice() {
253 _wRawData->ResetDevice();
254 }
255
260 try {
261 ((AgvSensor*)_sensor)->ResetAllFields();
262 }
264 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
265 throw toThrow;
266 }
267 catch (CommunicationException e) {
268 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
269 toThrow->ErrorCode = e.GetErrorCode();
270 throw toThrow;
271 }
272 catch (SensorErrorException e) {
273 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
274 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
275 throw toThrow;
276
277 }
278 catch (ThreadCreationException e) {
279 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
280 throw toThrow;
281 }
282 }
283
288 _wRawData->RebootDevice();
289 }
290
295 List<unsigned int>^ GetWms() {
296 try {
297 vector<unsigned int> actual = ((AgvSensor*)_sensor)->GetWms();
298 List<unsigned int>^ toReturn = gcnew List<unsigned int>();
299
300 for (int i = 0; i < actual.size(); i++) {
301
302 toReturn->Add(actual[i]);
303 }
304
305 return toReturn;
306 }
308 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
309 throw toThrow;
310 }
311 catch (CommunicationException e) {
312 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
313 toThrow->ErrorCode = e.GetErrorCode();
314 throw toThrow;
315 }
316 catch (SensorErrorException e) {
317 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
318 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
319 throw toThrow;
320
321 }
322 catch (ThreadCreationException e) {
323 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
324 throw toThrow;
325 }
326 }
327
333 try {
334 string actual = ((AgvSensor*)_sensor)->RequestChallenge();
335
336 return gcnew String(actual.c_str());
337 }
339 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
340 throw toThrow;
341 }
342 catch (CommunicationException e) {
343 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
344 toThrow->ErrorCode = e.GetErrorCode();
345 throw toThrow;
346 }
347 catch (SensorErrorException e) {
348 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
349 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
350 throw toThrow;
351
352 }
353 catch (ThreadCreationException e) {
354 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
355 throw toThrow;
356 }
357 }
358
359 WConfigurationResult^ SendCypher(String^ challenge) {
360 try {
362 }
364 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
365 throw toThrow;
366 }
367 catch (CommunicationException e) {
368 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
369 toThrow->ErrorCode = e.GetErrorCode();
370 throw toThrow;
371 }
372 catch (SensorErrorException e) {
373 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
374 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
375 throw toThrow;
376
377 }
378 catch (ThreadCreationException e) {
379 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
380 throw toThrow;
381 }
382 }
388 try {
389 WSensorLamps^ toReturn = gcnew WSensorLamps();
390 SensorLamps actual = ((AgvSensor*)_sensor)->GetSensorLamps();
391 toReturn->Led1 = (LedColor)actual.GetLed1();
392 toReturn->Led2 = (LedColor)actual.GetLed2();
393 toReturn->Led3 = (LedColor)actual.GetLed3();
394 toReturn->Led4 = (LedColor)actual.GetLed4();
395 return toReturn;
396 }
398 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
399 throw toThrow;
400 }
401 catch (CommunicationException e) {
402 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
403 toThrow->ErrorCode = e.GetErrorCode();
404 throw toThrow;
405 }
406 catch (SensorErrorException e) {
407 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
408 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
409 throw toThrow;
410 }
411 catch (ThreadCreationException e) {
412 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
413 throw toThrow;
414 }
415 }
416
422 WFieldName^ GetFieldName(int fieldSetNumber) {
423 try {
424 WFieldName^ toReturn = gcnew WFieldName();
425
426 FieldName actual = ((AgvSensor*)_sensor)->GetFieldName(fieldSetNumber);
427
428 toReturn->FieldNumber = actual.GetFieldNumber();
429 toReturn->MainName = gcnew String(actual.GetMainName().c_str());
430 toReturn->NearZoneName = gcnew String(actual.GetNearZoneName().c_str());
431 toReturn->MiddleZoneName = gcnew String(actual.GetMiddleZoneName().c_str());
432 toReturn->FarZoneName = gcnew String(actual.GetFarZoneName().c_str());
433
434 return toReturn;
435 }
437 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
438 throw toThrow;
439 }
440 catch (CommunicationException e) {
441 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
442 toThrow->ErrorCode = e.GetErrorCode();
443 throw toThrow;
444 }
445 catch (SensorErrorException e) {
446 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
447 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
448 throw toThrow;
449
450 }
451 catch (ThreadCreationException e) {
452 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
453 throw toThrow;
454 }
455 }
461 try {
462 WObjectSize^ toReturn = gcnew WObjectSize();
463
464 ObjectSize actual = ((AgvSensor*)_sensor)->GetObjectSize();
465
466 toReturn->Near = static_cast<ObjSizeEnum>(actual.GetNear());
467 toReturn->Middle = static_cast<ObjSizeEnum>(actual.GetMiddle());
468 toReturn->Far = static_cast<ObjSizeEnum>(actual.GetFar());
469
470 return toReturn;
471 }
473 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
474 throw toThrow;
475 }
476 catch (CommunicationException e) {
477 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
478 toThrow->ErrorCode = e.GetErrorCode();
479 throw toThrow;
480 }
481 catch (SensorErrorException e) {
482 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
483 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
484 throw toThrow;
485
486 }
487 catch (ThreadCreationException e) {
488 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
489 throw toThrow;
490 }
491 }
492
498 try {
499 WWarningSpot^ toReturn = gcnew WWarningSpot();
500
501 WarningSpot actual = ((AgvSensor*)_sensor)->GetWarningSpot();
502
503 toReturn->Near = actual.GetNear();
504 toReturn->Middle = actual.GetMiddle();
505 toReturn->Far = actual.GetFar();
506
507 return toReturn;
508 }
510 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
511 throw toThrow;
512 }
513 catch (CommunicationException e) {
514 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
515 toThrow->ErrorCode = e.GetErrorCode();
516 throw toThrow;
517 }
518 catch (SensorErrorException e) {
519 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
520 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
521 throw toThrow;
522
523 }
524 catch (ThreadCreationException e) {
525 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
526 throw toThrow;
527 }
528 }
529
535 try {
536 WUncoverZone^ toReturn = gcnew WUncoverZone();
537
538 UncoverZone actual = ((AgvSensor*)_sensor)->GetUncoverZoneSize();
539
540 toReturn->Near = static_cast<UncoveredZoneSizeEnum>(actual.GetNear());
541 toReturn->Middle = static_cast<UncoveredZoneSizeEnum>(actual.GetMiddle());
542 toReturn->Far = static_cast<UncoveredZoneSizeEnum>(actual.GetFar());
543
544 return toReturn;
545 }
547 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
548 throw toThrow;
549 }
550 catch (CommunicationException e) {
551 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
552 toThrow->ErrorCode = e.GetErrorCode();
553 throw toThrow;
554 }
555 catch (SensorErrorException e) {
556 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
557 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
558 throw toThrow;
559
560 }
561 catch (ThreadCreationException e) {
562 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
563 throw toThrow;
564 }
565 }
572 WFieldData^ GetField(int fieldNumber, ZoneTypeEnum zone) {
573 try {
574 WFieldData^ toReturn = gcnew WFieldData();
575
576 FieldData actual = ((AgvSensor*)_sensor)->GetField(fieldNumber, static_cast<NativeZoneTypeEnum>(zone));
577 toReturn->FieldNumber = actual.GetFieldNumber();
578 toReturn->ZoneType = static_cast<ZoneTypeEnum>(actual.GetZoneType());
579 toReturn->Parameter1 = actual.GetParameter1();
580 toReturn->Parameter2 = actual.GetParameter2();
581 toReturn->Crc = actual.GetCrc();
582 toReturn->GUID = gcnew String(actual.GetGUID().c_str());
583 toReturn->__fetchNativeData(actual.GetData());
584
585 return toReturn;
586 }
588 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
589 throw toThrow;
590 }
591 catch (CommunicationException e) {
592 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
593 toThrow->ErrorCode = e.GetErrorCode();
594 throw toThrow;
595 }
596 catch (SensorErrorException e) {
597 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
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()), gcnew String(e.GetTranslateCode().c_str()));
604 throw toThrow;
605 }
606 }
611 unsigned int GetSelectedField() {
612 try {
613 return ((AgvSensor*)_sensor)->GetSelectedField();
614 }
616 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
617 throw toThrow;
618 }
619 catch (CommunicationException e) {
620 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
621 toThrow->ErrorCode = e.GetErrorCode();
622 throw toThrow;
623 }
624 catch (SensorErrorException e) {
625 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
626 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
627 throw toThrow;
628
629 }
630 catch (ThreadCreationException e) {
631 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
632 throw toThrow;
633 }
634 }
635
636
637
643 try {
644 WOnOffDelay^ toReturn = gcnew WOnOffDelay();
645
646 OnOffDelay actual = ((AgvSensor*)_sensor)->GetOnDelay();
647 toReturn->Near = actual.GetNear();
648 toReturn->Middle = actual.GetMiddle();
649 toReturn->Far = actual.GetFar();
650
651 return toReturn;
652 }
654 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
655 throw toThrow;
656 }
657 catch (CommunicationException e) {
658 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
659 toThrow->ErrorCode = e.GetErrorCode();
660 throw toThrow;
661 }
662 catch (SensorErrorException e) {
663 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
664 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
665 throw toThrow;
666
667 }
668 catch (ThreadCreationException e) {
669 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
670 throw toThrow;
671 }
672 }
673
679 try {
680 WOnOffDelay^ toReturn = gcnew WOnOffDelay();
681
682 OnOffDelay actual = ((AgvSensor*)_sensor)->GetOffDelay();
683 toReturn->Near = actual.GetNear();
684 toReturn->Middle = actual.GetMiddle();
685 toReturn->Far = actual.GetFar();
686
687 return toReturn;
688 }
690 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
691 throw toThrow;
692 }
693 catch (CommunicationException e) {
694 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
695 toThrow->ErrorCode = e.GetErrorCode();
696 throw toThrow;
697 }
698 catch (SensorErrorException e) {
699 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
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()), gcnew String(e.GetTranslateCode().c_str()));
706 throw toThrow;
707 }
708 }
709
715 try {
716 WActiveLevel^ toReturn = gcnew WActiveLevel();
717
718 ActiveLevel actual = ((AgvSensor*)_sensor)->GetOutputActiveLevel();
719 toReturn->Level1 = static_cast<ActiveLevelEnum>(actual.GetLevel1());
720 toReturn->Level2 = static_cast<ActiveLevelEnum>(actual.GetLevel2());
721 toReturn->Level3 = static_cast<ActiveLevelEnum>(actual.GetLevel3());
722 toReturn->Level4 = static_cast<ActiveLevelEnum>(actual.GetLevel4());
723 toReturn->ErrorLevel = static_cast<ActiveLevelEnum>(actual.GetErrorLevel());
724 return toReturn;
725 }
727 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
728 throw toThrow;
729 }
730 catch (CommunicationException e) {
731 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
732 toThrow->ErrorCode = e.GetErrorCode();
733 throw toThrow;
734 }
735 catch (SensorErrorException e) {
736 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
737 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
738 throw toThrow;
739
740 }
741 catch (ThreadCreationException e) {
742 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
743 throw toThrow;
744 }
745 }
746
752 try {
753 WActiveLevel^ toReturn = gcnew WActiveLevel();
754
755 ActiveLevel actual = ((AgvSensor*)_sensor)->GetOutputStatus();
756 toReturn->Level1 = static_cast<ActiveLevelEnum>(actual.GetLevel1());
757 toReturn->Level2 = static_cast<ActiveLevelEnum>(actual.GetLevel2());
758 toReturn->Level3 = static_cast<ActiveLevelEnum>(actual.GetLevel3());
759 toReturn->Level4 = static_cast<ActiveLevelEnum>(actual.GetLevel4());
760 toReturn->ErrorLevel = static_cast<ActiveLevelEnum>(actual.GetErrorLevel());
761 return toReturn;
762 }
764 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
765 throw toThrow;
766 }
767 catch (CommunicationException e) {
768 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
769 toThrow->ErrorCode = e.GetErrorCode();
770 throw toThrow;
771 }
772 catch (SensorErrorException e) {
773 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
774 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
775 throw toThrow;
776
777 }
778 catch (ThreadCreationException e) {
779 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
780 throw toThrow;
781 }
782 }
783
789 try {
790 WActiveLevel^ toReturn = gcnew WActiveLevel();
791
792 ActiveLevel actual = ((AgvSensor*)_sensor)->GetInputStatus();
793 toReturn->Level1 = static_cast<ActiveLevelEnum>(actual.GetLevel1());
794 toReturn->Level2 = static_cast<ActiveLevelEnum>(actual.GetLevel2());
795 toReturn->Level3 = static_cast<ActiveLevelEnum>(actual.GetLevel3());
796 toReturn->Level4 = static_cast<ActiveLevelEnum>(actual.GetLevel4());
797
798 return toReturn;
799 }
801 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
802 throw toThrow;
803 }
804 catch (CommunicationException e) {
805 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
806 toThrow->ErrorCode = e.GetErrorCode();
807 throw toThrow;
808 }
809 catch (SensorErrorException e) {
810 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
811 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
812 throw toThrow;
813
814 }
815 catch (ThreadCreationException e) {
816 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
817 throw toThrow;
818 }
819 }
820
826 try {
827 WOutputFunction^ toReturn = gcnew WOutputFunction();
828
829 OutputFunction actual = ((AgvSensor*)_sensor)->GetOutputFunction();
830 toReturn->Output1 = static_cast<FunctionEnum>(actual.GetOutput1());
831 toReturn->Output2 = static_cast<FunctionEnum>(actual.GetOutput2());
832 toReturn->Output3 = static_cast<FunctionEnum>(actual.GetOutput3());
833 toReturn->Output4 = static_cast<FunctionEnum>(actual.GetOutput4());
834
835 return toReturn;
836 }
838 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
839 throw toThrow;
840 }
841 catch (CommunicationException e) {
842 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
843 toThrow->ErrorCode = e.GetErrorCode();
844 throw toThrow;
845 }
846 catch (SensorErrorException e) {
847 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
848 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
849 throw toThrow;
850
851 }
852 catch (ThreadCreationException e) {
853 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
854 throw toThrow;
855 }
856 }
857
859 WDefaultValues^ toReturn = gcnew WDefaultValues();
860 DefaultValues actual = ((AgvSensor*)_sensor)->GetDefaultValues();
861
862
863 String^ deviceName = gcnew String(actual.GetDeviceName().c_str());
864 WAngleRange^ angleRange = gcnew WAngleRange();
865 WContaminationThreshold^ contaminationThreshold = gcnew WContaminationThreshold();
866 WObjectSize^ objectSize = gcnew WObjectSize();
867 WWarningSpot^ warningSpot = gcnew WWarningSpot();
868 WOnOffDelay^ onDelays = gcnew WOnOffDelay();
869 WOnOffDelay^ offDelays = gcnew WOnOffDelay();
870 WOutputFunction^ outputFunction = gcnew WOutputFunction();
871 WActiveLevel^ activeLevel = gcnew WActiveLevel();
872 WAgvSensorLeds^ sensorLeds = gcnew WAgvSensorLeds();
873
874 angleRange->Start = actual.GetAngleRange().GetStart();
875 angleRange->Stop = actual.GetAngleRange().GetStop();
876
877 contaminationThreshold->Warning = actual.GetContaminationThreshold().GetWarning();
878 contaminationThreshold->Error = actual.GetContaminationThreshold().GetError();
879
880 objectSize->Near = static_cast<ObjSizeEnum>(actual.GetObjectSize().GetNear());
881 objectSize->Middle = static_cast<ObjSizeEnum>(actual.GetObjectSize().GetMiddle());
882 objectSize->Far = static_cast<ObjSizeEnum>(actual.GetObjectSize().GetFar());
883
884 warningSpot->Near = actual.GetWarningSpot().GetNear();
885 warningSpot->Middle = actual.GetWarningSpot().GetMiddle();
886 warningSpot->Far = actual.GetWarningSpot().GetFar();
887
888 onDelays->Near = actual.GetOnDelays().GetNear();
889 onDelays->Middle = actual.GetOnDelays().GetMiddle();
890 onDelays->Far = actual.GetOnDelays().GetFar();
891
892 offDelays->Near = actual.GetOffDelays().GetNear();
893 offDelays->Middle = actual.GetOffDelays().GetMiddle();
894 offDelays->Far = actual.GetOffDelays().GetFar();
895
896
897 outputFunction->Output1 = static_cast<FunctionEnum>(actual.GetOutputFunction().GetOutput1());
898 outputFunction->Output2 = static_cast<FunctionEnum>(actual.GetOutputFunction().GetOutput2());
899 outputFunction->Output3 = static_cast<FunctionEnum>(actual.GetOutputFunction().GetOutput3());
900 outputFunction->Output4 = static_cast<FunctionEnum>(actual.GetOutputFunction().GetOutput4());
901
902 activeLevel->Level1 = static_cast<ActiveLevelEnum>(actual.GetOutputActiveLevel().GetLevel1());
903 activeLevel->Level2 = static_cast<ActiveLevelEnum>(actual.GetOutputActiveLevel().GetLevel2());
904 activeLevel->Level3 = static_cast<ActiveLevelEnum>(actual.GetOutputActiveLevel().GetLevel3());
905 activeLevel->Level4 = static_cast<ActiveLevelEnum>(actual.GetOutputActiveLevel().GetLevel4());
906
907 sensorLeds->ContaminationLed = actual.GetSensorLeds().GetContaminationLed();
908 sensorLeds->StatusLed = actual.GetSensorLeds().GetStatusLed();
909 sensorLeds->LogoLed = actual.GetSensorLeds().GetLogoLed();
910
911 toReturn->DeviceName = deviceName;
912 toReturn->AngleRange = angleRange;
913 toReturn->ContaminationThreshold = contaminationThreshold;
914 toReturn->ObjectSize = objectSize;
915 toReturn->WarningSpot = warningSpot;
916 toReturn->OnDelays = onDelays;
917 toReturn->OffDelays = offDelays;
918 toReturn->OutputFunction = outputFunction;
919 toReturn->OutputActiveLevel = activeLevel;
920 toReturn->SensorLeds = sensorLeds;
921
922
923 return toReturn;
924 }
929 try {
930 WAgvSensorLeds^ toReturn = gcnew WAgvSensorLeds();
931
932 AgvSensorLeds actual = ((AgvSensor*)_sensor)->GetSensorLeds();
933 toReturn->ContaminationLed = actual.GetContaminationLed();
934 toReturn->StatusLed = actual.GetStatusLed();
935 toReturn->LogoLed = actual.GetLogoLed();
936
937 return toReturn;
938 }
940 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
941 throw toThrow;
942 }
943 catch (CommunicationException e) {
944 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
945 toThrow->ErrorCode = e.GetErrorCode();
946 throw toThrow;
947 }
948 catch (SensorErrorException e) {
949 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
950 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
951 throw toThrow;
952
953 }
954 catch (ThreadCreationException e) {
955 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
956 throw toThrow;
957 }
958 }
959
966 try {
967 return toManagedInstance(((AgvSensor*)_sensor)->SetFieldName(*fieldName->__native));
968 }
970 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
971 throw toThrow;
972 }
973 catch (CommunicationException e) {
974 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
975 toThrow->ErrorCode = e.GetErrorCode();
976 throw toThrow;
977 }
978 catch (SensorErrorException e) {
979 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
980 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
981 throw toThrow;
982
983 }
984 catch (ThreadCreationException e) {
985 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
986 throw toThrow;
987 }
988 }
989
996 try {
997 return toManagedInstance(((AgvSensor*)_sensor)->SetObjectSize(*sizeToSet->__native));
998 }
1000 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1001 throw toThrow;
1002 }
1003 catch (CommunicationException e) {
1004 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1005 toThrow->ErrorCode = e.GetErrorCode();
1006 throw toThrow;
1007 }
1008 catch (SensorErrorException e) {
1009 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1010 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1011 throw toThrow;
1012
1013 }
1014 catch (ThreadCreationException e) {
1015 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1016 throw toThrow;
1017 }
1018 }
1019
1026 try {
1027 return toManagedInstance(((AgvSensor*)_sensor)->SetWarningSpot(*spotToSet->__native));
1028 }
1029 catch (BadAcknowledgmentException e) {
1030 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1031 throw toThrow;
1032 }
1033 catch (CommunicationException e) {
1034 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1035 toThrow->ErrorCode = e.GetErrorCode();
1036 throw toThrow;
1037 }
1038 catch (SensorErrorException e) {
1039 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1040 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1041 throw toThrow;
1042
1043 }
1044 catch (ThreadCreationException e) {
1045 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1046 throw toThrow;
1047 }
1048 }
1049
1050
1051 // <summary>
1057 try {
1058 return toManagedInstance(((AgvSensor*)_sensor)->SetUncoverZoneSize(*sizeToSet->__native));
1059 }
1060 catch (BadAcknowledgmentException e) {
1061 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1062 throw toThrow;
1063 }
1064 catch (CommunicationException e) {
1065 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1066 toThrow->ErrorCode = e.GetErrorCode();
1067 throw toThrow;
1068 }
1069 catch (SensorErrorException e) {
1070 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1071 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1072 throw toThrow;
1073
1074 }
1075 catch (ThreadCreationException e) {
1076 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1077 throw toThrow;
1078 }
1079 }
1080
1087 try {
1088 return toManagedInstance(((AgvSensor*)_sensor)->SetField(*data->__native));
1089 }
1090 catch (BadAcknowledgmentException e) {
1091 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1092 throw toThrow;
1093 }
1094 catch (CommunicationException e) {
1095 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1096 toThrow->ErrorCode = e.GetErrorCode();
1097 throw toThrow;
1098 }
1099 catch (SensorErrorException e) {
1100 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1101 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1102 throw toThrow;
1103
1104 }
1105 catch (ThreadCreationException e) {
1106 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1107 throw toThrow;
1108 }
1109 }
1110
1111
1118 try {
1119 return toManagedInstance(((AgvSensor*)_sensor)->SetMultipleSampling(*sampling->__native));
1120 }
1121 catch (BadAcknowledgmentException e) {
1122 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1123 throw toThrow;
1124 }
1125 catch (CommunicationException e) {
1126 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1127 toThrow->ErrorCode = e.GetErrorCode();
1128 throw toThrow;
1129 }
1130 catch (SensorErrorException e) {
1131 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1132 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1133 throw toThrow;
1134
1135 }
1136 catch (ThreadCreationException e) {
1137 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1138 throw toThrow;
1139 }
1140 }
1141
1148 try {
1149 return toManagedInstance(((AgvSensor*)_sensor)->SetHoldTime(*holdTime->__native));
1150 }
1151 catch (BadAcknowledgmentException e) {
1152 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1153 throw toThrow;
1154 }
1155 catch (CommunicationException e) {
1156 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1157 toThrow->ErrorCode = e.GetErrorCode();
1158 throw toThrow;
1159 }
1160 catch (SensorErrorException e) {
1161 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1162 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1163 throw toThrow;
1164
1165 }
1166 catch (ThreadCreationException e) {
1167 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1168 throw toThrow;
1169 }
1170 }
1171
1178 try {
1179 return toManagedInstance(((AgvSensor*)_sensor)->SetOnDelay(*onDelay->__native));
1180 }
1181 catch (BadAcknowledgmentException e) {
1182 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1183 throw toThrow;
1184 }
1185 catch (CommunicationException e) {
1186 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1187 toThrow->ErrorCode = e.GetErrorCode();
1188 throw toThrow;
1189 }
1190 catch (SensorErrorException e) {
1191 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1192 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1193 throw toThrow;
1194
1195 }
1196 catch (ThreadCreationException e) {
1197 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1198 throw toThrow;
1199 }
1200 }
1201
1208 try {
1209 return toManagedInstance(((AgvSensor*)_sensor)->SetOffDelay(*offDelay->__native));
1210 }
1211 catch (BadAcknowledgmentException e) {
1212 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1213 throw toThrow;
1214 }
1215 catch (CommunicationException e) {
1216 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1217 toThrow->ErrorCode = e.GetErrorCode();
1218 throw toThrow;
1219 }
1220 catch (SensorErrorException e) {
1221 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
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()), gcnew String(e.GetTranslateCode().c_str()));
1228 throw toThrow;
1229 }
1230 }
1231
1232
1233
1234
1241 try {
1242 return toManagedInstance(((AgvSensor*)_sensor)->SetOutputActiveLevel(*activeLevel->__native));
1243 }
1244 catch (BadAcknowledgmentException e) {
1245 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1246 throw toThrow;
1247 }
1248 catch (CommunicationException e) {
1249 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1250 toThrow->ErrorCode = e.GetErrorCode();
1251 throw toThrow;
1252 }
1253 catch (SensorErrorException e) {
1254 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1255 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1256 throw toThrow;
1257
1258 }
1259 catch (ThreadCreationException e) {
1260 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1261 throw toThrow;
1262 }
1263 }
1264
1271 try {
1272 return toManagedInstance(((AgvSensor*)_sensor)->SetOutputFunction(*function->__native));
1273 }
1274 catch (BadAcknowledgmentException e) {
1275 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1276 throw toThrow;
1277 }
1278 catch (CommunicationException e) {
1279 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1280 toThrow->ErrorCode = e.GetErrorCode();
1281 throw toThrow;
1282 }
1283 catch (SensorErrorException e) {
1284 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1285 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1286 throw toThrow;
1287
1288 }
1289 catch (ThreadCreationException e) {
1290 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1291 throw toThrow;
1292 }
1293 }
1294
1296 try {
1297 ((AgvSensor*)_sensor)->SetInputControlModeStatus(static_cast<NativeInputControleModeStatus>(controlMode));
1298 }
1299 catch (BadAcknowledgmentException e) {
1300 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1301 throw toThrow;
1302 }
1303 catch (CommunicationException e) {
1304 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1305 toThrow->ErrorCode = e.GetErrorCode();
1306 throw toThrow;
1307 }
1308 catch (SensorErrorException e) {
1309 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1310 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1311 throw toThrow;
1312
1313 }
1314 catch (ThreadCreationException e) {
1315 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1316 throw toThrow;
1317 }
1318 };
1319
1320
1322 try {
1323 ((AgvSensor*)_sensor)->SetZone1Mode(static_cast<NativeZoneModeEnum>(mode));
1324 }
1325 catch (BadAcknowledgmentException e) {
1326 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1327 throw toThrow;
1328 }
1329 catch (CommunicationException e) {
1330 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1331 toThrow->ErrorCode = e.GetErrorCode();
1332 throw toThrow;
1333 }
1334 catch (SensorErrorException e) {
1335 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
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()), gcnew String(e.GetTranslateCode().c_str()));
1342 throw toThrow;
1343 }
1344 };
1345
1346
1348 try {
1349 ((AgvSensor*)_sensor)->SetInputsValue(static_cast<NativeActiveLevelEnum>(input1), static_cast<NativeActiveLevelEnum>(input2), static_cast<NativeActiveLevelEnum>(input3), static_cast<NativeActiveLevelEnum>(input4));
1350 }
1351 catch (BadAcknowledgmentException e) {
1352 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1353 throw toThrow;
1354 }
1355 catch (CommunicationException e) {
1356 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1357 toThrow->ErrorCode = e.GetErrorCode();
1358 throw toThrow;
1359 }
1360 catch (SensorErrorException e) {
1361 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1362 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1363 throw toThrow;
1364
1365 }
1366 catch (ThreadCreationException e) {
1367 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1368 throw toThrow;
1369 }
1370 };
1371
1378 try {
1379 return toManagedInstance(((AgvSensor*)_sensor)->SetSensorLeds(*leds->__native));
1380 }
1381 catch (BadAcknowledgmentException e) {
1382 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1383 throw toThrow;
1384 }
1385 catch (CommunicationException e) {
1386 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1387 toThrow->ErrorCode = e.GetErrorCode();
1388 throw toThrow;
1389 }
1390 catch (SensorErrorException e) {
1391 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1392 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1393 throw toThrow;
1394
1395 }
1396 catch (ThreadCreationException e) {
1397 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1398 throw toThrow;
1399 }
1400 }
1401
1407 try {
1408 return toManagedInstance(((AgvSensor*)_sensor)->StoreInFlash());
1409 }
1410 catch (BadAcknowledgmentException e) {
1411 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1412 throw toThrow;
1413 }
1414 catch (CommunicationException e) {
1415 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1416 toThrow->ErrorCode = e.GetErrorCode();
1417 throw toThrow;
1418 }
1419 catch (SensorErrorException e) {
1420 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1421 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1422 throw toThrow;
1423
1424 }
1425 catch (ThreadCreationException e) {
1426 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1427 throw toThrow;
1428 }
1429 }
1430
1435 unsigned int GetPlatformVersion() override {
1436 try {
1437 unsigned int platformVersion = _wRawData->GetPlatformVersion();
1438
1439 return platformVersion;
1440 }
1441 catch (BadAcknowledgmentException e) {
1442 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1443 throw toThrow;
1444 }
1445 catch (CommunicationException e) {
1446 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1447 toThrow->ErrorCode = e.GetErrorCode();
1448 throw toThrow;
1449 }
1450 catch (SensorErrorException e) {
1451 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1452 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1453 throw toThrow;
1454
1455 }
1456 catch (ThreadCreationException e) {
1457 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1458 throw toThrow;
1459 }
1460 }
1461 void StartLearning(int fieldNumber, ZoneTypeEnum zone, unsigned int uncover, ObjSizeEnum objectSize) {
1462 try {
1463 ((AgvSensor*)_sensor)->StartLearning(fieldNumber, static_cast<NativeZoneTypeEnum>(zone), uncover, static_cast<NativeObjSizeEnum>(objectSize));
1464 }
1465 catch (BadAcknowledgmentException e) {
1466 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1467 throw toThrow;
1468 }
1469 catch (CommunicationException e) {
1470 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1471 toThrow->ErrorCode = e.GetErrorCode();
1472 throw toThrow;
1473 }
1474 catch (SensorErrorException e) {
1475 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1476 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1477 throw toThrow;
1478
1479 }
1480 catch (ThreadCreationException e) {
1481 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1482 throw toThrow;
1483 }
1484 };
1485
1487 try {
1488 ((AgvSensor*)_sensor)->StopLearning();
1489 }
1490 catch (BadAcknowledgmentException e) {
1491 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1492 throw toThrow;
1493 }
1494 catch (CommunicationException e) {
1495 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1496 toThrow->ErrorCode = e.GetErrorCode();
1497 throw toThrow;
1498 }
1499 catch (SensorErrorException e) {
1500 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1501 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1502 throw toThrow;
1503
1504 }
1505 catch (ThreadCreationException e) {
1506 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1507 throw toThrow;
1508 }
1509 }
1510
1512 try {
1513 ((AgvSensor*)_sensor)->AbortLearning();
1514 }
1515 catch (BadAcknowledgmentException e) {
1516 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1517 throw toThrow;
1518 }
1519 catch (CommunicationException e) {
1520 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1521 toThrow->ErrorCode = e.GetErrorCode();
1522 throw toThrow;
1523 }
1524 catch (SensorErrorException e) {
1525 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1526 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1527 throw toThrow;
1528
1529 }
1530 catch (ThreadCreationException e) {
1531 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1532 throw toThrow;
1533 }
1534 }
1535
1537 try {
1538 FieldLearningStatusEnum toReturn;
1539
1540 NativeFieldLearningStatus status = ((AgvSensor*)_sensor)->GetLearningStatus();
1541 toReturn = static_cast<FieldLearningStatusEnum>(status);
1542
1543 return toReturn;
1544 }
1545 catch (BadAcknowledgmentException e) {
1546 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1547 throw toThrow;
1548 }
1549 catch (CommunicationException e) {
1550 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1551 toThrow->ErrorCode = e.GetErrorCode();
1552 throw toThrow;
1553 }
1554 catch (SensorErrorException e) {
1555 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1556 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1557 throw toThrow;
1558
1559 }
1560 catch (ThreadCreationException e) {
1561 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1562 throw toThrow;
1563 }
1564 }
1565
1566
1571 unsigned int GetLearningErrorCode() override {
1572 try {
1573 unsigned int learningErrorCode = ((AgvSensor*)_sensor)->GetLearningErrorCode();
1574
1575 return learningErrorCode;
1576 }
1577 catch (BadAcknowledgmentException e) {
1578 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1579 throw toThrow;
1580 }
1581 catch (CommunicationException e) {
1582 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1583 toThrow->ErrorCode = e.GetErrorCode();
1584 throw toThrow;
1585 }
1586 catch (SensorErrorException e) {
1587 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1588 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1589 throw toThrow;
1590
1591 }
1592 catch (ThreadCreationException e) {
1593 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1594 throw toThrow;
1595 }
1596 }
1597
1599 try {
1600 AbortStatus toReturn;
1601
1602 NativeAbortStatus status = ((AgvSensor*)_sensor)->GetAbortStatus();
1603 toReturn = static_cast<AbortStatus>(status);
1604
1605 return toReturn;
1606 }
1607 catch (BadAcknowledgmentException e) {
1608 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1609 throw toThrow;
1610 }
1611 catch (CommunicationException e) {
1612 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1613 toThrow->ErrorCode = e.GetErrorCode();
1614 throw toThrow;
1615 }
1616 catch (SensorErrorException e) {
1617 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1618 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1619 throw toThrow;
1620
1621 }
1622 catch (ThreadCreationException e) {
1623 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1624 throw toThrow;
1625 }
1626 }
1627
1628
1629
1631 try {
1632 InputControleModeStatus toReturn;
1633
1634 NativeInputControleModeStatus status = ((AgvSensor*)_sensor)->GetInputControlModeStatus();
1635 toReturn = static_cast<InputControleModeStatus>(status);
1636
1637 return toReturn;
1638 }
1639 catch (BadAcknowledgmentException e) {
1640 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1641 throw toThrow;
1642 }
1643 catch (CommunicationException e) {
1644 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1645 toThrow->ErrorCode = e.GetErrorCode();
1646 throw toThrow;
1647 }
1648 catch (SensorErrorException e) {
1649 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1650 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1651 throw toThrow;
1652
1653 }
1654 catch (ThreadCreationException e) {
1655 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1656 throw toThrow;
1657 }
1658 }
1659
1661 try {
1662 ZoneModeEnum toReturn;
1663
1664 NativeZoneModeEnum status = ((AgvSensor*)_sensor)->GetZone1Mode();
1665 toReturn = static_cast<ZoneModeEnum>(status);
1666
1667 return toReturn;
1668 }
1669 catch (BadAcknowledgmentException e) {
1670 WBadAcknowledgmentException^ toThrow = gcnew WBadAcknowledgmentException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1671 throw toThrow;
1672 }
1673 catch (CommunicationException e) {
1674 WCommunicationException^ toThrow = gcnew WCommunicationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1675 toThrow->ErrorCode = e.GetErrorCode();
1676 throw toThrow;
1677 }
1678 catch (SensorErrorException e) {
1679 WSensorException^ toThrow = gcnew WSensorException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1680 toThrow->ErrorCode = gcnew String(e.GetErrorCode().c_str());
1681 throw toThrow;
1682
1683 }
1684 catch (ThreadCreationException e) {
1685 WThreadCreationException^ toThrow = gcnew WThreadCreationException(gcnew String(e.what()), gcnew String(e.GetTranslateCode().c_str()));
1686 throw toThrow;
1687 }
1688 }
1689
1690
1691 protected:
1693 WConfigurationResult^ toReturn = gcnew WConfigurationResult();
1694 toReturn->Result = pResult.GetResult();
1695 for (int i = 0; i < pResult.GetReasons().size(); i++) {
1696 toReturn->PushReason(gcnew String(pResult.GetReasons()[i].c_str()));
1697 }
1698 return toReturn;
1699 }
1700 private:
1701 WRawDataSensor^ _wRawData;
1702 };
1703 }
1704 }
1705}
Definition WActiveLevel.h:7
Definition WActiveLevel.h:9
Definition WAvailableResolution.h:7
Definition WBadAcknowledgmentException.h:3
Definition WBaseCommunication.h:16
Definition WEnums.h:4
ZoneModeEnum
Definition WEnums.h:32
ZoneTypeEnum
Definition WEnums.h:21
FieldLearningStatusEnum
Definition WEnums.h:24
ScanPacketType
Definition WEnums.h:7
UncoveredZoneSizeEnum
Definition WEnums.h:29
FunctionEnum
Definition WEnums.h:23
InputControleModeStatus
Definition WEnums.h:31
Protocol
Definition WEnums.h:6
AbortStatus
Definition WEnums.h:30
ObjSizeEnum
Definition WEnums.h:20
ActiveLevelEnum
Definition WEnums.h:22
Definition WEthernetCommunication.h:5
A wrapper on the RawData data encapsulation.
Definition WRawData.h:5
Definition ActiveLevel.h:12
NativeActiveLevelEnum GetLevel3()
Definition ActiveLevel.cpp:24
NativeActiveLevelEnum GetLevel1()
Definition ActiveLevel.cpp:4
NativeActiveLevelEnum GetLevel2()
Definition ActiveLevel.cpp:14
NativeActiveLevelEnum GetLevel4()
Definition ActiveLevel.cpp:34
NativeActiveLevelEnum GetErrorLevel()
Definition ActiveLevel.cpp:44
Definition AgvSensor.h:44
Definition AgvSensorLeds.h:11
bool GetContaminationLed()
Gets the contamination led.
Definition AgvSensorLeds.cpp:4
Definition DefaultValues.h:19
OnOffDelay GetOnDelays()
Definition DefaultValues.cpp:8
OnOffDelay GetOffDelays()
Definition DefaultValues.cpp:9
string GetDeviceName()
Definition DefaultValues.cpp:3
OutputFunction GetOutputFunction()
Definition DefaultValues.cpp:10
AngleRange GetAngleRange()
Definition DefaultValues.cpp:4
ObjectSize GetObjectSize()
Definition DefaultValues.cpp:6
ContaminationThreshold GetContaminationThreshold()
Definition DefaultValues.cpp:5
AgvSensorLeds GetSensorLeds()
Definition DefaultValues.cpp:12
WarningSpot GetWarningSpot()
Definition DefaultValues.cpp:7
ActiveLevel GetOutputActiveLevel()
Definition DefaultValues.cpp:11
Definition FieldData.h:14
vector< uint16_t > GetData()
Definition FieldData.cpp:73
NativeZoneTypeEnum GetZoneType()
Definition FieldData.cpp:23
uint16_t GetCrc()
Definition FieldData.cpp:53
string GetGUID()
Definition FieldData.cpp:63
int16_t GetParameter2()
Definition FieldData.cpp:43
uint8_t GetFieldNumber()
Definition FieldData.cpp:13
int16_t GetParameter1()
Definition FieldData.cpp:33
Definition FieldName.h:10
string GetNearZoneName()
Gets the near_ zone name.
Definition FieldName.cpp:24
int GetFieldNumber()
Get the field number.
Definition FieldName.cpp:4
string GetMainName()
Gets the field name.
Definition FieldName.cpp:14
string GetFarZoneName()
Gets the far zone name.
Definition FieldName.cpp:44
string GetMiddleZoneName()
Gets the middle zone name.
Definition FieldName.cpp:34
Definition ObjectSize.h:13
NativeObjSizeEnum GetMiddle()
Gets the middle size.
Definition ObjectSize.cpp:14
NativeObjSizeEnum GetFar()
Gets the far size.
Definition ObjectSize.cpp:24
NativeObjSizeEnum GetNear()
Gets the near_ size.
Definition ObjectSize.cpp:4
Definition OnOffDelay.h:10
uint16_t GetFar()
Definition OnOffDelay.cpp:23
uint16_t GetMiddle()
Definition OnOffDelay.cpp:13
uint16_t GetNear()
Definition OnOffDelay.cpp:3
Definition OutputFunction.h:12
NativeFunctionEnum GetOutput4()
Definition OutputFunction.cpp:34
NativeFunctionEnum GetOutput1()
Definition OutputFunction.cpp:4
NativeFunctionEnum GetOutput3()
Definition OutputFunction.cpp:24
NativeFunctionEnum GetOutput2()
Definition OutputFunction.cpp:14
Definition UncoverZone.h:13
NativeUncoverZoneSizeEnum GetMiddle()
Gets the middle uncovered size.
Definition UncoverZone.cpp:15
NativeUncoverZoneSizeEnum GetFar()
Gets the far uncovered size.
Definition UncoverZone.cpp:25
NativeUncoverZoneSizeEnum GetNear()
Gets the near_ uncovered zise.
Definition UncoverZone.cpp:5
Definition WarningSpot.h:13
uint8_t GetFar()
Gets the far size.
Definition WarningSpot.cpp:31
uint8_t GetMiddle()
Gets the middle size.
Definition WarningSpot.cpp:15
uint8_t GetNear()
Gets the near size.
Definition WarningSpot.cpp:3
property ActiveLevelEnum Level1
Definition WActiveLevel.h:29
Protocol GetRawDataExchangeMode()
Get the raw data exchange mode.
Definition WAgvSensor.h:92
WOnOffDelay GetOffDelay()
Gets OFF delay (ms)
Definition WAgvSensor.h:678
WOnOffDelay GetOnDelay()
Gets ON delay (ms)
Definition WAgvSensor.h:642
void SetZone1Mode(ZoneModeEnum mode)
Definition WAgvSensor.h:1321
InputControleModeStatus GetInputControlModeStatus()
Definition WAgvSensor.h:1630
WConfigurationResult SetSensorLeds(WAgvSensorLeds^ leds)
Sets the sensor's leds.
Definition WAgvSensor.h:1377
void RebootDevice()
Reboots the device.
Definition WAgvSensor.h:287
WActiveLevel GetOutputActiveLevel()
Gets the output active level for 4 outputs.
Definition WAgvSensor.h:714
String RequestChallenge()
Request the challenge to the sensor.
Definition WAgvSensor.h:332
WUncoverZone GetUncoverZoneSize()
Gets the uncovered zone size.
Definition WAgvSensor.h:534
void StartLearning(int fieldNumber, ZoneTypeEnum zone, unsigned int uncover, ObjSizeEnum objectSize)
Definition WAgvSensor.h:1461
void StopMdi()
Request the sensor to stop sending MDI data to host.
Definition WAgvSensor.h:84
AbortStatus GetAbortStatus()
Definition WAgvSensor.h:1598
WSoftwareVersion GetVersion() override
Gets the sensor version data.
Definition WAgvSensor.h:132
WAgvSensor(WBaseCommunication^ pcomm)
Definition WAgvSensor.h:42
WConfigurationResult SetField(WFieldData^ data)
Set the requested field data.
Definition WAgvSensor.h:1086
void StopLearning()
Definition WAgvSensor.h:1486
ScanPacketType GetDataPacketType()
Gets the data packed type.
Definition WAgvSensor.h:108
long GetRuntimeHours() override
Gets the sensor runtime hours.
Definition WAgvSensor.h:156
void AbortLearning()
Definition WAgvSensor.h:1511
WConfigurationResult SetAngleRange(WAngleRange^ pAngleRange)
Sets the Angle range (start and stop)
Definition WAgvSensor.h:209
WConfigurationResult SendCypher(String^ challenge)
Definition WAgvSensor.h:359
String GetDeviceName() override
Gets the sensor's name.
Definition WAgvSensor.h:182
WObjectSize GetObjectSize()
Gets the object size.
Definition WAgvSensor.h:460
WActiveLevel GetInputStatus()
Gets the input active status for 4 inputs.
Definition WAgvSensor.h:788
~WAgvSensor()
Definition WAgvSensor.h:46
WConfigurationResult SetImmunityLevel(int pImmunityLevel)
Sets the sensor's immunity level.
Definition WAgvSensor.h:218
WNetworkInformation GetNetworkInformation()
Gets whole data information.
Definition WAgvSensor.h:174
WDefaultValues GetDefaultValues()
Definition WAgvSensor.h:858
void ResetAllFields()
Resets all fields to MAXVALUE.
Definition WAgvSensor.h:259
WOutputFunction GetOutputFunction()
Gest the output function for 4 outputs.
Definition WAgvSensor.h:825
WSensorLamps GetSensorLamps()
Gets the sensor lamps status.
Definition WAgvSensor.h:387
WConfigurationResult SetDataPacketType(ScanPacketType pPacketType)
Sets the packet type returned in raw data. Can be either ScanPacketType::Distance or ScanPacketType::...
Definition WAgvSensor.h:200
WActiveLevel GetOutputStatus()
Gets the output active status for 4 outputs.
Definition WAgvSensor.h:751
void SendMdi()
Request the sensor to start sending MDI data to host.
Definition WAgvSensor.h:77
FieldLearningStatusEnum GetLearningStatus()
Definition WAgvSensor.h:1536
unsigned int GetLearningErrorCode() override
Gets the platform version.
Definition WAgvSensor.h:1571
WAgvSensor()
Definition WAgvSensor.h:37
WConfigurationResult StoreInFlash()
Store fields in the flash.
Definition WAgvSensor.h:1406
WConfigurationResult SetFieldName(WFieldName^ fieldName)
Sets the field name data.
Definition WAgvSensor.h:965
ZoneModeEnum GetZone1Mode()
Definition WAgvSensor.h:1660
WContaminationThreshold GetContaminationThreshold()
Gets the contamination threshold.
Definition WAgvSensor.h:124
List< WRawDataError^> GetErrorLog()
Gets the error log.
Definition WAgvSensor.h:164
WConfigurationResult SetContaminationThreshold(WContaminationThreshold^ pContaminationThreshold)
Sets the contamination level threshold for warning and error.
Definition WAgvSensor.h:227
WWarningSpot GetWarningSpot()
Gets the warning spot value.
Definition WAgvSensor.h:497
WFieldName GetFieldName(int fieldSetNumber)
Gets the field name for a given field number.
Definition WAgvSensor.h:422
WFieldData GetField(int fieldNumber, ZoneTypeEnum zone)
Returns the requested field data.
Definition WAgvSensor.h:572
WConfigurationResult toManagedInstance(ConfigurationResult pResult)
Definition WAgvSensor.h:1692
List< unsigned int > GetWms()
Returns the window monitoring system of each sector (SECTORS_COUNT sectors - 132 -)
Definition WAgvSensor.h:295
WConfigurationResult SetMultipleSampling(WMultipleSampling^ sampling)
Sets the multiple sampling.
Definition WAgvSensor.h:1117
WConfigurationResult SetOutputActiveLevel(WActiveLevel^ activeLevel)
Sets the output active level.
Definition WAgvSensor.h:1240
unsigned int GetImmunityLevel()
Gets the immunity level.
Definition WAgvSensor.h:116
WRawData RetrieveRawData()
Definition WAgvSensor.h:71
WCommunicationStatus Initialize() override
Initializes the object to connect the sensor.
Definition WAgvSensor.h:53
WConfigurationResult SetOffDelay(WOnOffDelay^ offDelay)
Sets the OFF delay.
Definition WAgvSensor.h:1207
void SetInputsValue(ActiveLevelEnum input1, ActiveLevelEnum input2, ActiveLevelEnum input3, ActiveLevelEnum input4)
Definition WAgvSensor.h:1347
WConfigurationResult SetWarningSpot(WWarningSpot^ spotToSet)
Sets the warning spots.
Definition WAgvSensor.h:1025
WAgvSensorLeds GetSensorLeds()
Gets the navigation sensor leds status.
Definition WAgvSensor.h:928
WConfigurationResult SetDeviceName(String^ pName) override
Sets the sensor's name.
Definition WAgvSensor.h:245
void ResetDevice()
Resets the device.
Definition WAgvSensor.h:252
int GetTemperature() override
Gets the temperature.
Definition WAgvSensor.h:140
unsigned int GetPlatformVersion() override
Gets the platform version.
Definition WAgvSensor.h:1435
WConfigurationResult SetNetworkInformation(WNetworkInformation^ pNetwork)
Set the overall network information except IP v4 and Port.
Definition WAgvSensor.h:237
WConfigurationResult SetRawDataExchangeMode(Protocol pProtocol)
Sets the RAW data exchange mode. Can be either TCP or UDP.
Definition WAgvSensor.h:191
WConfigurationResult SetObjectSize(WObjectSize^ sizeToSet)
Sets the object size.
Definition WAgvSensor.h:995
WAngleRange GetAngleRange()
Gets the angle range.
Definition WAgvSensor.h:100
unsigned int GetSelectedField()
Returns the current selected field data based on inputs.
Definition WAgvSensor.h:611
WConfigurationResult SetOnDelay(WOnOffDelay^ onDelay)
Sets the ON delay.
Definition WAgvSensor.h:1177
WContaminationStatus GetContaminationStatus() override
Gets the contamination status.
Definition WAgvSensor.h:148
WConfigurationResult SetOutputFunction(WOutputFunction^ function)
Sets the output function.
Definition WAgvSensor.h:1270
WConfigurationResult SetHoldTime(WHoldTime^ holdTime)
Sets the Hold time.
Definition WAgvSensor.h:1147
WConfigurationResult SetUncoverZoneSize(WUncoverZone^ sizeToSet)
Definition WAgvSensor.h:1056
void SetInputControlModeStatus(InputControleModeStatus controlMode)
Definition WAgvSensor.h:1295
property bool ContaminationLed
Definition WAgvSensorLeds.h:24
property String DeviceName
Definition WDefaultValues.h:47
property int FieldNumber
Definition WFieldData.h:35
property int FieldNumber
Definition WFieldName.h:33
property ObjSizeEnum Near
Definition WObjectSize.h:27
property unsigned int Near
Definition WOnOffDelay.h:24
property FunctionEnum Output1
Definition WOutputFunction.h:28
property UncoveredZoneSizeEnum Near
Definition WUncoverZone.h:27
property unsigned int Near
Definition WWarningSpot.h:26
int GetStart()
Gets the start angle.
Definition AngleRange.cpp:7
int GetStop()
Gets the stop angle.
Definition AngleRange.cpp:25
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 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
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
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
This class is a wrapper around the unmanaged code RawDataSensor. The goal of this classe is make acce...
Definition WRawDataSensor.h:37
int GetTemperature() override
Gets the temperature.
Definition WRawDataSensor.h:539
WConfigurationResult SetNetworkInformation(WNetworkInformation^ pNetwork)
Set the overall network information except IP v4 and Port.
Definition WRawDataSensor.h:814
unsigned int GetPlatformVersion() override
Gets the platform version.
Definition WRawDataSensor.h:508
Protocol GetRawDataExchangeMode()
Get the raw data exchange mode.
Definition WRawDataSensor.h:178
void StopMdi()
Request the sensor to stop sending MDI data to host.
Definition WRawDataSensor.h:1334
String GetDeviceName() override
Gets the sensor's name.
Definition WRawDataSensor.h:710
WConfigurationResult SetContaminationThreshold(WContaminationThreshold^ pContaminationThreshold)
Sets the contamination level threshold for warning and error.
Definition WRawDataSensor.h:1078
unsigned int GetImmunityLevel()
Gets the immunity level.
Definition WRawDataSensor.h:378
WAngleRange GetAngleRange()
Gets the angle range.
Definition WRawDataSensor.h:314
WRawData RetrieveRawData()
Definition WRawDataSensor.h:1229
WConfigurationResult SetImmunityLevel(int pImmunityLevel)
Sets the sensor's immunity level.
Definition WRawDataSensor.h:1048
WCommunicationStatus Initialize() override
Initializes the object to connect the sensor.
Definition WRawDataSensor.h:55
long GetRuntimeHours() override
Gets the sensor runtime hours.
Definition WRawDataSensor.h:680
WNetworkInformation GetNetworkInformation()
Gets whole data information.
Definition WRawDataSensor.h:139
WConfigurationResult SetDeviceName(String^ pName) override
Sets the sensor's name.
Definition WRawDataSensor.h:1138
ScanPacketType GetDataPacketType()
Gets the data packed type.
Definition WRawDataSensor.h:213
void ResetDevice()
Resets the device.
Definition WRawDataSensor.h:80
WConfigurationResult SetDataPacketType(ScanPacketType pPacketType)
Sets the packet type returned in raw data. Can be either ScanPacketType::Distance or ScanPacketType::...
Definition WRawDataSensor.h:881
WContaminationThreshold GetContaminationThreshold()
Gets the contamination threshold.
Definition WRawDataSensor.h:407
WConfigurationResult SetRawDataExchangeMode(Protocol pProtocol)
Sets the RAW data exchange mode. Can be either TCP or UDP.
Definition WRawDataSensor.h:844
void SendMdi()
Request the sensor to start sending MDI data to host.
Definition WRawDataSensor.h:1305
List< WRawDataError^> GetErrorLog()
Gets the error log.
Definition WRawDataSensor.h:568
void RebootDevice()
Reboots the device.
Definition WRawDataSensor.h:108
WSoftwareVersion GetVersion() override
Gets the sensor version data.
Definition WRawDataSensor.h:442
WConfigurationResult SetAngleRange(WAngleRange^ pAngleRange)
Sets the Angle range (start and stop)
Definition WRawDataSensor.h:987
A wrapper on the SensorLamps data encapsulation.
Definition WSensorLamps.h:11
property LedColor Led1
Definition WSensorLamps.h:29
An Exception used when a bad acknowledgment error is detected.
Definition BadAcknowledgmentException.h:15
virtual const char * what() const noexcept
Overload of message retrie.
Definition BadAcknowledgmentException.h:44
An Exception used when a communication error is detected.
Definition CommunicationException.h:15
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
An exception used when the sensor returns an error related to a command excecution.
Definition SensorErrorException.h:14
An Exception used when a thread creation error is detected.
Definition ThreadCreationException.h:16
Definition WBadAcknowledgmentException.h:6
Definition WCommunicationException.h:6
property int ErrorCode
Definition WCommunicationException.h:12
Definition WCommunicationStatus.h:16
A wrapper on the ConfigurationResult data encapsulation.
Definition WConfigurationResult.h:16
property bool Result
Definition WConfigurationResult.h:30
Definition WContaminationStatus.h:6
Definition WRawData.h:7
Definition WSensorException.h:6
property String ErrorCode
Definition WSensorException.h:12
A wrapper on the SoftwareVersion data encapsulation.
Definition WSoftwareVersion.h:12
Definition WThreadCreationException.h:6
static char * ConvertToNativeString(String^ toConvert)
Definition WUtilities.h:16