30.11.2013 - New PICollection namespace, Android support, my own PIVector implementation

This commit is contained in:
peri4
2013-11-30 19:34:53 +04:00
parent ec5530053a
commit f50891b376
64 changed files with 5466 additions and 3392 deletions

View File

@@ -155,7 +155,10 @@ public:
//! Read from device maximum "max_size" bytes and return them as PIByteArray
PIByteArray read(int max_size) {buffer_in.resize(max_size); int ret = read(buffer_in.data(), max_size); if (ret < 0) return PIByteArray(); return buffer_in.resized(ret);}
//! Write to device "data"
//! Read from device for "timeout_ms" milliseconds and return readed data as PIByteArray. Timeout should to be greater than 0
PIByteArray readForTime(double timeout_ms);
//! Write "data" to device
int write(const PIByteArray & data) {return write(data.data(), data.size_s());}
@@ -167,7 +170,7 @@ public:
//! Configure device from section "section" of file "config_file", if "parent_section" parent section also will be read
bool configure(const PIString & config_file, const PIString & section, bool parent_section = true);
bool configure(const PIString & config_file, const PIString & section, bool parent_section = false);
EVENT_HANDLER(bool, open) {if (!init_) init(); opened_ = openDevice(); if (opened_) opened(); return opened_;}
@@ -229,6 +232,19 @@ public:
//! \brief Raise if write thread succesfull write some data of task with ID "id"
//! \}
//! \ioparams
//! \{
#ifdef DOXYGEN
//! \brief setReopenEnabled, default "true"
bool reopenEnabled;
//! \brief setReopenTimeout in ms, default 1000
int reopenTimeout;
//! \brief setThreadedReadBufferSize in bytes, default 4096
int threadedReadBufferSize;
#endif
//! \}
protected: