Pleora Technologies Inc. eBUS SDK v6.4.0.6670 API



PvResult.h
Go to the documentation of this file.
1 // *****************************************************************************
2 //
3 // Copyright (c) 2007, Pleora Technologies Inc., All rights reserved.
4 //
5 // *****************************************************************************
6 
7 #ifndef __PVRESULT_H__
8 #define __PVRESULT_H__
9 
10 #include <PvString.h>
11 
29 class PV_BASE_API PvResult
30 {
31 
32 public:
33 
37  PvResult();
38 
44  PvResult( uint32_t aCode );
45 
52  PvResult( uint32_t aCode, uint32_t aOSCode );
53 
60  PvResult( uint32_t aCode, const PvString & aDescription );
61 
69  PvResult( uint32_t aCode, uint32_t aOSCode, const PvString & aDescription );
70 
76  PvResult( const PvResult& aResult );
77 
78  // The destructor is not virtual to make as much efficient as possible using
79  // the object as return value.
83  ~PvResult();
84 
88  operator const char * () const;
89 
90  PvResult& operator = (const PvResult & aB);
91 
99  bool operator == ( const PvResult & aB ) const;
100 
108  bool operator == ( const uint32_t aCode ) const;
109 
112  //
117  bool operator != ( const PvResult & aB ) const;
118 
126  bool operator != ( const uint32_t aCode ) const;
127 
135  const PvResult & operator |= ( const PvResult & aB );
136 
142  void SetCode( uint32_t aIn );
143 
149  uint32_t GetCode() const;
150 
156  PvString GetCodeString() const;
157 
163  PvString GetDescription() const;
164 
170  void SetDescription( const PvString & aDescription );
171 
177  bool HasDescription() const;
178 
184  bool IsFailure() const;
185 
191  bool IsOK() const;
192 
198  bool IsPending() const;
199 
212  bool IsSuccess() const;
213 
214 // Can be used to retrieve internal diagnostic information
226  uint32_t GetInternalCode() const;
227 
237  uint32_t GetOSCode() const;
238 
239 
242 
247 
258 
267 
272 
273 
280 
288 
293 
298 
305 
312 
322 
329 
337 
344 
354 
355 
363 
371 
379 
384 
389 
397 
398 
407 
414 
424 
429 
434 
441 
448 
453 
458 
463 
468 
473 
478 
483 
488 
493 
498  struct Code
499  {
500  enum CodeEnum
501  {
502  OK = 0,
503  NOT_INITIALIZED = 0x0605,
504  NOT_FOUND = 0x0019,
505  CANNOT_OPEN_FILE = 0x0006,
506  NO_MORE_ITEM = 0x0015,
507  NOT_CONNECTED = 0x0017,
508  STATE_ERROR = 0x001c,
509  THREAD_ERROR = 0x001d,
510  INVALID_DATA_FORMAT = 0x0501,
511  ABORTED = 0x0001,
512  NOT_ENOUGH_MEMORY = 0x0018,
513  GENERIC_ERROR = 0x4000,
514  INVALID_PARAMETER = 0x4001,
515  CANCEL = 0x4002,
516  PENDING = 0xffff,
517  TIMEOUT = 0x001e,
518  NO_LICENSE = 0x0602,
519  GENICAM_XML_ERROR = 0x0904,
520  CANT_READ_MANIFEST = 0x0905,
521  NOT_IMPLEMENTED = 0x0604,
522  NOT_SUPPORTED = 0x001a,
523  FILE_ERROR = 0x0010,
524  ERR_OVERFLOW = 0x001b,
525  IMAGE_ERROR = 0x0025,
526  MISSING_PACKETS = 0x0027,
527  BUFFER_TOO_SMALL = 0x0004,
528  TOO_MANY_RESENDS = 0x0b00,
529  RESENDS_FAILURE = 0x0b01,
530  TOO_MANY_CONSECUTIVE_RESENDS = 0x0b03,
531  AUTO_ABORTED = 0x0b02,
532  BAD_VERSION = 0x0201,
533  NO_MORE_ENTRY = 0x0603,
534  NO_AVAILABLE_DATA = 0x0014,
535  NETWORK_ERROR = 0x0013,
536  RESYNC = 0x0028,
537  BUSY = 0x0202,
538  CORRUPTED_DATA = 0x0303
539  };
540  };
541 
542 private:
543 
544  uint32_t mCode;
545  uint32_t mInternalCode;
546  uint32_t mOSCode;
547  PvString* mDescription;
548 
549 };
550 
551 
552 //
553 // Direct #defines or the PvResult::Code - typically used to solve
554 // delay-loading issues
555 //
556 
557 #define PV_OK ( 0 )
558 #define PV_NOT_INITIALIZED ( 0x0605 )
559 #define PV_NOT_FOUND ( 0x0019 )
560 #define PV_CANNOT_OPEN_FILE (0x0006 )
561 #define PV_NO_MORE_ITEM ( 0x0015 )
562 #define PV_NOT_CONNECTED ( 0x0017 )
563 #define PV_STATE_ERROR ( 0x001c )
564 #define PV_THREAD_ERROR ( 0x001d )
565 #define PV_INVALID_DATA_FORMAT ( 0x0501 )
566 #define PV_ABORTED ( 0x0001 )
567 #define PV_NOT_ENOUGH_MEMORY ( 0x0018 )
568 #define PV_GENERIC_ERROR ( 0x4000 )
569 #define PV_INVALID_PARAMETER ( 0x4001 )
570 #define PV_CANCEL ( 0x4002 )
571 #define PV_PENDING ( 0xffff )
572 #define PV_TIMEOUT ( 0x001e )
573 #define PV_NO_LICENSE ( 0x0602 )
574 #define PV_GENICAM_XML_ERROR ( 0x0904 )
575 #define PV_CANT_READ_MANIFEST ( 0x0905 )
576 #define PV_NOT_IMPLEMENTED ( 0x0604 )
577 #define PV_NOT_SUPPORTED ( 0x001a )
578 #define PV_FILE_ERROR ( 0x0010 )
579 #define PV_ERR_OVERFLOW ( 0x001b )
580 #define PV_IMAGE_ERROR ( 0x0025 )
581 #define PV_MISSING_PACKETS ( 0x0027 )
582 #define PV_BUFFER_TOO_SMALL ( 0x0004 )
583 #define PV_TOO_MANY_RESENDS ( 0x0b00 )
584 #define PV_RESENDS_FAILURE ( 0x0b01 )
585 #define PV_TOO_MANY_CONSECUTIVE_RESENDS ( 0x0b03 )
586 #define PV_AUTO_ABORTED ( 0x0b02 )
587 #define PV_BAD_VERSION ( 0x0201 )
588 #define PV_NO_MORE_ENTRY ( 0x0603 )
589 #define PV_NO_AVAILABLE_DATA ( 0x0014 )
590 #define PV_NETWORK_ERROR ( 0x0013 )
591 #define PV_RESYNC ( 0x0028 )
592 #define PV_BUSY ( 0x0202 )
593 #define PV_CORRUPTED_DATA ( 0x0303 )
594 
595 #endif
Result information.
Definition: PvResult.h:30
String class.
Definition: PvString.h:26
Definition: PvResult.h:499
CodeEnum
Definition: PvResult.h:501

Copyright (c) 2002-2024 Pleora Technologies Inc.
www.pleora.com