| | 28 | |
| | 29 | == Member Functions == |
| | 30 | |
| | 31 | === Open === |
| | 32 | Opens a specified file, or using the filename already stored in the object. |
| | 33 | |
| | 34 | * bool Open(const string& strFilename, const string& strMode); |
| | 35 | * bool Open(const string& strFilename, const char* pszMode); |
| | 36 | * bool Open(const char* pszFilename, const string& strMode); |
| | 37 | * bool Open(const char* pszFilename, const char* pszMode); |
| | 38 | * bool Open(const char* pszMode); |
| | 39 | |
| | 40 | ==== Parameters ==== |
| | 41 | * strFilename - filename |
| | 42 | * pszFilename - filename |
| | 43 | * strMode - mode |
| | 44 | * pszMode - mode |
| | 45 | |
| | 46 | ==== Return ==== |
| | 47 | |
| | 48 | Returns true if successful or false if unsuccessful. |
| | 49 | |
| | 50 | |
| | 51 | === Close === |
| | 52 | Closes the file |
| | 53 | * void Close(void); |
| | 54 | |
| | 55 | ==== Parameters ==== |
| | 56 | |
| | 57 | Function does not accept any parameters |
| | 58 | |
| | 59 | ==== Result ==== |
| | 60 | |
| | 61 | Function does not return any result. |
| | 62 | |
| | 63 | === SetSerial === |
| | 64 | |
| | 65 | bool SetSerial(baud_index baud, data_bit_index = data8, parity_index = parityNone, stop_bit_index = stopOne); |
| | 66 | |
| | 67 | === ReadLine === |
| | 68 | |
| | 69 | bool ReadLine(std::string& str); |
| | 70 | |
| | 71 | === DeleteFile === |
| | 72 | |
| | 73 | static bool DeleteFile(std::string& filepath); |
| | 74 | static bool DeleteFile(const char* filepath); |
| | 75 | |
| | 76 | bool DeleteFile(void); |
| | 77 | |
| | 78 | |
| | 79 | === IsReady === |
| | 80 | |
| | 81 | bool IsReady(void); |
| | 82 | |
| | 83 | === SetRTS === |
| | 84 | |
| | 85 | bool SetRTS(bool on = true); |
| | 86 | |
| | 87 | === GetFile === |
| | 88 | |
| | 89 | FILE* GetFile(void); |
| | 90 | |
| | 91 | === Print === |
| | 92 | |
| | 93 | void Print(const std::string& fmt, ...); |
| | 94 | void Print(const char * fmt, va_list& args); |
| | 95 | void Print(const std::string& fmt, va_list& args); |
| | 96 | void Print(const char * fmt, va_list& args); |
| | 97 | |
| | 98 | === SetNonBlocking === |
| | 99 | |
| | 100 | void SetNonBlocking(void); |
| | 101 | |
| | 102 | |
| | 103 | |
| | 104 | === Read === |
| | 105 | |
| | 106 | bool Read(void * ptr, size_t size); |
| | 107 | |
| | 108 | === Write === |
| | 109 | |
| | 110 | bool Write(void * buf, size_t size); |
| | 111 | |
| | 112 | === GetBytesRead === |
| | 113 | |
| | 114 | size_t GetBytesRead(void); |
| | 115 | |
| | 116 | === GetbytesWritten === |
| | 117 | |
| | 118 | size_t GetBytesWritten(void); |
| | 119 | |
| | 120 | === Seek === |
| | 121 | |
| | 122 | bool Seek(long int offset, long int origin = SEEK_SET); |
| | 123 | |
| | 124 | |