Pleora Technologies Inc. eBUS SDK v5.1.10.4642 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 
12 
13 class PV_BASE_API PvResult
14 {
15 
16 public:
17 
18  PvResult();
19  PvResult( uint32_t aCode );
20  PvResult( uint32_t aCode, uint32_t aOSCode );
21  PvResult( uint32_t aCode, const PvString & aDescription );
22  PvResult( uint32_t aCode, uint32_t aOSCode, const PvString & aDescription );
23 
24  // copy constructor
25  PvResult( const PvResult& aResult );
26 
27  // The destructor is not virtual to make as much efficient as possible using
28  // the object as return value.
29  ~PvResult();
30 
31  operator const char * () const;
32  PvResult& operator = (const PvResult & aB);
33  bool operator == ( const PvResult & aB ) const;
34  bool operator == ( const uint32_t aCode ) const;
35  bool operator != ( const PvResult & aB ) const;
36  bool operator != ( const uint32_t aCode ) const;
37  const PvResult & operator |= ( const PvResult & aB );
38 
39  void SetCode( uint32_t aIn );
40  uint32_t GetCode() const;
41  PvString GetCodeString() const;
42  PvString GetDescription() const;
43  void SetDescription( const PvString & aDescription );
44 
45  bool IsFailure() const;
46  bool IsOK() const;
47  bool IsPending() const;
48  bool IsSuccess() const;
49 
50  // Can be used to retrieve internal diagnostic information
51  uint32_t GetInternalCode() const;
52  uint32_t GetOSCode() const;
53 
54  struct Code
55  {
56  enum CodeEnum
57  {
58  OK = 0,
59  NOT_INITIALIZED = 0x0605,
60  NOT_FOUND = 0x0019,
61  CANNOT_OPEN_FILE = 0x0006,
62  NO_MORE_ITEM = 0x0015,
63  NOT_CONNECTED = 0x0017,
64  STATE_ERROR = 0x001c,
65  THREAD_ERROR = 0x001d,
66  INVALID_DATA_FORMAT = 0x0501,
67  ABORTED = 0x0001,
68  NOT_ENOUGH_MEMORY = 0x0018,
69  GENERIC_ERROR = 0x4000,
70  INVALID_PARAMETER = 0x4001,
71  CANCEL = 0x4002,
72  PENDING = 0xffff,
73  TIMEOUT = 0x001e,
74  NO_LICENSE = 0x0602,
75  GENICAM_XML_ERROR = 0x0904,
76  CANT_READ_MANIFEST = 0x0905,
77  NOT_IMPLEMENTED = 0x0604,
78  NOT_SUPPORTED = 0x001a,
79  FILE_ERROR = 0x0010,
80  ERR_OVERFLOW = 0x001b,
81  IMAGE_ERROR = 0x0025,
82  MISSING_PACKETS = 0x0027,
83  BUFFER_TOO_SMALL = 0x0004,
84  TOO_MANY_RESENDS = 0x0b00,
85  RESENDS_FAILURE = 0x0b01,
86  TOO_MANY_CONSECUTIVE_RESENDS = 0x0b03,
87  AUTO_ABORTED = 0x0b02,
88  BAD_VERSION = 0x0201,
89  NO_MORE_ENTRY = 0x0603,
90  NO_AVAILABLE_DATA = 0x0014,
91  NETWORK_ERROR = 0x0013,
92  RESYNC = 0x0028,
93  BUSY = 0x0202,
94  CORRUPTED_DATA = 0x0303
95  };
96  };
97 
98 private:
99 
100  uint32_t mCode;
101  uint32_t mInternalCode;
102  uint32_t mOSCode;
103  PvString* mDescription;
104 
105 };
106 
107 
108 //
109 // Direct #defines or the PvResult::Code - typically used to solve
110 // delay-loading issues
111 //
112 
113 #define PV_OK ( 0 )
114 #define PV_NOT_INITIALIZED ( 0x0605 )
115 #define PV_NOT_FOUND ( 0x0019 )
116 #define PV_CANNOT_OPEN_FILE (0x0006 )
117 #define PV_NO_MORE_ITEM ( 0x0015 )
118 #define PV_NOT_CONNECTED ( 0x0017 )
119 #define PV_STATE_ERROR ( 0x001c )
120 #define PV_THREAD_ERROR ( 0x001d )
121 #define PV_INVALID_DATA_FORMAT ( 0x0501 )
122 #define PV_ABORTED ( 0x0001 )
123 #define PV_NOT_ENOUGH_MEMORY ( 0x0018 )
124 #define PV_GENERIC_ERROR ( 0x4000 )
125 #define PV_INVALID_PARAMETER ( 0x4001 )
126 #define PV_CANCEL ( 0x4002 )
127 #define PV_PENDING ( 0xffff )
128 #define PV_TIMEOUT ( 0x001e )
129 #define PV_NO_LICENSE ( 0x0602 )
130 #define PV_GENICAM_XML_ERROR ( 0x0904 )
131 #define PV_CANT_READ_MANIFEST ( 0x0905 )
132 #define PV_NOT_IMPLEMENTED ( 0x0604 )
133 #define PV_NOT_SUPPORTED ( 0x001a )
134 #define PV_FILE_ERROR ( 0x0010 )
135 #define PV_ERR_OVERFLOW ( 0x001b )
136 #define PV_IMAGE_ERROR ( 0x0025 )
137 #define PV_MISSING_PACKETS ( 0x0027 )
138 #define PV_BUFFER_TOO_SMALL ( 0x0004 )
139 #define PV_TOO_MANY_RESENDS ( 0x0b00 )
140 #define PV_RESENDS_FAILURE ( 0x0b01 )
141 #define PV_TOO_MANY_CONSECUTIVE_RESENDS ( 0x0b03 )
142 #define PV_AUTO_ABORTED ( 0x0b02 )
143 #define PV_BAD_VERSION ( 0x0201 )
144 #define PV_NO_MORE_ENTRY ( 0x0603 )
145 #define PV_NO_AVAILABLE_DATA ( 0x0014 )
146 #define PV_NETWORK_ERROR ( 0x0013 )
147 #define PV_RESYNC ( 0x0028 )
148 #define PV_BUSY ( 0x0202 )
149 #define PV_CORRUPTED_DATA ( 0x0303 )
150 
151 #endif
Definition: PvResult.h:54
String class.
Definition: PvString.h:21
Result information.
Definition: PvResult.h:13
CodeEnum
Definition: PvResult.h:56

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