Pleora Technologies Inc. eBUS SDK v6.4.0.6670 API



PvGenFile.h
1 // *****************************************************************************
2 //
3 // Copyright (c) 2009, Pleora Technologies Inc., All rights reserved.
4 //
5 // *****************************************************************************
6 
7 #ifndef __PVGENFILE_H__
8 #define __PVGENFILE_H__
9 
10 #include <PvGenParameterArray.h>
11 #include <PvStringList.h>
12 
13 
14 typedef enum
15 {
16  PvGenOpenModeWrite = 0,
17  PvGenOpenModeRead = 1,
18  PvGenOpenModeUndefined = 999
19 
20 } PvGenOpenMode;
21 
22 
23 namespace PvGenICamLib
24 {
25  class GenFile;
26 }
27 
28 
37 class PV_GENICAM_API PvGenFile
38 {
39 public:
40 
44  PvGenFile();
45 
49  virtual ~PvGenFile();
50 
73  PvResult Open( PvGenParameterArray *aArray, const PvString &aFilename, PvGenOpenMode aMode );
74 
87  PvResult Close();
88 
94  bool IsOpened() const;
95 
114  PvResult WriteFrom( const PvString &aLocalFilename );
115 
129  PvResult ReadTo( const PvString &aLocalFilename );
130 
147  PvResult Write( const uint8_t *aBuffer, int64_t aLength, int64_t &aBytesWritten );
148 
165  PvResult Read( uint8_t *aBuffer, int64_t aLength, int64_t &aBytesRead );
166 
191  PvResult GetStatus( PvString &aStatus );
192 
204  PvString GetLastErrorMessage() const;
205 
218  PvResult GetProgress( int64_t &aCompleted, int64_t &aTotal );
219 
239  static bool IsSupported( PvGenParameterArray *aArray );
240 
249  static bool IsReadable( PvGenParameterArray *aArray, const PvString &aFilename );
250 
259  static bool IsWritable( PvGenParameterArray *aArray, const PvString &aFilename );
260 
267  static void GetFiles( PvGenParameterArray *aArray, PvStringList &aFiles );
268 
269 private:
270 
271  // Not implemented
272  PvGenFile( const PvGenFile & );
273  const PvGenFile &operator=( const PvGenFile & );
274 
275  PvGenICamLib::GenFile *mThis;
276 };
277 
278 #endif
String class.
Definition: PvString.h:25
Definition: PvGenCategory.h:15
Result information.
Definition: PvResult.h:29
Allows reading/writing to files hosted on the device.
Definition: PvGenFile.h:37
Class used to hold a group of PvString objects.
Definition: PvStringList.h:19
GenICam feature array.
Definition: PvGenParameterArray.h:72

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