Pleora Technologies Inc. eBUS SDK v6.2.8.5877 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 
29 class PV_GENICAM_API PvGenFile
30 {
31 public:
32 
33  PvGenFile();
34  virtual ~PvGenFile();
35 
36  PvResult Open( PvGenParameterArray *aArray, const PvString &aFilename, PvGenOpenMode aMode );
37  PvResult Close();
38 
39  bool IsOpened() const;
40 
41  PvResult WriteFrom( const PvString &aLocalFilename );
42  PvResult ReadTo( const PvString &aLocalFilename );
43 
44  PvResult Write( const uint8_t *aBuffer, int64_t aLength, int64_t &aBytesWritten );
45  PvResult Read( uint8_t *aBuffer, int64_t aLength, int64_t &aBytesRead );
46 
47  PvResult GetStatus( PvString &aStatus );
48  PvString GetLastErrorMessage() const;
49 
50  PvResult GetProgress( int64_t &aCompleted, int64_t &aTotal );
51 
52  static bool IsSupported( PvGenParameterArray *aArray );
53  static bool IsReadable( PvGenParameterArray *aArray, const PvString &aFilename );
54  static bool IsWritable( PvGenParameterArray *aArray, const PvString &aFilename );
55  static void GetFiles( PvGenParameterArray *aArray, PvStringList &aFiles );
56 
57 private:
58 
59  // Not implemented
60  PvGenFile( const PvGenFile & );
61  const PvGenFile &operator=( const PvGenFile & );
62 
63  PvGenICamLib::GenFile *mThis;
64 };
65 
66 #endif
String class.
Definition: PvString.h:21
Definition: PvGenCategory.h:15
Result information.
Definition: PvResult.h:13
Allows reading/writing to files hosted on the device.
Definition: PvGenFile.h:29
Class used to hold a group of PvString objects.
Definition: PvStringList.h:19
GenICam feature array.
Definition: PvGenParameterArray.h:38

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