diff --git a/doc/html/annotated.html b/doc/html/annotated.html deleted file mode 100644 index a427335e..00000000 --- a/doc/html/annotated.html +++ /dev/null @@ -1,145 +0,0 @@ - - -
- - - - -|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| ▼CPIBinaryLog | Class for read and write binary data to logfile, and playback this data in realtime, or custom speed |
| CBinLogIndex | Struct contains position, ID and timestamp of record in file |
| CBinLogInfo | Struct contains full information about Binary Log file and about all Records using map of BinLogRecordInfo |
| CBinLogRecordInfo | Struct contains information about all records with same ID |
| CPIBroadcast | Broadcast for all interfaces, including loopback |
| ▼CPIByteArray | Byte array |
| CRawData | Help struct to store/restore custom blocks of data to/from PIByteArray |
| CPIChar | Unicode char |
| CPIChunkStream | Class for binary serialization |
| CPICLI | Command-line arguments parser |
| CPICollection | Interface to discover element groups |
| ▼CPIConfig | Configuration file |
| CBranch | Branch is a list of entries of configuration file |
| CEntry | Entry of configuration file |
| CPIConnection | Complex Input/Output point |
| CPIConsole | Console output class |
| ▼CPICout | Class for formatted output similar std::cout |
| CNotifier | Class for emit notifications of PICout |
| ▼CPIDiagnostics | Connection quality diagnostics |
| CState | Information about current diagnostics state |
| CPIDir | Local directory |
| ▼CPIEthernet | Ethernet device |
| CAddress | IPv4 network address, IP and port |
| CInterface | Network interface descriptor |
| CInterfaceList | Array of Interface with some features |
| CPIEthUtilBase | Base class for ethernet utils |
| CPIEvaluator | This class provide mathematical evaluations of custom expression |
| CPIFile | Local file |
| CPIFlags | This class used as container for bit flags |
| CPIIOByteArray | PIIODevice wrapper around PIByteArray |
| CPIIODevice | Base class for input/output classes |
| CPIIOString | PIIODevice wrapper around PIString |
| ▼CPIKbdListener | Keyboard console input listener |
| CKeyEvent | This struct contains information about pressed keyboard key |
| CMouseEvent | This struct contains information about mouse action |
| CWheelEvent | This struct contains information about mouse wheel action |
| CPIMutex | Mutex |
| CPIObject | This is base class for any classes which use events -> handlers mechanism |
| CPIPacketExtractor | Packets extractor |
| CPIProcess | |
| CPISerial | Serial device |
| CPISet | Set of any type |
| CPISharedMemory | Shared memory |
| ▼CPIStateMachine | Base class for custom state machine |
| CRule | Rule of transition between states of machine |
| CState | State of machine |
| CPIStreamPacker | Simple packet wrap aroud any PIIODevice |
| CPIString | String class |
| CPIStringList | Strings array class |
| CPISystemTime | System time |
| CPIThread | Thread class |
| CPITimeMeasurer | Time measurements |
| CPITimer | Timer |
| CPITransparentDevice | PIIODevice that pass write to read |
| CPIVariant | Variant type |
| CPIVector | Dynamic array of any type |
| CPIVector2D | 2D array, |
| CTileVars | |
| CTransferFunction | Differential evaluations |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIBinaryLog, including all inherited members.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Class for read and write binary data to logfile, and playback this data in realtime, or custom speed. - More...
-
-Classes | |
| struct | BinLogIndex |
| Struct contains position, ID and timestamp of record in file. More... | |
| struct | BinLogInfo |
| Struct contains full information about Binary Log file and about all Records using map of BinLogRecordInfo. More... | |
| struct | BinLogRecordInfo |
| Struct contains information about all records with same ID. More... | |
-Public Types | |
| enum | PlayMode { PlayRealTime, -PlayVariableSpeed, -PlayStaticDelay - } |
| Play modes for PIBinaryLog. More... | |
| enum | SplitMode { SplitNone, -SplitTime, -SplitSize, -SplitCount - } |
| Different split modes for writing PIBinaryLog, which can separate files by size, by time or by records count. More... | |
Public Types inherited from PIIODevice | |
| enum | DeviceMode { ReadOnly = 0x01, -WriteOnly = 0x02, -ReadWrite = 0x03 - } |
| Open modes for PIIODevice. More... | |
| enum | DeviceOption { BlockingRead = 0x01, -BlockingWrite = 0x02 - } |
| Options for PIIODevice, works with some devices. More... | |
| enum | DeviceInfoFlag { Sequential = 0x01, -Reliable = 0x02 - } |
| Characteristics of PIIODevice subclass. More... | |
Public Types inherited from PIThread | |
| enum | Priority { - piLowerst, -piLow, -piNormal, -piHigh, - - piHighest - - } |
| Priority of thread. More... | |
-Public Member Functions | |
| -PlayMode | playMode () const |
| Current PlayMode. | |
| -SplitMode | splitMode () const |
| Current SplitMode. | |
| -PIString | logDir () const |
| Current directory where billogs wiil be saved. | |
| -PIString | filePrefix () const |
| Returns current file prefix. | |
| -int | defaultID () const |
| Default ID, used in write function. | |
| -double | playSpeed () const |
| Returns current play speed. | |
| -PISystemTime | playDelay () const |
| Returns current play delay. | |
| -PISystemTime | splitTime () const |
| Returns current binlog file split time. | |
| -llong | splitFileSize () const |
| Returns current binlog file split size. | |
| -int | splitRecordCount () const |
| Returns current binlog file split records count. | |
| -bool | rapidStart () const |
| Returns if rapid start enabled. | |
| -void | createNewFile (const PIString &path) |
| Create binlog file with Filename = path. | |
| -void | setPlayMode (PlayMode mode) |
| Set PlayMode. | |
| -void | setSplitMode (SplitMode mode) |
| Set SplitMode. | |
| -void | setLogDir (const PIString &path) |
| Set path to directory where binlogs will be saved. | |
| -void | setFilePrefix (const PIString &prefix) |
| Set file prefix, used to. | |
| -void | setDefaultID (int id) |
| Set defaultID, used in write function. | |
| -void | setRapidStart (bool enabled) |
| If enabled BinLog ThreadedRead starts without delay for first record, i.e. first record will be readed immediately. | |
| void | setPlaySpeed (double speed) |
| void | setPlayDelay (const PISystemTime &delay) |
| -void | setPlayRealTime () |
| Set playMode to PlayRealTime. | |
| void | setSplitTime (const PISystemTime &time) |
| void | setSplitFileSize (llong size) |
| void | setSplitRecordCount (int count) |
| -void | setPause (bool pause) |
| Set pause while playing via threadedRead or writing via write. | |
| -int | writeBinLog (int id, PIByteArray data) |
| Write one record to BinLog file, with ID = id, id must be greather than 0. | |
| -int | writeBinLog (int id, const void *data, int size) |
| Write one record to BinLog file, with ID = id, id must be greather than 0. | |
| -int | writeBinLog_raw (int id, const PISystemTime &time, const PIByteArray &data) |
| Write one RAW record to BinLog file, with ID = id, Timestamp = time. | |
| -int | writeCount () const |
| Returns count of writed records. | |
| -PIByteArray | readBinLog (int id=0, PISystemTime *time=0) |
| Read one record from BinLog file, with ID = id, if id = 0 than any id will be readed. | |
| -int | readBinLog (int id, void *read_to, int max_size, PISystemTime *time=0) |
| Read one record from BinLog file, with ID = id, if id = 0 than any id will be readed. | |
| -llong | logSize () const |
| Returns binary log file size. | |
| -bool | isEnd () const |
| Return true, if position at the end of BinLog file. | |
| -bool | isEmpty () const |
| Returns if BinLog file is empty. | |
| -bool | isPause () const |
| Returns BinLog pause status. | |
| -int | lastReadedID () const |
| Returns id of last readed record. | |
| -PISystemTime | lastReadedTimestamp () const |
| Returns timestamp of last readed record. | |
| -int | read (void *read_to, int max_size) |
| Read one message from binlog file, with ID contains in "filterID" or any ID, if "filterID" is empty. | |
| -int | write (const void *data, int size) |
| Write one record to BinLog file, with ID = "defaultID". | |
| -void | restart () |
| Go to begin of BinLog file. | |
| -BinLogInfo | logInfo () const |
| Get binlog info BinLogInfo. | |
| -const PIVector< BinLogIndex > & | logIndex () const |
| Get binlog index BinLogIndex, need createIndex before getting index. | |
| -bool | createIndex () |
| Create index of current binlog file. | |
| -void | seekTo (int rindex) |
| Go to record #index. | |
| -bool | seek (const PISystemTime &time) |
| Go to nearest record. | |
| -bool | seek (llong filepos) |
| Set position in file to reading/playing. | |
| -int | pos () const |
| Get current record index (position record in file) | |
Public Member Functions inherited from PIIODevice | |
| - | PIIODevice () |
| Constructs a empty PIIODevice. | |
| PIIODevice (const PIString &path, DeviceMode mode=ReadWrite) | |
| Constructs a PIIODevice with path and mode. More... | |
| -DeviceMode | mode () const |
| Current open mode of device. | |
| -void | setMode (DeviceMode m) |
| Set open mode of device. | |
| -DeviceOptions | options () const |
| Current device options. | |
| -bool | isOptionSet (DeviceOption o) const |
| Current device option "o" state. | |
| -void | setOptions (DeviceOptions o) |
| Set device options. | |
| -bool | setOption (DeviceOption o, bool yes=true) |
| Set device option "o" to "yes" and return previous state. | |
| -DeviceInfoFlags | infoFlags () const |
| Returns device characteristic flags. | |
| -PIString | path () const |
| Current path of device. | |
| -void | setPath (const PIString &path) |
| Set path of device. | |
| -bool | isReadable () const |
| Return true if mode is ReadOnly or ReadWrite. | |
| -bool | isWriteable () const |
| Return true if mode is WriteOnly or ReadWrite. | |
| -bool | isOpened () const |
| Return true if device is successfully opened. | |
| -bool | isClosed () const |
| Return true if device is closed. | |
| -virtual bool | canRead () const |
| Return true if device can read now. | |
| -virtual bool | canWrite () const |
| Return true if device can write now. | |
| -void | setReopenEnabled (bool yes=true) |
| Set execution of open enabled while threaded read on closed device. | |
| -void | setReopenTimeout (int msecs) |
| Set timeout in milliseconds between open tryings if reopen is enabled. | |
| -bool | isReopenEnabled () const |
| Return reopen enable. | |
| -int | reopenTimeout () |
| Return reopen timeout. | |
| void | setThreadedReadSlot (ReadRetFunc func) |
| Set "threaded read slot". More... | |
| -void | setThreadedReadData (void *d) |
| Set custom data that will be passed to "threaded read slot". | |
| void | setThreadedReadBufferSize (int new_size) |
| Set size of threaded read buffer. More... | |
| -int | threadedReadBufferSize () const |
| Return size of threaded read buffer. | |
| -const uchar * | threadedReadBuffer () const |
| Return content of threaded read buffer. | |
| -void * | threadedReadData () const |
| Return custom data that will be passed to "threaded read slot". | |
| -bool | isThreadedRead () const |
| Return true if threaded read is started. | |
| -void | startThreadedRead () |
| Start threaded read. | |
| -void | startThreadedRead (ReadRetFunc func) |
| Start threaded read and assign "threaded read slot" to "func". | |
| -void | stopThreadedRead () |
| Stop threaded read. | |
| -bool | isThreadedWrite () const |
| Return true if threaded write is started. | |
| -void | startThreadedWrite () |
| Start threaded write. | |
| -void | stopThreadedWrite () |
| Stop threaded write. | |
| -void | clearThreadedWriteQueue () |
| Clear threaded write task queue. | |
| -void | start () |
| Start both threaded read and threaded write. | |
| -void | stop (bool wait=false) |
| Stop both threaded read and threaded write and if "wait" block until both threads are stop. | |
| -int | read (void *read_to, int max_size) |
| Read from device maximum "max_size" bytes to "read_to". | |
| -PIByteArray | read (int max_size) |
| Read from device maximum "max_size" bytes and return them as PIByteArray. | |
| -int | write (const void *data, int max_size) |
| Write maximum "max_size" bytes of "data" to device. | |
| -PIByteArray | readForTime (double timeout_ms) |
| Read from device for "timeout_ms" milliseconds and return readed data as PIByteArray. Timeout should to be greater than 0. | |
| -ullong | writeThreaded (const void *data, int max_size) |
| Add task to threaded write queue and return task ID. | |
| -ullong | writeThreaded (const PIByteArray &data) |
| Add task to threaded write queue and return task ID. | |
| -bool | configure (const PIString &config_file, const PIString §ion, bool parent_section=false) |
| Configure device from section "section" of file "config_file", if "parent_section" parent section also will be read. | |
| -PIString | constructFullPath () const |
| Reimplement to construct full unambiguous string, describes this device, default returns fullPathPrefix() + "://" + path() | |
| -void | configureFromFullPath (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -bool | open () |
| Open device. | |
| -bool | open (const PIString &_path) |
| Open device with path "path". | |
| -bool | close () |
| Close device. | |
| -int | write (PIByteArray data) |
| Write "data" to device. | |
| -virtual void | flush () |
| Immediate write all buffers. | |
| -void | opened () |
| Raise if succesfull open. | |
| -void | closed () |
| Raise if succesfull close. | |
| -void | threadedReadEvent (uchar *readed, int size) |
| Raise if read thread succesfull read some data. | |
| -void | threadedWriteEvent (ullong id, int written_size) |
| Raise if write thread successfull write some data of task with ID "id". | |
Public Member Functions inherited from PIThread | |
| - | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| - | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| -void | setData (void *d) |
| Set common data passed to external function. | |
| -void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| -void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| -void * | data () const |
| Returns common data passed to external function. | |
| -PIThread::Priority | priority () const |
| Return priority of thread. | |
| -bool | isRunning () const |
Return true if thread is running. | |
| -void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| -PIMutex & | mutex () |
| Returns internal mutex. | |
| -llong | tid () const |
| Returns thread ID. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| -void | lock () |
| Lock internal mutex. | |
| -void | unlock () |
| Unlock internal mutex. | |
| -void | started () |
| Raise on thread start. | |
| -void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Static Public Member Functions | |
| -static BinLogInfo | getLogInfo (const PIString &path) |
| Get binlog info and statistic. | |
Static Public Member Functions inherited from PIIODevice | |
| static PIIODevice * | createFromFullPath (const PIString &full_path) |
| Try to determine suitable device, create new one, configure it with configureFromFullPath() and returns it. More... | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
-Public Attributes | |
| -PIVector< int > | filterID |
| Array of ID, that BinLog can read from binlog file, when use read function, or in ThreadedRead. | |
Public Attributes inherited from PIIODevice | |
| -bool | reopenEnabled |
| setReopenEnabled, default "true" | |
| -int | reopenTimeout |
| setReopenTimeout in ms, default 1000 | |
| -int | threadedReadBufferSize |
| setThreadedReadBufferSize in bytes, default 4096 | |
-Protected Member Functions | |
| -PIString | fullPathPrefix () const |
| Reimplement to construct full unambiguous string prefix. Creating devices by unambiguous string. | |
| -PIString | constructFullPathDevice () const |
| Reimplement to construct full unambiguous string, describes this device. Default implementation returns path() | |
| -void | configureFromFullPathDevice (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -int | readDevice (void *read_to, int max_size) |
| Reimplement this function to read from your device. | |
| -int | writeDevice (const void *data, int size) |
| Reimplement this function to write to your device. | |
| -bool | openDevice () |
| Reimplement to open device, return value will be set to "opened_" variable; don't call this function in subclass, use open() | |
| -bool | closeDevice () |
| Reimplement to close device, inverse return value will be set to "opened_" variable. | |
| -void | propertyChanged (const PIString &) |
| Virtual function executes after property with name "name" has been changed. | |
| -bool | threadedRead (uchar *readed, int size) |
| Function executed when thread read some data, default implementation execute external slot "ret_func_". | |
| -DeviceInfoFlags | deviceInfoFlags () const |
| Reimplement to return correct DeviceInfoFlags. Default implementation returns 0. | |
Protected Member Functions inherited from PIIODevice | |
| -virtual bool | init () |
| Function executed before first openDevice() or from constructor. | |
| -virtual bool | configureDevice (const void *e_main, const void *e_parent=0) |
| Reimplement to configure device from entries "e_main" and "e_parent", cast arguments to PIConfig::Entry*. | |
| -virtual void | optionsChanged () |
| Reimplement to apply new device options. | |
| -virtual void | threadedReadBufferSizeChanged () |
| Reimplement to apply new threadedReadBufferSize() | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| void | deleted () |
| Raise before object delete. More... | |
-Handlers | |
| -PIString | createNewFile () |
| Create new binlog file in logDir, if successful returns filename, else returns empty string. Filename is like filePrefix + "yyyy_MM_dd__hh_mm_ss.binlog". | |
-Events | |
| -void | fileEnd () |
| Raise on file end while reading. | |
| -void | fileError () |
| Raise on file creation error. | |
| -void | newFile (const PIString &filename) |
| Raise on new file created. | |
-Additional Inherited Members | |
Related Functions inherited from PIIODevice | |
| template<typename T > | |
| T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) |
| Service function. useful for configuring devices. More... | |
| -#define | REGISTER_DEVICE(class) |
| Use this macro to enable automatic creation instances of your class with createFromFullPath() function. | |
| -#define | PIIODEVICE(class) |
| Use this macro instead of PIOBJECT when describe your own PIIODevice. | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Class for read and write binary data to logfile, and playback this data in realtime, or custom speed.
-TODO: Create static functions to join binlog files TODO: Create functions to insert and delete records
-Binary Log is a file with simple header, where you can read and write some binary data. Any written data include special header with ID, size and timestamp. This header provides separation different messages from the one file by choosing different IDs. With filterID or special functions, like readBinLog() you can choose IDs what you want to read. With function writeBinLog() or setDefaultID() you can choose ID that mark you data. By default ID = 1, and filterID is empty, that mean you read any ID without filtering. ThreadedRead provide you playback data, with delay that you write data. You can choose different playbak modes by set PlayMode.
-This class provide all functions of PIIODevice, such open(), close(), read() ,write(), and threaded read/write. function setLogDir() need to set directory for BinLog files function createNewFile() need to create new binlog file function restart() need start from the begining of binlog file
-| enum PIBinaryLog::PlayMode | -
Play modes for PIBinaryLog.
-| enum PIBinaryLog::SplitMode | -
Different split modes for writing PIBinaryLog, which can separate files by size, by time or by records count.
-| Enumerator | |
|---|---|
| SplitNone | Without separate, default mode - |
| SplitTime | Separate files by record time - |
| SplitSize | Separate files by size - |
| SplitCount | Separate files by records count - |
-
|
- -inline | -
Set play speed to "speed", default value is 1.0x Also this function set playMode to PlayVariableSpeed
- -
-
|
- -inline | -
Setting static delay between records, default value is 1 sec Also this function set playMode to PlayStaticDelay
- -
-
|
- -inline | -
Set binlog file split time Also this function set splitMode to SplitTime
- -
-
|
- -inline | -
Set binlog file split size Also this function set splitMode to SplitSize
- -
-
|
- -inline | -
Set binlog file split records count Also this function set splitMode to SplitCount
- -|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIBroadcast, including all inherited members.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Broadcast for all interfaces, including loopback. - More...
-
-Public Types | |
| enum | Channel { Multicast = 0x01, -Broadcast = 0x02, -Loopback = 0x04, -All = 0xFFFF - } |
| PIBroadcast channels, can be used independently More... | |
Public Types inherited from PIThread | |
| enum | Priority { - piLowerst, -piLow, -piNormal, -piHigh, - - piHighest - - } |
| Priority of thread. More... | |
-Public Member Functions | |
| PIBroadcast (bool send_only=false) | |
| -void | setChannels (Channels ch) |
| Set channels to "ch" and queue to reinit. | |
| -Channels | channels () const |
| Returns channels. | |
| -bool | isSendOnly () const |
| Returns if is send_only. | |
| -void | setMulticastGroup (const PIString &mg) |
| Set multicast IP to "mg" and queue to reinit. | |
| -PIString | multicastGroup () const |
| Returns multicast IP. | |
| -void | setMulticastPort (ushort port) |
| Set multicast port to "port" and queue to reinit. | |
| -ushort | multicastPort () const |
| Returns multicast port. | |
| -void | setMulticastAddress (const PIEthernet::Address &addr) |
| Set multicast address to "addr" and queue to reinit. | |
| -PIEthernet::Address | multicastAddress () const |
| Returns multicast address. | |
| -void | setBroadcastPort (ushort port) |
| Set broadcast port to "port" and queue to reinit. | |
| -ushort | broadcastPort () |
| Returns broadcast port. | |
| -void | setLoopbackPort (ushort port) |
| Set loopback start port to "port" and queue to reinit. | |
| -ushort | loopbackPort () |
| Returns loopback start port. | |
| -void | setLoopbackPortsCount (int count) |
| Set loopback ports count to "count" and queue to reinit. | |
| -int | loopbackPortsCount () const |
| Returns loopback ports count. | |
| -void | startRead () |
| If not send_only starts all threaded reads. | |
| -void | stopRead () |
| Stop all threaded reads. | |
| -void | reinit () |
| Reinit all PIEthernets with current PIEthernet::allAddresses() | |
| -void | send (const PIByteArray &data) |
| Send packet. | |
Public Member Functions inherited from PIThread | |
| - | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| - | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| -void | setData (void *d) |
| Set common data passed to external function. | |
| -void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| -void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| -void * | data () const |
| Returns common data passed to external function. | |
| -PIThread::Priority | priority () const |
| Return priority of thread. | |
| -bool | isRunning () const |
Return true if thread is running. | |
| -void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| -PIMutex & | mutex () |
| Returns internal mutex. | |
| -llong | tid () const |
| Returns thread ID. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| -void | lock () |
| Lock internal mutex. | |
| -void | unlock () |
| Unlock internal mutex. | |
| -void | started () |
| Raise on thread start. | |
| -void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
Public Member Functions inherited from PIEthUtilBase | |
| -void | setCryptEnabled (bool on) |
| Set crypt layer enabled. | |
| -void | cryptEnable () |
| Enable crypt layer. | |
| -void | cryptDisable () |
| Disable crypt layer. | |
| -bool | isCryptEnabled () const |
| Returns if crypt layer enabled. | |
| -void | setCryptKey (const PIByteArray &k) |
| Set crypt layer key to "k". | |
| void | createCryptKey (const PIString &k) |
| -PIByteArray | cryptKey () const |
| Returns crypt layer key. | |
-Protected Member Functions | |
| -virtual void | received (PIByteArray data) |
| Called when packet received. | |
Protected Member Functions inherited from PIThread | |
| -virtual void | begin () |
| Function executed once at the start of thread. | |
| -virtual void | end () |
| Function executed once at the end of thread. | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
Protected Member Functions inherited from PIEthUtilBase | |
| -PIByteArray | cryptData (const PIByteArray &data) |
| Returns encrypted data if layer enabled, otherwise returns unchanged "data". | |
| -PIByteArray | decryptData (const PIByteArray &data) |
| Returns decrypted data if layer enabled, otherwise returns unchanged "data". If decryption was unsuccessfull returns empty PIByteArray. | |
-Events | |
| -void | receiveEvent (PIByteArray data) |
| Raise on packet received. | |
-Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Broadcast for all interfaces, including loopback.
-PIBroadcast used as multichannel IO device. It can use multicast, broadcast and loopback ethernet channels to send/receive packets. send() function send packet to all initialized ethernets. receiveEvent() raised on packet received by any ethernet. All multi/broadcast ethernets created for all current addresses, obtained by PIEthernets::allAddresses().
-PIBroadcast starts thread , which every 3 seconds check if current PIEthernet::allAddresses() was changed and call reinit() if it necessary.
-| enum PIBroadcast::Channel | -
| PIBroadcast::PIBroadcast | -( | -bool | -send_only = false | ) | -- |
Contructs PIBroadcast, if "send_only" not set all PIEthernets will be binded to receive data
- -|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIByteArray, including all inherited members.
-| append(const void *data_, int size_) | PIByteArray | inline |
| append(const PIByteArray &data_) | PIByteArray | inline |
| checksumPlain32() const | PIByteArray | |
| checksumPlain8() const | PIByteArray | |
| compressRLE(uchar threshold=192) | PIByteArray | |
| convertFromBase64() | PIByteArray | |
| convertToBase64() | PIByteArray | |
| operator!=(PIByteArray &f, PIByteArray &s) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIList< T > &v) | PIByteArray | related |
| operator<<(PICout s, const PIByteArray &ba) | PIByteArray | related |
| operator<<(PIByteArray &s, bool v) | PIByteArray | related |
| operator<<(PIByteArray &s, char v) | PIByteArray | related |
| operator<<(PIByteArray &s, uchar v) | PIByteArray | related |
| operator<<(PIByteArray &s, const short v) | PIByteArray | related |
| operator<<(PIByteArray &s, const int v) | PIByteArray | related |
| operator<<(PIByteArray &s, const long &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const llong &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const ushort v) | PIByteArray | related |
| operator<<(PIByteArray &s, const uint v) | PIByteArray | related |
| operator<<(PIByteArray &s, const ulong &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const ullong &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const float v) | PIByteArray | related |
| operator<<(PIByteArray &s, const double &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const ldouble &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIFlags< T > &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIByteArray &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIByteArray::RawData &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIVector< T > &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIDeque< T > &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIMap< Key, T > &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIBitArray &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIString &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIStringList &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PISystemTime &v) | PIByteArray | related |
| operator<<(PIByteArray &s, complexf v) | PIByteArray | related |
| operator<<(PIByteArray &s, complexd v) | PIByteArray | related |
| operator<<(PIByteArray &s, complexld v) | PIByteArray | related |
| operator==(PIByteArray &f, PIByteArray &s) | PIByteArray | related |
| operator>>(PIByteArray &s, PIList< T > &v) | PIByteArray | related |
| operator>>(PIByteArray &s, bool &v) | PIByteArray | related |
| operator>>(PIByteArray &s, char &v) | PIByteArray | related |
| operator>>(PIByteArray &s, uchar &v) | PIByteArray | related |
| operator>>(PIByteArray &s, short &v) | PIByteArray | related |
| operator>>(PIByteArray &s, int &v) | PIByteArray | related |
| operator>>(PIByteArray &s, long &v) | PIByteArray | related |
| operator>>(PIByteArray &s, llong &v) | PIByteArray | related |
| operator>>(PIByteArray &s, ushort &v) | PIByteArray | related |
| operator>>(PIByteArray &s, uint &v) | PIByteArray | related |
| operator>>(PIByteArray &s, ulong &v) | PIByteArray | related |
| operator>>(PIByteArray &s, ullong &v) | PIByteArray | related |
| operator>>(PIByteArray &s, float &v) | PIByteArray | related |
| operator>>(PIByteArray &s, double &v) | PIByteArray | related |
| operator>>(PIByteArray &s, ldouble &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIFlags< T > &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIByteArray &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIByteArray::RawData v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIPair< Type0, Type1 > &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIVector< T > &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIDeque< T > &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIMap< Key, T > &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIBitArray &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIString &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIStringList &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PISystemTime &v) | PIByteArray | related |
| operator>>(PIByteArray &s, complexf &v) | PIByteArray | related |
| operator>>(PIByteArray &s, complexd &v) | PIByteArray | related |
| operator>>(PIByteArray &s, complexld &v) | PIByteArray | related |
| PIByteArray() | PIByteArray | inline |
| PIByteArray(const uint size) | PIByteArray | inline |
| PIByteArray(const void *data, const uint size) | PIByteArray | inline |
| resized(int new_size) const | PIByteArray | inline |
| toBase64() const | PIByteArray |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Byte array. - More...
- -Inherits PIDeque< T >.
--Classes | |
| struct | RawData |
| Help struct to store/restore custom blocks of data to/from PIByteArray. More... | |
-Public Member Functions | |
| - | PIByteArray () |
| Constructs an empty byte array. | |
| - | PIByteArray (const uint size) |
| Constructs 0-filled byte array with size "size". | |
| - | PIByteArray (const void *data, const uint size) |
| Constructs byte array from data "data" and size "size". | |
| -PIByteArray | resized (int new_size) const |
| Return resized byte array. | |
| -PIByteArray & | convertToBase64 () |
| Convert data to Base 64 and return this byte array. | |
| -PIByteArray & | convertFromBase64 () |
| Convert data from Base 64 and return this byte array. | |
| -PIByteArray | toBase64 () const |
| Return converted to Base 64 data. | |
| -PIByteArray & | compressRLE (uchar threshold=192) |
| Return converted from Base 64 data. | |
| -PIByteArray & | append (const void *data_, int size_) |
| Add to the end data "data" with size "size". | |
| -PIByteArray & | append (const PIByteArray &data_) |
| Add to the end byte array "data". | |
| -uchar | checksumPlain8 () const |
| Returns plain 8-bit checksum. | |
| -uint | checksumPlain32 () const |
| Returns plain 32-bit checksum. | |
-Related Functions | |
(Note that these are not member functions.) - | |
| -template<typename T > | |
| PIByteArray & | operator<< (PIByteArray &s, const PIList< T > &v) |
| Store operator. | |
| -template<typename T > | |
| PIByteArray & | operator>> (PIByteArray &s, PIList< T > &v) |
| Restore operator. | |
| -PICout | operator<< (PICout s, const PIByteArray &ba) |
| Output to PICout operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, bool v) |
| Store operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, char v) |
| Store operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, uchar v) |
| Store operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, const short v) |
| Store operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, const int v) |
| Store operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, const long &v) |
| Store operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, const llong &v) |
| Store operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, const ushort v) |
| Store operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, const uint v) |
| Store operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, const ulong &v) |
| Store operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, const ullong &v) |
| Store operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, const float v) |
| Store operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, const double &v) |
| Store operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, const ldouble &v) |
| Store operator. | |
| -template<typename T > | |
| PIByteArray & | operator<< (PIByteArray &s, const PIFlags< T > &v) |
| Store operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, const PIByteArray &v) |
| Store operator, see Attention for details. | |
| -PIByteArray & | operator<< (PIByteArray &s, const PIByteArray::RawData &v) |
| Store operator, see Attention for details. | |
| -PIByteArray & | operator>> (PIByteArray &s, bool &v) |
| Restore operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, char &v) |
| Restore operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, uchar &v) |
| Restore operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, short &v) |
| Restore operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, int &v) |
| Restore operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, long &v) |
| Restore operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, llong &v) |
| Restore operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, ushort &v) |
| Restore operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, uint &v) |
| Restore operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, ulong &v) |
| Restore operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, ullong &v) |
| Restore operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, float &v) |
| Restore operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, double &v) |
| Restore operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, ldouble &v) |
| Restore operator. | |
| -template<typename T > | |
| PIByteArray & | operator>> (PIByteArray &s, PIFlags< T > &v) |
| Restore operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, PIByteArray &v) |
| Restore operator, see Attention for details. | |
| -PIByteArray & | operator>> (PIByteArray &s, PIByteArray::RawData v) |
| Restore operator, see Attention for details. | |
| -template<typename T > | |
| PIByteArray & | operator<< (PIByteArray &s, const PIVector< T > &v) |
| Store operator. | |
| -template<typename T > | |
| PIByteArray & | operator<< (PIByteArray &s, const PIDeque< T > &v) |
| Store operator. | |
| -template<typename Key , typename T > | |
| PIByteArray & | operator<< (PIByteArray &s, const PIMap< Key, T > &v) |
| Store operator. | |
| -template<typename Type0 , typename Type1 > | |
| PIByteArray & | operator>> (PIByteArray &s, PIPair< Type0, Type1 > &v) |
| Restore operator. | |
| -template<typename T > | |
| PIByteArray & | operator>> (PIByteArray &s, PIVector< T > &v) |
| Restore operator. | |
| -template<typename T > | |
| PIByteArray & | operator>> (PIByteArray &s, PIDeque< T > &v) |
| Restore operator. | |
| -template<typename Key , typename T > | |
| PIByteArray & | operator>> (PIByteArray &s, PIMap< Key, T > &v) |
| Restore operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, const PIBitArray &v) |
| Store operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, PIBitArray &v) |
| Restore operator. | |
| -bool | operator== (PIByteArray &f, PIByteArray &s) |
| Byte arrays compare operator. | |
| -bool | operator!= (PIByteArray &f, PIByteArray &s) |
| Byte arrays compare operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, const PIString &v) |
| Output operator to PIByteArray. | |
| -PIByteArray & | operator>> (PIByteArray &s, PIString &v) |
| Input operator from PIByteArray. | |
| -PIByteArray & | operator<< (PIByteArray &s, const PIStringList &v) |
| Output operator to PIByteArray. | |
| -PIByteArray & | operator>> (PIByteArray &s, PIStringList &v) |
| Input operator from PIByteArray. | |
| -PIByteArray & | operator<< (PIByteArray &s, const PISystemTime &v) |
| Output operator to PIByteArray. | |
| -PIByteArray & | operator>> (PIByteArray &s, PISystemTime &v) |
| Input operator from PIByteArray. | |
| -PIByteArray & | operator<< (PIByteArray &s, complexf v) |
| Store operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, complexd v) |
| Store operator. | |
| -PIByteArray & | operator<< (PIByteArray &s, complexld v) |
| Store operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, complexf &v) |
| Restore operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, complexd &v) |
| Restore operator. | |
| -PIByteArray & | operator>> (PIByteArray &s, complexld &v) |
| Restore operator. | |
Byte array.
-This class based on PIDeque<uchar> and provide some handle function to manipulate it.
-PIByteArray can be used to store custom data and manipulate it. There are many stream operators to store/restore common types to byte array. Store operators places data at the end of array, restore operators takes data from the beginning of array. In addition there are Base 64 convertions and checksums:
One of the major usage of PIByteArray is stream functions. You can form binary packet from many types (also dynamic types, e.g. PIVector) with one line:
Or you can descibe stream operator of your own type and store/restore vectors of your type:
For store/restore custom data blocks there is PIByteArray::RawData class. Stream operators of this class simply store/restore data block to/from byte array.
Stream operator of PIByteArray store byte array as vector, not simply append content of byte array. This operators useful to transmit custom data as PIByteArray packed into parent byte array, e.g. to form packet from PIByteArray. To append one byte array to another use funtion append().
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PICLI, including all inherited members.
-| addArgument(const PIString &name, bool value=false) | PICLI | inline |
| addArgument(const PIString &name, const PIChar &shortKey, bool value=false) | PICLI | inline |
| addArgument(const PIString &name, const char *shortKey, bool value=false) | PICLI | inline |
| addArgument(const PIString &name, const PIChar &shortKey, const PIString &fullKey, bool value=false) | PICLI | inline |
| addArgument(const PIString &name, const char *shortKey, const PIString &fullKey, bool value=false) | PICLI | inline |
| className() const | PIObject | inlinevirtual |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| CONNECTU_QUEUED | PIObject | related |
| debug() const | PIObject | inline |
| deleted() | PIObject | protected |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlinestatic |
| HANDLER | PIObject | related |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| name() const | PIObject | inline |
| parentClassName() const | PIObject | inlinevirtual |
| PICLI(int argc, char *argv[]) | PICLI | |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| PIOBJECT | PIObject | related |
| PIObject(const PIString &name=PIString()) | PIObject | explicit |
| PIOBJECT_SUBCLASS | PIObject | related |
| programCommand() | PICLI | inline |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| rawArgument(int index) | PICLI | inline |
| rawArguments() | PICLI | inline |
| setDebug(bool debug) | PIObject | inline |
| setName(const PIString &name) | PIObject | inline |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Command-line arguments parser. - More...
-
-Public Member Functions | |
| - | PICLI (int argc, char *argv[]) |
| Constructor. | |
| -void | addArgument (const PIString &name, bool value=false) |
| Add argument with name "name", short key = name first letter, full key = name. | |
| -void | addArgument (const PIString &name, const PIChar &shortKey, bool value=false) |
| Add argument with name "name", short key = "shortKey", full key = name. | |
| -void | addArgument (const PIString &name, const char *shortKey, bool value=false) |
| Add argument with name "name", short key = "shortKey", full key = name. | |
| -void | addArgument (const PIString &name, const PIChar &shortKey, const PIString &fullKey, bool value=false) |
| Add argument with name "name", short key = "shortKey", full key = "fullKey". | |
| -void | addArgument (const PIString &name, const char *shortKey, const PIString &fullKey, bool value=false) |
| Add argument with name "name", short key = "shortKey", full key = "fullKey". | |
| -PIString | rawArgument (int index) |
| Returns unparsed command-line argument by index "index". Index 0 is program execute command. | |
| -const PIStringList & | rawArguments () |
| Returns unparsed command-line arguments. | |
| -PIString | programCommand () |
| Returns program execute command without arguments. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Command-line arguments parser.
-This class provide handy parsing of command-line arguments. First you should add arguments to PICLI with function addArgument(). Then you can check if there is some argument in application command-line with function hasArgument();
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIChar, including all inherited members.
-| isAlpha() const | PIChar | |
| isAscii() const | PIChar | |
| isControl() const | PIChar | |
| isDigit() const | PIChar | |
| isGraphical() const | PIChar | |
| isHex() const | PIChar | |
| isLower() const | PIChar | |
| isPrint() const | PIChar | |
| isSpace() const | PIChar | |
| isUpper() const | PIChar | |
| operator!=(const PIChar &o) const | PIChar | inline |
| operator<(const PIChar &o) const | PIChar | |
| operator<<(PIByteArray &s, const PIChar &v) | PIChar | friend |
| operator<<(PICout s, const PIChar &v) | PIChar | friend |
| operator<<(std::ostream &s, const PIChar &v) | PIChar | related |
| operator<=(const PIChar &o) const | PIChar | |
| operator=(const char v) | PIChar | inline |
| operator==(const PIChar &o) const | PIChar | |
| operator>(const PIChar &o) const | PIChar | |
| operator>=(const PIChar &o) const | PIChar | |
| operator>>(PIByteArray &s, PIChar &v) | PIChar | friend |
| PIChar(const char c) | PIChar | inline |
| PIChar(const short c) | PIChar | inline |
| PIChar(const int c) | PIChar | inline |
| PIChar(const uchar c) | PIChar | inline |
| PIChar(const ushort c) | PIChar | inline |
| PIChar(const uint c=0) | PIChar | inline |
| PIChar(const char *c, int *bytes=0) | PIChar | |
| toCharPtr() const | PIChar | |
| toLower() const | PIChar | |
| toUpper() const | PIChar |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Unicode char. - More...
--Public Member Functions | |
| - | PIChar (const char c) |
| Contructs ascii symbol. | |
| - | PIChar (const short c) |
| Contructs 2-bytes symbol. | |
| - | PIChar (const int c) |
| Contructs 4-bytes symbol. | |
| - | PIChar (const uchar c) |
| Contructs ascii symbol. | |
| - | PIChar (const ushort c) |
| Contructs 2-bytes symbol. | |
| - | PIChar (const uint c=0) |
| Default constructor. Contructs 4-bytes symbol. | |
| - | PIChar (const char *c, int *bytes=0) |
| Contructs symbol from no more than 4 bytes of string. | |
| -PIChar & | operator= (const char v) |
| Copy operator. | |
| -bool | operator== (const PIChar &o) const |
| Compare operator. | |
| -bool | operator!= (const PIChar &o) const |
| Compare operator. | |
| -bool | operator> (const PIChar &o) const |
| Compare operator. | |
| -bool | operator< (const PIChar &o) const |
| Compare operator. | |
| -bool | operator>= (const PIChar &o) const |
| Compare operator. | |
| -bool | operator<= (const PIChar &o) const |
| Compare operator. | |
| -bool | isDigit () const |
| Return true if symbol is digit ('0' to '9') | |
| -bool | isHex () const |
| Return true if symbol is HEX digit ('0' to '9', 'a' to 'f', 'A' to 'F') | |
| -bool | isGraphical () const |
| Return true if symbol is drawable (without space) | |
| -bool | isControl () const |
| Return true if symbol is control byte (< 32 or 127) | |
| -bool | isLower () const |
| Return true if symbol is in lower case. | |
| -bool | isUpper () const |
| Return true if symbol is in upper case. | |
| -bool | isPrint () const |
| Return true if symbol is printable (with space) | |
| -bool | isSpace () const |
| Return true if symbol is space or tab. | |
| -bool | isAlpha () const |
| Return true if symbol is alphabetical letter. | |
| -bool | isAscii () const |
| Return true if symbol is ascii (< 128) | |
| -const char * | toCharPtr () const |
Return as "char * " string. | |
| -PIChar | toUpper () const |
| Return symbol in upper case. | |
| -PIChar | toLower () const |
| Return symbol in lower case. | |
-Friends | |
| -PIByteArray & | operator<< (PIByteArray &s, const PIChar &v) |
Write operator to PIByteArray. | |
| -PIByteArray & | operator>> (PIByteArray &s, PIChar &v) |
Read operator from PIByteArray. | |
| -PICout | operator<< (PICout s, const PIChar &v) |
| Output operator to PICout. | |
-Related Functions | |
(Note that these are not member functions.) - | |
| -std::ostream & | operator<< (std::ostream &s, const PIChar &v) |
Output operator to std::ostream. | |
Unicode char.
-This class is wrapper around "uint". There are many contructors and information functions
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIChunkStream, including all inherited members.
-| add(int id, const T &data) | PIChunkStream | inline |
| atEnd() const | PIChunkStream | inline |
| chunk(int id, const T &data) | PIChunkStream | inlinestatic |
| data() const | PIChunkStream | inline |
| get(T &v) const | PIChunkStream | inline |
| getData() const | PIChunkStream | inline |
| getID() | PIChunkStream | inline |
| PIChunkStream(const PIByteArray &data) | PIChunkStream | inline |
| PIChunkStream(PIByteArray *data=0) | PIChunkStream | inline |
| read() | PIChunkStream | inline |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Class for binary serialization. - More...
--Public Member Functions | |
| - | PIChunkStream (const PIByteArray &data) |
| Contructs stream for read from "data". | |
| - | PIChunkStream (PIByteArray *data=0) |
| Contructs stream for read or write to/from "data", or empty stream for write. | |
| -template<typename T > | |
| PIChunkStream & | add (int id, const T &data) |
| Add data to this chunk strean with ID "id" and value "data". | |
| -PIByteArray | data () const |
| Returns internal buffer with written data. | |
| -bool | atEnd () const |
| Returns if there is end of stream. | |
| -int | read () |
| Read one chunk from stream and returns its ID. | |
| -int | getID () |
| Returns last readed chunk ID. | |
| -template<typename T > | |
| T | getData () const |
| Returns value of last readed chunk. | |
| -template<typename T > | |
| void | get (T &v) const |
| Place value of last readed chunk into "v". | |
-Static Public Member Functions | |
| -template<typename T > | |
| static Chunk< T > | chunk (int id, const T &data) |
| Returns chunk with ID "id" and value "data" for write to stream. | |
Class for binary serialization.
-This class provides very handly mechanism to store and restore values to and from PIByteArray. The main advantage of using this class is that your binary data become independent from order and collection of your values.
-PIChunkStream works with items called "chunk". Chunk is an ID and any value that can be stored and restored to PIByteArray with stream operators << and >>. You can place chunks to stream and read chunks from stream.
-To construct PIChunkStream for writing data use any constructor. Empty constructor creates internal empty buffer that can be accessed by function data(). Non-empty constructor works with given byte array.
-To read chunks from byte array use function read() that returns ID of next chunk. Then you can get value of this chunk with function getData(), but you should definitely know type of this value. You can read from byte array while atEnd() if false.
-Prepare your structs to work with PIChunkStream
Writing to PIChunkStream
Reading from PIChunkStream
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PICollection, including all inherited members.
-| ADD_NEW_TO_COLLECTION | PICollection | related |
| ADD_TO_COLLECTION | PICollection | related |
| groupElements(const PIString &group) | PICollection | static |
| groups() | PICollection | static |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Interface to discover element groups. - More...
--Static Public Member Functions | |
| -static PIStringList | groups () |
| Returns all existing groups by their names. | |
| -static PIVector< const PIObject *> | groupElements (const PIString &group) |
| Returns all elements of group "group". | |
-Related Functions | |
(Note that these are not member functions.) - | |
| #define | ADD_TO_COLLECTION(group, object) |
| Add existing element "object" in group with name "group". More... | |
| #define | ADD_NEW_TO_COLLECTION(group, class) |
| Add new element of class "class" in group with name "group". More... | |
Interface to discover element groups.
-This class has only static functions so no need to create instance of the PICollection. This class provide macros to add some classes or existing objects to global collection and access to them from any place of the code.
-
|
- -related | -
Add existing element "object" in group with name "group".
-If there is no group with name "group" it will be created. Only one element of the class "object" can be in group "group". If this is already exists nothing be happens.
- "object" should to be pointer to object based on PIObject.
-
|
- -related | -
Add new element of class "class" in group with name "group".
-If there is no group with name "group" it will be created. Only one element of the class "class" can be in group "group". If this is already exists nothing be happens.
- "class" should to be name of the any class based on PIObject.
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIConfig, including all inherited members.
-| allLeaves() | PIConfig | inline |
| allTree() | PIConfig | inline |
| clear() | PIConfig | |
| delimiter() const | PIConfig | inline |
| entriesCount() const | PIConfig | inline |
| getValue(const PIString &vname, const PIString &def=PIString(), bool *exists=0) | PIConfig | |
| getValue(const PIString &vname, const char *def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const PIStringList &def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const bool def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const short def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const int def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const long def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const uchar def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const ushort def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const uint def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const ulong def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const float def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const double def, bool *exists=0) | PIConfig | inline |
| getValues(const PIString &vname) | PIConfig | |
| isEntryExists(const PIString &name) const | PIConfig | inline |
| open(const PIString &path, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) | PIConfig | |
| open(PIString *string, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) | PIConfig | |
| PIConfig(const PIString &path, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) | PIConfig | |
| PIConfig(PIString *string, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) | PIConfig | |
| PIConfig(PIIODevice *device=0, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) | PIConfig | |
| readAll() | PIConfig | |
| rootEntry() | PIConfig | inline |
| setDelimiter(const PIString &d) | PIConfig | inline |
| setValue(const PIString &name, const PIString &value, const PIString &type="s", bool write=true) | PIConfig | |
| setValue(const PIString &name, const PIStringList &value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const char *value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const bool value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const short value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const int value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const long value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const uchar value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const ushort value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const uint value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const ulong value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const float value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const double value, bool write=true) | PIConfig | inline |
| writeAll() | PIConfig |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Configuration file. - More...
--Classes | |
| class | Branch |
| Branch is a list of entries of configuration file More... | |
| class | Entry |
| Entry of configuration file More... | |
-Public Member Functions | |
| - | PIConfig (const PIString &path, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) |
| Contructs and read configuration file at path "path" in mode "mode". | |
| - | PIConfig (PIString *string, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) |
| Contructs and read configuration string "string" in mode "mode". | |
| - | PIConfig (PIIODevice *device=0, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) |
| Contructs and read configuration from custom device "device" in mode "mode". | |
| -bool | open (const PIString &path, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) |
| Read configuration file at path "path" in mode "mode". | |
| -bool | open (PIString *string, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) |
| Read configuration string "string" in mode "mode". | |
| -Entry & | getValue (const PIString &vname, const PIString &def=PIString(), bool *exists=0) |
| Returns top-level entry with name "vname", if doesn`t exists return entry with value "def" and set *exist to false. | |
| -Entry & | getValue (const PIString &vname, const char *def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const PIStringList &def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const bool def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const short def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const int def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const long def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const uchar def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const ushort def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const uint def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const ulong def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const float def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const double def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| -Branch | getValues (const PIString &vname) |
| Returns top-level entries with names with substrings "vname". | |
| -void | setValue (const PIString &name, const PIString &value, const PIString &type="s", bool write=true) |
| Set top-level entry with name "name" value to "value", type to "type" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| -void | setValue (const PIString &name, const PIStringList &value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "l" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| -void | setValue (const PIString &name, const char *value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "s" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| -void | setValue (const PIString &name, const bool value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "b" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| -void | setValue (const PIString &name, const short value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "n" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| -void | setValue (const PIString &name, const int value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "n" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| -void | setValue (const PIString &name, const long value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "n" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| -void | setValue (const PIString &name, const uchar value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "n" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| -void | setValue (const PIString &name, const ushort value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "n" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| -void | setValue (const PIString &name, const uint value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "n" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| -void | setValue (const PIString &name, const ulong value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "n" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| -void | setValue (const PIString &name, const float value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "f" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| -void | setValue (const PIString &name, const double value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "f" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| -Entry & | rootEntry () |
| Returns root entry. | |
| -int | entriesCount () const |
| Returns top-level entries count. | |
| -bool | isEntryExists (const PIString &name) const |
| Returns if top-level entry with name "name" exists. | |
| -Branch | allTree () |
| Returns all top-level entries. | |
| -Branch | allLeaves () |
| Returns all entries without children. | |
| -void | clear () |
| Remove all tree and device content. | |
| -void | readAll () |
| Parse device and build internal tree. | |
| -void | writeAll () |
| Write all internal tree to device. | |
| -const PIString & | delimiter () const |
| Returns current tree delimiter, default ".". | |
| -void | setDelimiter (const PIString &d) |
| Set current tree delimiter. | |
Configuration file.
-This class provide handle access to configuration file.
-PIConfig reads configuration file and create internal dendritic representation of all entries of this file. You can easily read some values and write new.
PIConfig supports also INI-style files with sections "[section]". In this case line with section name interpret as prefix to the next lines. For example, these configs are equal:
Each node of internal tree has type PIConfig::Entry. PIConfig has one root element rootEntry(). Any entry of configuration file is a child of this element.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIConfig::Branch, including all inherited members.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Branch is a list of entries of configuration file - More...
-
-Additional Inherited Members | |
Public Member Functions inherited from PIVector< Entry * > | |
| PIVector () | |
| -size_t | size () const |
| Elements count. | |
| -ssize_t | size_s () const |
| Elements count. | |
| -bool | isEmpty () const |
Return "true" if vector is empty, i.e. size = 0. | |
| -Entry * & | back () |
| Last element of the vector. | |
| -const Entry * & | back () const |
| Last element of the vector. | |
| -Entry * & | front () |
| First element of the vector. | |
| -const Entry * & | front () const |
| First element of the vector. | |
| -bool | operator== (const PIVector< Entry * > &t) const |
| Compare with vector "t". | |
| -bool | operator!= (const PIVector< Entry * > &t) const |
| Compare with vector "t". | |
| -bool | contains (const Entry * &v) const |
Return "true" if vector has at least one element equal "t". | |
| -int | etries (const Entry * &v) const |
| Return how many times element "t" appears in vector. | |
| -PIVector< Entry * > & | clear () |
Clear vector. Equivalent to call "resize(0)" | |
| PIVector< Entry * > & | fill (const Entry * &f=Entry *()) |
| Fill vector with elements "t" leave size is unchanged and return reference to vector. More... | |
| PIVector< Entry * > & | resize (size_t new_size, const Entry * &f=Entry *()) |
| Resize vector to size "size". More... | |
| PIVector< Entry * > & | remove (size_t index, size_t count=1) |
| Remove one element by index "index" and return reference to vector. More... | |
| PIVector< Entry * > & | sort (CompareFunc compare=compare_func) |
| Sort vector using quick sort algorithm and standard compare function. More... | |
| -PIVector< Entry * > & | enlarge (llong piv_size) |
| Increase vector size with "size" elements. | |
| PIVector< Entry * > & | removeOne (const Entry * &v) |
| Remove no more than one element equal "v" and return reference to vector. More... | |
| PIVector< Entry * > & | removeAll (const Entry * &v) |
| Remove all elements equal "v" and return reference to vector. More... | |
| -PIVector< Entry * > & | push_back (const Entry * &v) |
| Add new element "t" at the end of vector and return reference to vector. | |
| -PIVector< Entry * > & | operator<< (const PIVector< Entry * > &other) |
| Add vector "t" at the end of vector and return reference to vector. | |
| -PIVector< Entry * > & | push_front (const Entry * &v) |
| Add new element "t" at the beginning of vector and return reference to vector. | |
| -PIVector< Entry * > & | pop_back () |
| Remove one element from the end of vector and return reference to vector. | |
| -PIVector< Entry * > & | pop_front () |
| Remove one element from the beginning of vector and return reference to vector. | |
| -Entry * | take_back () |
| Remove one element from the end of vector and return it. | |
| -Entry * | take_front () |
| Remove one element from the beginning of vector and return it. | |
Static Public Member Functions inherited from PIVector< Entry * > | |
| -static int | compare_func (const Entry * *t0, const Entry * *t1) |
| Standard compare function for type "Type". Return 0 if t0 = t1, -1 if t0 < t1 and 1 if t0 > t1. | |
Branch is a list of entries of configuration file
-Branch provides some features to get entries lists.
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIConfig::Entry, including all inherited members.
-| child(const int index) const | PIConfig::Entry | inline |
| childCount() const | PIConfig::Entry | inline |
| children() const | PIConfig::Entry | inline |
| comment() const | PIConfig::Entry | inline |
| findChild(const PIString &name) | PIConfig::Entry | inline |
| findChild(const PIString &name) const | PIConfig::Entry | inline |
| fullName() const | PIConfig::Entry | inline |
| getValue(const PIString &vname, const PIString &def=PIString(), bool *exists=0) | PIConfig::Entry | |
| getValue(const PIString &vname, const char *def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const PIStringList &def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const bool def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const short def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const int def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const long def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const uchar def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const ushort def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const uint def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const ulong def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const float def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const double def, bool *exists=0) | PIConfig::Entry | inline |
| getValues(const PIString &vname) | PIConfig::Entry | |
| isEntryExists(const PIString &name) const | PIConfig::Entry | inline |
| isLeaf() const | PIConfig::Entry | inline |
| name() const | PIConfig::Entry | inline |
| operator bool() | PIConfig::Entry | inline |
| operator char() | PIConfig::Entry | inline |
| operator double() | PIConfig::Entry | inline |
| operator float() | PIConfig::Entry | inline |
| operator int() | PIConfig::Entry | inline |
| operator long() | PIConfig::Entry | inline |
| operator PIString() | PIConfig::Entry | inline |
| operator PIStringList() | PIConfig::Entry | inline |
| operator short() | PIConfig::Entry | inline |
| operator uchar() | PIConfig::Entry | inline |
| operator uint() | PIConfig::Entry | inline |
| operator ulong() | PIConfig::Entry | inline |
| operator ushort() | PIConfig::Entry | inline |
| parent() const | PIConfig::Entry | inline |
| setComment(const PIString &value) | PIConfig::Entry | inline |
| setName(const PIString &value) | PIConfig::Entry | inline |
| setType(const PIString &value) | PIConfig::Entry | inline |
| setValue(const PIString &value) | PIConfig::Entry | inline |
| setValue(const PIStringList &value) | PIConfig::Entry | inline |
| setValue(const char *value) | PIConfig::Entry | inline |
| setValue(const bool value) | PIConfig::Entry | inline |
| setValue(const char value) | PIConfig::Entry | inline |
| setValue(const short value) | PIConfig::Entry | inline |
| setValue(const int value) | PIConfig::Entry | inline |
| setValue(const long value) | PIConfig::Entry | inline |
| setValue(const uchar value) | PIConfig::Entry | inline |
| setValue(const ushort value) | PIConfig::Entry | inline |
| setValue(const uint value) | PIConfig::Entry | inline |
| setValue(const ulong value) | PIConfig::Entry | inline |
| setValue(const float value) | PIConfig::Entry | inline |
| setValue(const double value) | PIConfig::Entry | inline |
| type() const | PIConfig::Entry | inline |
| value() const | PIConfig::Entry | inline |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Entry of configuration file - More...
--Public Member Functions | |
| -Entry * | parent () const |
| Returns parent entry, or 0 if there is no parent (root of default value) | |
| -int | childCount () const |
| Returns children count. | |
| -Branch & | children () const |
| Returns children as PIConfig::Branch. | |
| -Entry * | child (const int index) const |
| Returns child at index "index". | |
| -Entry * | findChild (const PIString &name) |
| Returns first child with name "name". | |
| -const Entry * | findChild (const PIString &name) const |
| Returns first child with name "name". | |
| -bool | isLeaf () const |
| Returns true if there is no children. | |
| -const PIString & | name () const |
| Returns name. | |
| -const PIString & | value () const |
| Returns value. | |
| -const PIString & | type () const |
| Returns type. | |
| -const PIString & | comment () const |
| Returns comment. | |
| const PIString & | fullName () const |
| Returns full name, i.e. name as it looks in file. More... | |
| -Entry & | setName (const PIString &value) |
| Set name to "value" and returns this. | |
| -Entry & | setType (const PIString &value) |
| Set type to "value" and returns this. | |
| -Entry & | setComment (const PIString &value) |
| Set comment to "value" and returns this. | |
| -Entry & | setValue (const PIString &value) |
| Set value to "value" and returns this. | |
| -Entry & | setValue (const PIStringList &value) |
| Set value to "value" and returns this. Type is set to "l". | |
| -Entry & | setValue (const char *value) |
| Set value to "value" and returns this. Type is set to "s". | |
| -Entry & | setValue (const bool value) |
| Set value to "value" and returns this. Type is set to "b". | |
| -Entry & | setValue (const char value) |
| Set value to "value" and returns this. Type is set to "s". | |
| -Entry & | setValue (const short value) |
| Set value to "value" and returns this. Type is set to "n". | |
| -Entry & | setValue (const int value) |
| Set value to "value" and returns this. Type is set to "n". | |
| -Entry & | setValue (const long value) |
| Set value to "value" and returns this. Type is set to "n". | |
| -Entry & | setValue (const uchar value) |
| Set value to "value" and returns this. Type is set to "n". | |
| -Entry & | setValue (const ushort value) |
| Set value to "value" and returns this. Type is set to "n". | |
| -Entry & | setValue (const uint value) |
| Set value to "value" and returns this. Type is set to "n". | |
| -Entry & | setValue (const ulong value) |
| Set value to "value" and returns this. Type is set to "n". | |
| -Entry & | setValue (const float value) |
| Set value to "value" and returns this. Type is set to "f". | |
| -Entry & | setValue (const double value) |
| Set value to "value" and returns this. Type is set to "f". | |
| Entry & | getValue (const PIString &vname, const PIString &def=PIString(), bool *exists=0) |
| Returns entry with name "vname" and default value "def". More... | |
| -Entry & | getValue (const PIString &vname, const char *def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const PIStringList &def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const bool def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const short def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const int def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const long def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const uchar def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const ushort def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const uint def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const ulong def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const float def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| -Entry & | getValue (const PIString &vname, const double def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| -Branch | getValues (const PIString &vname) |
| Find all entries with names with substrings "vname" and returns them as PIConfig::Branch. | |
| -bool | isEntryExists (const PIString &name) const |
| If there is no children returns if name == "name". Else returns if any child has name == "name". | |
| - | operator bool () |
| Convertion to boolean. | |
| - | operator char () |
| Convertion to char. | |
| - | operator short () |
| Convertion to short. | |
| - | operator int () |
| Convertion to int. | |
| - | operator long () |
| Convertion to long. | |
| - | operator uchar () |
| Convertion to uchar. | |
| - | operator ushort () |
| Convertion to ushort. | |
| - | operator uint () |
| Convertion to uint. | |
| - | operator ulong () |
| Convertion to ulong. | |
| - | operator float () |
| Convertion to float. | |
| - | operator double () |
| Convertion to double. | |
| - | operator PIString () |
| Convertion to PIString. | |
| - | operator PIStringList () |
| Convertion to PIStringList. | |
Entry of configuration file
-This class is node of internal PIConfig tree. Entry provide access to elements of PIConfig. Each entry has children or next properties:
Each property is a PIString. These properties forms from text line with format:
Type and comment are optional fields. Type is a single letter immediately after comment symbol "#".
-
-Entry has many implicit convertions to common types: boolean, integers, float, double, PIString, PIStringList.
-
-Generally there is no need to create instance of PIConfig::Entry manually, it returns by functions getValue() of PIConfig, PIConfig::Entry or PIConfig::Branch. If there is no suitable entry to return, reference to internal instance of PIConfig::Entry with "default" value will be returned.
-
|
- -inline | -
Returns full name, i.e. name as it looks in file.
-In case of default entry full name always is empty
| PIConfig::Entry & PIConfig::Entry::getValue | -( | -const PIString & | -vname, | -
| - | - | const PIString & | -def = PIString(), |
-
| - | - | bool * | -exists = 0 |
-
| - | ) | -- |
Returns entry with name "vname" and default value "def".
-If there is no suitable entry found, reference to default internal entry with value = "def" will be returned, and if "exists" not null it will be set to false
- -|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIConnection, including all inherited members.
-| addChannel(const PIString &name_from, const PIString &name_to) | PIConnection | |
| addChannel(const PIString &name_from, const PIIODevice *dev_to) | PIConnection | inline |
| addChannel(const PIIODevice *dev_from, const PIString &name_to) | PIConnection | inline |
| addChannel(const PIIODevice *dev_from, const PIIODevice *dev_to) | PIConnection | inline |
| addDevice(const PIString &full_path, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite, bool start=false) | PIConnection | |
| addFilter(const PIString &name, const PIString &full_path_name, PIPacketExtractor::SplitMode mode=PIPacketExtractor::None) | PIConnection | |
| addFilter(const PIString &name, const PIIODevice *dev, PIPacketExtractor::SplitMode mode=PIPacketExtractor::None) | PIConnection | inline |
| addFilter(PIPacketExtractor *filter, const PIString &full_path_name) | PIConnection | |
| addFilter(PIPacketExtractor *filter, const PIIODevice *dev) | PIConnection | inline |
| addSender(const PIString &name, const PIString &full_path_name, float frequency, bool start=false) | PIConnection | |
| addSender(const PIString &name, const PIIODevice *dev, float frequency, bool start=false) | PIConnection | inline |
| allConnections() | PIConnection | static |
| allDevices() | PIConnection | static |
| boundedDevices() const | PIConnection | |
| channels() const | PIConnection | |
| className() const | PIObject | inlinevirtual |
| clearSenderFixedData(const PIString &name) | PIConnection | |
| configureFromConfig(const PIString &config, const PIString &name=PIString::fromAscii("connection")) | PIConnection | |
| configureFromString(PIString *string, const PIString &name=PIString::fromAscii("connection")) | PIConnection | |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| CONNECTU_QUEUED | PIObject | related |
| dataReceived(const PIString &from, const PIByteArray &data) | PIConnection | inlineprotectedvirtual |
| dataReceivedEvent(const PIString &from, const PIByteArray &data) | PIConnection | |
| debug() const | PIObject | inline |
| deleted() | PIObject | protected |
| destroy() | PIConnection | inline |
| deviceByFullPath(const PIString &full_path) const | PIConnection | |
| deviceByName(const PIString &name) const | PIConnection | |
| diagnostic(const PIString &full_path_name) const | PIConnection | |
| diagnostic(const PIIODevice *dev) const | PIConnection | inline |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| filter(const PIString &name) const | PIConnection | |
| filterBoundedDevices(const PIString &name) const | PIConnection | |
| filterNames() const | PIConnection | |
| filters() const | PIConnection | |
| filterValidateFooter(const PIString &filter_name, uchar *src, uchar *rec, int size) | PIConnection | protectedvirtual |
| filterValidateHeader(const PIString &filter_name, uchar *src, uchar *rec, int size) | PIConnection | protectedvirtual |
| filterValidatePayload(const PIString &filter_name, uchar *rec, int size) | PIConnection | protectedvirtual |
| findByName(const PIString &name) | PIObject | inlinestatic |
| HANDLER | PIObject | related |
| isEmpty() const | PIConnection | inline |
| isFakeMode() | PIConnection | static |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| makeConfig() const | PIConnection | |
| name() const | PIObject | inline |
| packetReceived(const PIString &from, const PIByteArray &data) | PIConnection | inlineprotectedvirtual |
| packetReceivedEvent(const PIString &from, const PIByteArray &data) | PIConnection | |
| parentClassName() const | PIObject | inlinevirtual |
| PIConnection(const PIString &name=PIString::fromAscii("connection")) | PIConnection | |
| PIConnection(const PIString &config, const PIString &name) | PIConnection | |
| PIConnection(PIString *string, const PIString &name) | PIConnection | |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| PIOBJECT | PIObject | related |
| PIObject(const PIString &name=PIString()) | PIObject | explicit |
| PIOBJECT_SUBCLASS | PIObject | related |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| qualityChanged(const PIIODevice *dev, PIDiagnostics::Quality new_quality, PIDiagnostics::Quality old_quality) | PIConnection | |
| removeAllChannels() | PIConnection | |
| removeAllDevices() | PIConnection | |
| removeAllFilters() | PIConnection | |
| removeAllSenders() | PIConnection | |
| removeChannel(const PIString &name_from, const PIString &name_to) | PIConnection | |
| removeChannel(const PIString &name_from, const PIIODevice *dev_to) | PIConnection | inline |
| removeChannel(const PIIODevice *dev_from, const PIString &name_to) | PIConnection | inline |
| removeChannel(const PIIODevice *dev_from, const PIIODevice *dev_to) | PIConnection | inline |
| removeChannel(const PIString &name_from) | PIConnection | |
| removeChannel(const PIIODevice *dev_from) | PIConnection | inline |
| removeDevice(const PIString &full_path) | PIConnection | |
| removeFilter(const PIString &name, const PIString &full_path_name) | PIConnection | |
| removeFilter(const PIString &name, const PIIODevice *dev) | PIConnection | |
| removeFilter(const PIString &name) | PIConnection | |
| removeSender(const PIString &name, const PIString &full_path_name) | PIConnection | |
| removeSender(const PIString &name, const PIIODevice *dev) | PIConnection | inline |
| removeSender(const PIString &name) | PIConnection | |
| senderData(const PIString &sender_name) | PIConnection | protectedvirtual |
| senderFixedData(const PIString &name) const | PIConnection | |
| senderFrequency(const PIString &name) const | PIConnection | |
| setDebug(bool debug) | PIObject | inline |
| setFakeMode(bool yes) | PIConnection | static |
| setName(const PIString &name) | PIObject | inline |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setSenderFixedData(const PIString &name, const PIByteArray &data) | PIConnection | |
| start() | PIConnection | inline |
| startAllSenders() | PIConnection | |
| startAllThreadedReads() | PIConnection | |
| startSender(const PIString &name) | PIConnection | |
| startThreadedRead(const PIString &full_path_name) | PIConnection | |
| startThreadedRead(const PIIODevice *dev) | PIConnection | inline |
| stop() | PIConnection | inline |
| stopAllSenders() | PIConnection | |
| stopAllThreadedReads() | PIConnection | |
| stopSender(const PIString &name) | PIConnection | |
| stopThreadedRead(const PIString &full_path_name) | PIConnection | |
| stopThreadedRead(const PIIODevice *dev) | PIConnection | inline |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
| write(PIIODevice *dev, const PIByteArray &data) | PIConnection | |
| writeByFullPath(const PIString &full_path, const PIByteArray &data) | PIConnection | |
| writeByName(const PIString &name, const PIByteArray &data) | PIConnection |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Complex Input/Output point. - More...
-
-Public Member Functions | |
| - | PIConnection (const PIString &name=PIString::fromAscii("connection")) |
| Constructs connection with name "name", or with default name = "connection". | |
| - | PIConnection (const PIString &config, const PIString &name) |
| Constructs connection and configure it from config file "config" from section "name". | |
| - | PIConnection (PIString *string, const PIString &name) |
| Constructs connection and configure it from config content "string" from section "name". | |
| bool | configureFromConfig (const PIString &config, const PIString &name=PIString::fromAscii("connection")) |
| Configure connection from config file "config" from section "name". Returns if configuration was successful. More... | |
| bool | configureFromString (PIString *string, const PIString &name=PIString::fromAscii("connection")) |
| Configure connection from config content "string" from section "name". Returns if configuration was successful. More... | |
| -PIString | makeConfig () const |
| Returns config file section of current connection configuration. | |
| PIIODevice * | addDevice (const PIString &full_path, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite, bool start=false) |
| Add device with full path "full_path", open mode "mode" to Device pool and connection. More... | |
| bool | removeDevice (const PIString &full_path) |
| Remove device with full path "full_path" from connection. More... | |
| void | removeAllDevices () |
| Remove all device from connection. More... | |
| -PIIODevice * | deviceByFullPath (const PIString &full_path) const |
| Returns device with full path "full_path" or null if there is no such device. | |
| -PIIODevice * | deviceByName (const PIString &name) const |
| Returns device with name "name" or null if there is no such device. | |
| -PIVector< PIIODevice *> | boundedDevices () const |
| Returns all devices bounded to this connection. | |
| PIPacketExtractor * | addFilter (const PIString &name, const PIString &full_path_name, PIPacketExtractor::SplitMode mode=PIPacketExtractor::None) |
| Add filter with name "name" to device with full path "full_path_name" or filter "full_path_name". More... | |
| -PIPacketExtractor * | addFilter (const PIString &name, const PIIODevice *dev, PIPacketExtractor::SplitMode mode=PIPacketExtractor::None) |
| Add filter with name "name" to device "dev". | |
| -PIPacketExtractor * | addFilter (PIPacketExtractor *filter, const PIString &full_path_name) |
| Add filter with "filter" to device "dev". | |
| -PIPacketExtractor * | addFilter (PIPacketExtractor *filter, const PIIODevice *dev) |
| Add filter with "filter" to device "dev". | |
| bool | removeFilter (const PIString &name, const PIString &full_path_name) |
| Remove from filter with name "name" device with full path "full_path_name" or filter "full_path_name". More... | |
| -bool | removeFilter (const PIString &name, const PIIODevice *dev) |
| Remove from filter with name "name" device or filter "dev". | |
| -bool | removeFilter (const PIString &name) |
| Remove filter with name "name". Returns if filter was removed. | |
| -void | removeAllFilters () |
| Remove all filters from connection. | |
| -PIVector< PIPacketExtractor *> | filters () const |
| Returns all filters of connection. | |
| -PIStringList | filterNames () const |
| Returns all filter names of connection. | |
| -PIPacketExtractor * | filter (const PIString &name) const |
| Returns PIPacketExtractor * assosiated with filter "name" or null if there is no such filter. | |
| -PIVector< PIIODevice *> | filterBoundedDevices (const PIString &name) const |
| Returns all devices bounded to filter "name". | |
| bool | addChannel (const PIString &name_from, const PIString &name_to) |
| Add to connection channel from "name_from" to "name_to". More... | |
| -bool | addChannel (const PIString &name_from, const PIIODevice *dev_to) |
| Add to connection channel from "name_from" to "dev_to". | |
| -bool | addChannel (const PIIODevice *dev_from, const PIString &name_to) |
| Add to connection channel from "dev_from" to "name_to". | |
| -bool | addChannel (const PIIODevice *dev_from, const PIIODevice *dev_to) |
| Add to connection channel from "dev_from" to "dev_to". | |
| bool | removeChannel (const PIString &name_from, const PIString &name_to) |
| Remove from connection channel from "name_from" to "name_to". More... | |
| -bool | removeChannel (const PIString &name_from, const PIIODevice *dev_to) |
| Remove from connection channel from "name_from" to "dev_to". | |
| -bool | removeChannel (const PIIODevice *dev_from, const PIString &name_to) |
| Remove from connection channel from "dev_from" to "name_to". | |
| -bool | removeChannel (const PIIODevice *dev_from, const PIIODevice *dev_to) |
| Remove from connection channel from "dev_from" to "dev_to". | |
| bool | removeChannel (const PIString &name_from) |
| Remove from connection all channels from "name_from". More... | |
| -bool | removeChannel (const PIIODevice *dev_from) |
| Remove from connection all channels from "dev_from". | |
| -void | removeAllChannels () |
| Remove from connection all channels. | |
| -PIVector< PIPair< PIString, PIString > > | channels () const |
| Returns all channels of this connection as full pathes or filter names pair array (from, to) | |
| void | addSender (const PIString &name, const PIString &full_path_name, float frequency, bool start=false) |
| Add to connection sender with name "name" device with full path "full_path". More... | |
| -void | addSender (const PIString &name, const PIIODevice *dev, float frequency, bool start=false) |
| Add to connection sender with name "name" device "dev". | |
| bool | removeSender (const PIString &name, const PIString &full_path_name) |
| Remove from sender with name "name" device with full path "full_path_name". More... | |
| -bool | removeSender (const PIString &name, const PIIODevice *dev) |
| Remove from sender with name "name" device "dev". | |
| -bool | removeSender (const PIString &name) |
| Remove sender with name "name", returns if sender was removed. | |
| -bool | setSenderFixedData (const PIString &name, const PIByteArray &data) |
| Set sender "name" fixed send data "data", returns if sender exists. | |
| -bool | clearSenderFixedData (const PIString &name) |
| Remove sender "name" fixed send data, returns if sender exists. | |
| -PIByteArray | senderFixedData (const PIString &name) const |
| Returns sender "name" fixed send data. | |
| -float | senderFrequency (const PIString &name) const |
| Returns sender "name" timer frequency, -1 if there is no such sender, or 0 if sender is not started yet. | |
| -void | removeAllSenders () |
| Remove from connection all senders. | |
| -void | startThreadedRead (const PIString &full_path_name) |
| Start read thread of device with full path "full_path". | |
| -void | startThreadedRead (const PIIODevice *dev) |
| Start read thread of device "dev". | |
| -void | startAllThreadedReads () |
| Start read threads of all Device pool device. | |
| -void | startSender (const PIString &name) |
| Start sender "name" timer. | |
| -void | startAllSenders () |
| Start all senders timers. | |
| -void | start () |
| Start all read threads and senders. | |
| -void | stopThreadedRead (const PIString &full_path_name) |
| Stop read thread of device with full path "full_path". | |
| -void | stopThreadedRead (const PIIODevice *dev) |
| Stop read thread of device "dev". | |
| -void | stopAllThreadedReads () |
| Stop read threads of all Device pool device. | |
| -void | stopSender (const PIString &name) |
| Stop sender "name" timer. | |
| -void | stopAllSenders () |
| Stop all senders timers. | |
| -void | stop () |
| Stop all read threads and senders. | |
| -void | destroy () |
| Stop connection and remove all devices. | |
| -bool | isEmpty () const |
| Returns if there are no devices in this connection. | |
| -PIDiagnostics * | diagnostic (const PIString &full_path_name) const |
| Returns PIDiagnostics * assosiated with device with full path "full_path_name", name "full_path_name" or filter "full_path_name". | |
| -PIDiagnostics * | diagnostic (const PIIODevice *dev) const |
| Returns PIDiagnostics * assosiated with device or filter "dev". | |
| -int | writeByFullPath (const PIString &full_path, const PIByteArray &data) |
| Write data "data" to device with full path "full_path" and returns result of write() function of device. | |
| -int | writeByName (const PIString &name, const PIByteArray &data) |
| Write data "data" to device with name "name" and returns result of write() function of device. | |
| -int | write (PIIODevice *dev, const PIByteArray &data) |
| Write data "data" to device "dev" and returns result of write() function of device. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Static Public Member Functions | |
| -static PIVector< PIConnection *> | allConnections () |
| Returns all connections in application. | |
| -static PIVector< PIIODevice *> | allDevices () |
| Returns all devices in Device pool. | |
| -static bool | setFakeMode (bool yes) |
| Set Device pool fake mode to "yes" and returns previous mode. | |
| -static bool | isFakeMode () |
| Returns if Device pool works in fake mode. | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
-Protected Member Functions | |
| -virtual void | dataReceived (const PIString &from, const PIByteArray &data) |
| Executes on data received from device with full path "from". | |
| -virtual void | packetReceived (const PIString &from, const PIByteArray &data) |
| Executes on packet received from filter with name "from". | |
| -virtual bool | filterValidateHeader (const PIString &filter_name, uchar *src, uchar *rec, int size) |
| Validate header "rec" with source header "src" and size "size", executes from filter "filter_name". | |
| -virtual bool | filterValidateFooter (const PIString &filter_name, uchar *src, uchar *rec, int size) |
| Validate footer "rec" with source footer "src" and size "size", executes from filter "filter_name". | |
| -virtual bool | filterValidatePayload (const PIString &filter_name, uchar *rec, int size) |
| Validate payload "rec" with size "size", executes from filter "filter_name". | |
| -virtual PIByteArray | senderData (const PIString &sender_name) |
| You should returns data for sender "sender_name". | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
-Events | |
| -void | dataReceivedEvent (const PIString &from, const PIByteArray &data) |
| Raise on data received from device with full path "from". | |
| -void | packetReceivedEvent (const PIString &from, const PIByteArray &data) |
| Raise on packet received from filter with name "from". | |
| -void | qualityChanged (const PIIODevice *dev, PIDiagnostics::Quality new_quality, PIDiagnostics::Quality old_quality) |
| Raise on diagnostic quality of device "device" changed from "old_quality" to "new_quality". | |
-Additional Inherited Members | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Complex Input/Output point.
-PIConnection provides abstract layer over physical devices, filtering and connecting data streams. Each PIConnection works through Device Pool, so several PIConnections can read from single physical device. General scheme:
Device pool is static object, single for each application, which contains unique devices. Each PIConnection works with real devices through Device pool. Each device has assosiated thread for read and it can be started or stopped with PIConnection functions startThreadedRead() and stopThreadedRead().
-PIConnection filter is a PIPacketExtractor and assosiated array of devices or other filters. When read thread is successfully read from device this data can be passed to one or more filters. Each filter has name and filter names should be unique. You can use this name for access to PIPacketExtractor* with function filter(), or get array of assosiated devices and filters with function filterBoundedDevices(). One filter can receive data from several sources, and can be bounded to several filters.
PIConnection create PIDiagnostics for each device or filter. You can access to these objects with functions diagnostic().
-PIConnection can send data to devices with named timers ("senders"). You can create sender or add device to sender with function addSender(). Each sender has internal timer and every tick execute virtual function senderData(). Returns value of this function sended to bounded devices. You can assign fixed send data to sender with function setSenderFixedData(). In this case sender will NOT execute senderData(), but send assigned data.
You can create PIConnection from config file section or configure it later with function configureFromConfig(). Devices describes with its full pathes, for details see Creating devices by unambiguous string. Example:
Also PIConnection can create PIString with its configuration with function makeConfig(). This string can be directly inserted into the config file.
-| bool PIConnection::configureFromConfig | -( | -const PIString & | -config, | -
| - | - | const PIString & | -name = PIString::fromAscii ("connection") |
-
| - | ) | -- |
Configure connection from config file "config" from section "name". Returns if configuration was successful.
-Warning: all devices, filters and channels removed before configure!
- -| bool PIConnection::configureFromString | -( | -PIString * | -string, | -
| - | - | const PIString & | -name = PIString::fromAscii ("connection") |
-
| - | ) | -- |
Configure connection from config content "string" from section "name". Returns if configuration was successful.
-Warning: all devices, filters and channels removed before configure!
- -| PIIODevice * PIConnection::addDevice | -( | -const PIString & | -full_path, | -
| - | - | PIIODevice::DeviceMode | -mode = PIIODevice::ReadWrite, |
-
| - | - | bool | -start = false |
-
| - | ) | -- |
Add device with full path "full_path", open mode "mode" to Device pool and connection.
-Returns pointer to device or null if device can not be created. If "start" is true, read thread is started immediately. Else, you can start read thread with functions startThreadedRead() or startAllThreadedReads(). By default, read thread doesn`t start
- -| bool PIConnection::removeDevice | -( | -const PIString & | -full_path | ) | -- |
Remove device with full path "full_path" from connection.
-Returns if device was removed. If there is no connection bounded to this device, it will be removed from Device pool
- -| void PIConnection::removeAllDevices | -( | -) | -- |
Remove all device from connection.
-If there is no connection bounded to there devices, they removed from Device pool
- -| PIPacketExtractor * PIConnection::addFilter | -( | -const PIString & | -name, | -
| - | - | const PIString & | -full_path_name, | -
| - | - | PIPacketExtractor::SplitMode | -mode = PIPacketExtractor::None |
-
| - | ) | -- |
Add filter with name "name" to device with full path "full_path_name" or filter "full_path_name".
-If there is no filter with name "name", connection create new with split mode "mode" and bound to it device "full_path_name" or filter "full_path_name". If filter with name "name" already exists, device "full_path_name" or filter "full_path_name" add to this filter. This function returns PIPacketExtractor * assosiated with this filter
- Attention! "mode" is altual olny if new filter was created!
| bool PIConnection::removeFilter | -( | -const PIString & | -name, | -
| - | - | const PIString & | -full_path_name | -
| - | ) | -- |
Remove from filter with name "name" device with full path "full_path_name" or filter "full_path_name".
-If there is no devices bounded to this filter, it will be removed. Returns if device was removed
- -| bool PIConnection::addChannel | -( | -const PIString & | -name_from, | -
| - | - | const PIString & | -name_to | -
| - | ) | -- |
Add to connection channel from "name_from" to "name_to".
-"name_from" and "name_to" can be full pathes of devices or device names or filter names. Returns false if there if no such device or filter, else create channel and returns true
- -| bool PIConnection::removeChannel | -( | -const PIString & | -name_from, | -
| - | - | const PIString & | -name_to | -
| - | ) | -- |
Remove from connection channel from "name_from" to "name_to".
-"name_from" and "name_to" can be full pathes of devices or filter names. Returns false if there if no such device or filter, else remove channel and returns true
- -| bool PIConnection::removeChannel | -( | -const PIString & | -name_from | ) | -- |
Remove from connection all channels from "name_from".
-"name_from" can be full path of device or filter name. Returns false if there if no such device or filter, else remove channels and returns true
- -| void PIConnection::addSender | -( | -const PIString & | -name, | -
| - | - | const PIString & | -full_path_name, | -
| - | - | float | -frequency, | -
| - | - | bool | -start = false |
-
| - | ) | -- |
Add to connection sender with name "name" device with full path "full_path".
-If there is no sender with name "name", connection create new, bound to it device "full_path_name" and start sender timer with frequency "frequency". If sender with name "name" already exists, device "full_path_name" add to this sender If "start" is true, sender is started immediately. Else, you can start sender with functions startSender()
- Attention! "frequency" is actual olny if new sender was created!
| bool PIConnection::removeSender | -( | -const PIString & | -name, | -
| - | - | const PIString & | -full_path_name | -
| - | ) | -- |
Remove from sender with name "name" device with full path "full_path_name".
-If there is no devices bounded to this sender, it will be removed. Returns if sender was removed
- -|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIConsole, including all inherited members.
-| addBitVariable(const PIString &name, const void *ptr, int fromBit, int bitsCount, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| addCustomStatus(const PIString &str) | PIConsole | inline |
| addEmptyLine(int column=1, uint count=1) | PIConsole | |
| addString(const PIString &name, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| addTab(const PIString &name, char bind_key=0) | PIConsole | |
| addVariable(const PIString &name, const PIString *ptr, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const char *ptr, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const bool *ptr, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const short *ptr, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const int *ptr, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const long *ptr, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const llong *ptr, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const uchar *ptr, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const ushort *ptr, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const uint *ptr, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const ulong *ptr, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const ullong *ptr, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const float *ptr, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const double *ptr, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const PISystemTime *ptr, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const PIDiagnostics *ptr, int column=1, FormatFlags format=PIConsole::Normal) | PIConsole | |
| Alignment enum name | PIConsole | |
| BackBlack enum value | PIConsole | |
| BackBlue enum value | PIConsole | |
| BackCyan enum value | PIConsole | |
| BackGreen enum value | PIConsole | |
| BackMagenta enum value | PIConsole | |
| BackRed enum value | PIConsole | |
| BackWhite enum value | PIConsole | |
| BackYellow enum value | PIConsole | |
| Bin enum value | PIConsole | |
| Black enum value | PIConsole | |
| Blink enum value | PIConsole | |
| Blue enum value | PIConsole | |
| Bold enum value | PIConsole | |
| className() const | PIObject | inlinevirtual |
| clearCustomStatus() | PIConsole | inline |
| clearTab(uint index) | PIConsole | |
| clearTab(const PIString &name) | PIConsole | |
| clearTabs(bool clearScreen=true) | PIConsole | inline |
| clearVariables(bool clearScreen) | PIConsole | |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| CONNECTU_QUEUED | PIObject | related |
| currentTab() const | PIConsole | inline |
| currentTabIndex() const | PIConsole | inline |
| Cyan enum value | PIConsole | |
| data() const | PIThread | inline |
| debug() const | PIObject | inline |
| Dec enum value | PIConsole | |
| defaultAlignment() const | PIConsole | inline |
| deleted() | PIObject | protected |
| disableExitCapture() | PIConsole | inline |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| enableExitCapture(char key='Q') | PIConsole | inline |
| end() | PIThread | inlineprotectedvirtual |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| exitCaptured() const | PIConsole | inline |
| exitKey() const | PIConsole | inline |
| findByName(const PIString &name) | PIObject | inlinestatic |
| Format enum name | PIConsole | |
| Green enum value | PIConsole | |
| HANDLER | PIObject | related |
| Hex enum value | PIConsole | |
| Inverse enum value | PIConsole | |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isRunning() const | PIThread | inline |
| keyPressed(PIKbdListener::KeyEvent key, void *data) | PIConsole | |
| Left enum value | PIConsole | |
| lock() | PIThread | inline |
| Magenta enum value | PIConsole | |
| mutex() | PIThread | inline |
| name() const | PIObject | inline |
| needLockRun(bool need) | PIThread | inline |
| Normal enum value | PIConsole | |
| Nothing enum value | PIConsole | |
| Oct enum value | PIConsole | |
| parentClassName() const | PIObject | inlinevirtual |
| PIConsole(bool startNow=true, PIKbdListener::KBFunc slot=0) | PIConsole | explicit |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| piHigh enum value | PIThread | |
| piHighest enum value | PIThread | |
| piLow enum value | PIThread | |
| piLowerst enum value | PIThread | |
| piNormal enum value | PIThread | |
| PIOBJECT | PIObject | related |
| PIObject(const PIString &name=PIString()) | PIObject | explicit |
| PIOBJECT_SUBCLASS | PIObject | related |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | |
| Priority enum name | PIThread | |
| priority() const | PIThread | inline |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| Red enum value | PIConsole | |
| removeTab(uint index) | PIConsole | |
| removeTab(const PIString &name) | PIConsole | |
| Right enum value | PIConsole | |
| Scientific enum value | PIConsole | |
| setColumnAlignment(int col, Alignment align) | PIConsole | inline |
| setColumnAlignmentToAll(Alignment align) | PIConsole | inline |
| setData(void *d) | PIThread | inline |
| setDebug(bool debug) | PIObject | inline |
| setDefaultAlignment(Alignment align) | PIConsole | inline |
| setName(const PIString &name) | PIObject | inline |
| setPriority(PIThread::Priority prior) | PIThread | |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setSlot(ThreadFunc func) | PIThread | inline |
| setTab(uint index) | PIConsole | |
| setTab(const PIString &name) | PIConsole | |
| setTabBindKey(uint index, char bind_key) | PIConsole | |
| setTabBindKey(const PIString &name, char bind_key) | PIConsole | |
| start(bool wait) | PIConsole | inline |
| PIThread::start(int timer_delay) | PIThread | |
| started() | PIThread | |
| startOnce() | PIThread | |
| startOnce(ThreadFunc func) | PIThread | inline |
| stop(bool clear) | PIConsole | |
| stopped() | PIThread | |
| SystemTimeSeconds enum value | PIConsole | |
| SystemTimeSplit enum value | PIConsole | |
| tabsCount() const | PIConsole | inline |
| terminate() | PIThread | |
| tid() const | PIThread | inline |
| Underline enum value | PIConsole | |
| unlock() | PIThread | inline |
| waitForFinish() | PIConsole | inline |
| PIThread::waitForFinish(int timeout_msecs) | PIThread | |
| waitForStart(int timeout_msecs) | PIThread | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
| White enum value | PIConsole | |
| Yellow enum value | PIConsole |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Console output class. - More...
-
-Public Types | |
| enum | Format { - Normal = 0x01, -Bold = 0x02 -, Underline = 0x10, -Blink = 0x20, - - Inverse = 0x40, -Black = 0x100, -Red = 0x200, -Green = 0x400, - - Yellow = 0x800, -Blue = 0x1000, -Magenta = 0x2000, -Cyan = 0x4000, - - White = 0x8000, -BackBlack = 0x10000, -BackRed = 0x20000, -BackGreen = 0x40000, - - BackYellow = 0x80000, -BackBlue = 0x100000, -BackMagenta = 0x200000, -BackCyan = 0x400000, - - BackWhite = 0x800000, -Dec = 0x1000000, -Hex = 0x2000000, -Oct = 0x4000000, - - Bin = 0x8000000, -Scientific = 0x10000000, -SystemTimeSplit = 0x20000000, -SystemTimeSeconds = 0x40000000 - - } |
| Variables output format. More... | |
| enum | Alignment { Nothing, -Left, -Right - } |
| Column labels alignment. More... | |
Public Types inherited from PIThread | |
| enum | Priority { - piLowerst, -piLow, -piNormal, -piHigh, - - piHighest - - } |
| Priority of thread. More... | |
-Public Member Functions | |
| - | PIConsole (bool startNow=true, PIKbdListener::KBFunc slot=0) |
| Constructs PIConsole with key handler "slot" and if "startNow" start it. | |
| -void | addString (const PIString &name, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" string "name" with format "format". | |
| -void | addVariable (const PIString &name, const PIString *ptr, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| -void | addVariable (const PIString &name, const char *ptr, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| -void | addVariable (const PIString &name, const bool *ptr, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| -void | addVariable (const PIString &name, const short *ptr, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| -void | addVariable (const PIString &name, const int *ptr, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| -void | addVariable (const PIString &name, const long *ptr, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| -void | addVariable (const PIString &name, const llong *ptr, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| -void | addVariable (const PIString &name, const uchar *ptr, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| -void | addVariable (const PIString &name, const ushort *ptr, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| -void | addVariable (const PIString &name, const uint *ptr, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| -void | addVariable (const PIString &name, const ulong *ptr, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| -void | addVariable (const PIString &name, const ullong *ptr, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| -void | addVariable (const PIString &name, const float *ptr, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| -void | addVariable (const PIString &name, const double *ptr, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| -void | addVariable (const PIString &name, const PISystemTime *ptr, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| void | addVariable (const PIString &name, const PIDiagnostics *ptr, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". More... | |
| -void | addBitVariable (const PIString &name, const void *ptr, int fromBit, int bitsCount, int column=1, FormatFlags format=PIConsole::Normal) |
| Add to current tab to column "column" bits field with label "name", pointer "ptr" and format "format". | |
| -void | addEmptyLine (int column=1, uint count=1) |
| Add to current tab to column "column" "count" empty lines. | |
| -uint | tabsCount () const |
| Returns tabs count. | |
| -PIString | currentTab () const |
| Returns current tab name. | |
| -int | currentTabIndex () const |
| Returns current tab index. | |
| -int | addTab (const PIString &name, char bind_key=0) |
| Add new tab with name "name", bind key "bind_key" and returns this tab index. | |
| -void | removeTab (uint index) |
| Remove tab with index "index". | |
| -void | removeTab (const PIString &name) |
| Remove tab with name "name". | |
| -void | clearTab (uint index) |
| Clear content of tab with index "index". | |
| -void | clearTab (const PIString &name) |
| Clear content of tab with name "name". | |
| -bool | setTab (uint index) |
| Set current tab to tab with index "index", returns if tab exists. | |
| -bool | setTab (const PIString &name) |
| Set current tab to tab with name "name", returns if tab exists. | |
| -bool | setTabBindKey (uint index, char bind_key) |
| Set tab with index "index" bind key to "bind_key", returns if tab exists. | |
| -bool | setTabBindKey (const PIString &name, char bind_key) |
| Set tab with name "name" bind key to "bind_key", returns if tab exists. | |
| -void | clearTabs (bool clearScreen=true) |
| Remove all tabs and if "clearScreen" clear the screen. | |
| -void | addCustomStatus (const PIString &str) |
| Set custom status text of current tab to "str". | |
| -void | clearCustomStatus () |
| Clear custom status text of current tab. | |
| -Alignment | defaultAlignment () const |
| Returns default alignment. | |
| -void | setDefaultAlignment (Alignment align) |
| Set default alignment to "align". | |
| -void | setColumnAlignment (int col, Alignment align) |
| Set column "col" alignment to "align". | |
| -void | setColumnAlignmentToAll (Alignment align) |
| Set all columns of all tabs alignment to "align". | |
| -void | enableExitCapture (char key='Q') |
| Directly call function from PIKbdListener. | |
| -void | disableExitCapture () |
| Directly call function from PIKbdListener. | |
| -bool | exitCaptured () const |
| Directly call function from PIKbdListener. | |
| -char | exitKey () const |
| Directly call function from PIKbdListener. | |
Public Member Functions inherited from PIThread | |
| - | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| - | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| -void | setData (void *d) |
| Set common data passed to external function. | |
| -void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| -void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| -void * | data () const |
| Returns common data passed to external function. | |
| -PIThread::Priority | priority () const |
| Return priority of thread. | |
| -bool | isRunning () const |
Return true if thread is running. | |
| -void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| -PIMutex & | mutex () |
| Returns internal mutex. | |
| -llong | tid () const |
| Returns thread ID. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| -void | lock () |
| Lock internal mutex. | |
| -void | unlock () |
| Unlock internal mutex. | |
| -void | started () |
| Raise on thread start. | |
| -void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Handlers | |
| -void | clearVariables (bool clearScreen) |
| Remove all columns at current tab and if "clearScreen" clear the screen. | |
| -void | waitForFinish () |
| block until finished (exit key will be pressed) | |
| -void | start (bool wait) |
| Start console output and if "wait" block until finished (exit key will be pressed) | |
| -void | stop (bool clear) |
| Stop console output and if "clear" clear the screen. | |
-Events | |
| -void | keyPressed (PIKbdListener::KeyEvent key, void *data) |
| Raise on key "key" pressed, "data" is pointer to PIConsole object. | |
-Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Protected Member Functions inherited from PIThread | |
| -virtual void | end () |
| Function executed once at the end of thread. | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Console output class.
-This class provides output to console with automatic alignment and update. It supports tabs, keyboard listening, formats and colors.
-PIConsole works with variable pointers. You should add your variables with functions addVariable() which receives label name, pointer to variable and optional column and format. Columns count is dynamically increased if new column used. E.g. if you add variable to empty tab to column 3, columns count will be increased to 3, but two firsts columns will be empty. Each column filled from top to bottom, but you can add just string with function addString() or add empty line with function addEmptyLine(). Layout scheme:
PIConsole should to be single in application. PIConsole aggregate PIKbdListener which grab keyboard and automatic switch tabs by theirs bind keys. If there is no tab binded to pressed key external function "slot" will be called
-| enum PIConsole::Format | -
Variables output format.
-| Enumerator | |
|---|---|
| Normal | Default console format - |
| Bold | Bold text - |
| Underline | Underlined text - |
| Blink | Blinked text - |
| Inverse | Swap text and background colors - |
| Black | Black text - |
| Red | Red text - |
| Green | Green text - |
| Yellow | Yellow text - |
| Blue | Blue text - |
| Magenta | Magenta text - |
| Cyan | Cyan text - |
| White | White text - |
| BackBlack | Black background - |
| BackRed | Red background - |
| BackGreen | Green background - |
| BackYellow | Yellow background - |
| BackBlue | Blue background - |
| BackMagenta | Magenta background - |
| BackCyan | Cyan background - |
| BackWhite | White background - |
| Dec | Decimal base for integers - |
| Hex | Hexadecimal base for integers - |
| Oct | Octal base for integers - |
| Bin | Binary base for integers - |
| Scientific | Scientific representation of floats - |
| SystemTimeSplit | PISystemTime split representation (* s, * ns) - |
| SystemTimeSeconds | PISystemTime seconds representation (*.* s) - |
| enum PIConsole::Alignment | -
| void PIConsole::addVariable | -( | -const PIString & | -name, | -
| - | - | const PIDiagnostics * | -ptr, | -
| - | - | int | -col = 1, |
-
| - | - | FormatFlags | -format = PIConsole::Normal |
-
| - | ) | -- |
Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format".
-This function add to column "column" next lines:
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PICout, including all inherited members.
-| AllDevices enum value | PICout | |
| Buffer enum value | PICout | |
| newLine() | PICout | |
| NoDevices enum value | PICout | |
| operator<<(const char *v) | PICout | |
| operator<<(const bool v) | PICout | |
| operator<<(const char v) | PICout | |
| operator<<(const uchar v) | PICout | |
| operator<<(const short v) | PICout | |
| operator<<(const ushort v) | PICout | |
| operator<<(const int v) | PICout | |
| operator<<(const uint v) | PICout | |
| operator<<(const long v) | PICout | |
| operator<<(const ulong v) | PICout | |
| operator<<(const llong v) | PICout | |
| operator<<(const ullong v) | PICout | |
| operator<<(const float v) | PICout | |
| operator<<(const double v) | PICout | |
| operator<<(const void *v) | PICout | |
| operator<<(const PIObject *v) | PICout | |
| operator<<(const PICoutManipulators::PICoutSpecialChar v) | PICout | |
| operator<<(const PIFlags< PICoutManipulators::PICoutFormat > &v) | PICout | inline |
| operator<<(const PICoutManipulators::PICoutFormat v) | PICout | inline |
| operator<<(const PICoutManipulators::PICoutAction v) | PICout | |
| operator<<(PICout s, const PIString &v) | PICout | related |
| operator<<(PICout s, const PIStringList &v) | PICout | related |
| operator<<(PICout s, const PISystemTime &v) | PICout | related |
| operator<<(PICout s, const PITime &v) | PICout | related |
| operator<<(PICout s, const PIDate &v) | PICout | related |
| operator<<(PICout s, const PIDateTime &v) | PICout | related |
| OutputDevice enum name | PICout | |
| PICout(PIFlags< PICoutManipulators::PICoutControl > controls=PICoutManipulators::AddSpaces|PICoutManipulators::AddNewLine) | PICout | explicit |
| PICout(PIString *buffer, int id=0, PIFlags< PICoutManipulators::PICoutControl > controls=PICoutManipulators::AddSpaces|PICoutManipulators::AddNewLine) | PICout | |
| quote() | PICout | |
| restoreControl() | PICout | |
| saveControl() | PICout | |
| setControl(PICoutManipulators::PICoutControl c, bool on=true) | PICout | inline |
| setControl(PICoutManipulators::PICoutControls c, bool save=false) | PICout | inline |
| space() | PICout | |
| StdOut enum value | PICout |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Class for formatted output similar std::cout. - More...
--Classes | |
| class | Notifier |
| Class for emit notifications of PICout. More... | |
-Public Types | |
| enum | OutputDevice { NoDevices = 0x0, -StdOut = 0x1, -Buffer = 0x2, -AllDevices = 0xFFFF - } |
| Enum contains output devices of PICout. More... | |
-Public Member Functions | |
| - | PICout (PIFlags< PICoutManipulators::PICoutControl > controls=PICoutManipulators::AddSpaces|PICoutManipulators::AddNewLine) |
| Default constructor with default features (AddSpaces and AddNewLine) | |
| - | PICout (PIString *buffer, int id=0, PIFlags< PICoutManipulators::PICoutControl > controls=PICoutManipulators::AddSpaces|PICoutManipulators::AddNewLine) |
| Construct with external buffer and id "id". See Notifier for details. | |
| -PICout | operator<< (const char *v) |
Output operator for strings with "const char * " type. | |
| PICout | operator<< (const bool v) |
Output operator for strings with "std::string" type. More... | |
| -PICout | operator<< (const char v) |
Output operator for "char" values. | |
| -PICout | operator<< (const uchar v) |
Output operator for "unsigned char" values. | |
| -PICout | operator<< (const short v) |
Output operator for "short" values. | |
| -PICout | operator<< (const ushort v) |
Output operator for "unsigned short" values. | |
| -PICout | operator<< (const int v) |
Output operator for "int" values. | |
| -PICout | operator<< (const uint v) |
Output operator for "unsigned int" values. | |
| -PICout | operator<< (const long v) |
Output operator for "long" values. | |
| -PICout | operator<< (const ulong v) |
Output operator for "unsigned long" values. | |
| -PICout | operator<< (const llong v) |
Output operator for "long long" values. | |
| -PICout | operator<< (const ullong v) |
Output operator for "unsigned long long" values. | |
| -PICout | operator<< (const float v) |
Output operator for "float" values. | |
| -PICout | operator<< (const double v) |
Output operator for "double" values. | |
| -PICout | operator<< (const void *v) |
| Output operator for pointers. | |
| -PICout | operator<< (const PIObject *v) |
| Output operator for PIObject and ancestors. | |
| -PICout | operator<< (const PICoutManipulators::PICoutSpecialChar v) |
| Output operator for PICoutSpecialChar values. | |
| -PICout | operator<< (const PIFlags< PICoutManipulators::PICoutFormat > &v) |
| Output operator for PIFlags<PICoutFormat> values. | |
| -PICout | operator<< (const PICoutManipulators::PICoutFormat v) |
| Output operator for PICoutFormat values. | |
| PICout | operator<< (const PICoutManipulators::PICoutAction v) |
| Do some action. More... | |
| -PICout & | setControl (PICoutManipulators::PICoutControl c, bool on=true) |
| Set control flag "c" is "on" state. | |
| -PICout & | setControl (PICoutManipulators::PICoutControls c, bool save=false) |
| Set control flags "c" and if "save" exec saveControl() | |
| PICout & | saveControl () |
| Save control flags to internal stack. More... | |
| PICout & | restoreControl () |
| Restore control flags from internal stack. More... | |
| PICout & | space () |
| Conditional put space character to output. More... | |
| PICout & | quote () |
| Conditional put quote character to output. More... | |
| PICout & | newLine () |
| Conditional put new line character to output. More... | |
-Related Functions | |
(Note that these are not member functions.) - | |
| -PICout | operator<< (PICout s, const PIString &v) |
| Output operator to PICout. | |
| -PICout | operator<< (PICout s, const PIStringList &v) |
| Output operator to PICout. | |
| -PICout | operator<< (PICout s, const PISystemTime &v) |
| Output operator to PICout. | |
| -PICout | operator<< (PICout s, const PITime &v) |
| Output operator to PICout. | |
| -PICout | operator<< (PICout s, const PIDate &v) |
| Output operator to PICout. | |
| -PICout | operator<< (PICout s, const PIDateTime &v) |
| Output operator to PICout. | |
Class for formatted output similar std::cout.
-This class provide many stream operators for output with some features. Output to PICout is thread-sequential, i.e. doesn`t mixed from parallel threads.
-| enum PICout::OutputDevice | -
| PICout PICout::operator<< | -( | -const bool | -v | ) | -- |
Output operator for strings with "std::string" type.
Output operator for boolean values
- -| PICout PICout::operator<< | -( | -const PICoutManipulators::PICoutAction | -v | ) | -- |
Do some action.
-TODO : wondows ClearScreen !!!
- -| PICout & PICout::saveControl | -( | -) | -- |
Save control flags to internal stack.
-| PICout & PICout::restoreControl | -( | -) | -- |
Restore control flags from internal stack.
-| PICout & PICout::space | -( | -) | -- |
| PICout & PICout::quote | -( | -) | -- |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PICout::Notifier, including all inherited members.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Class for emit notifications of PICout. - More...
-Class for emit notifications of PICout.
-This class used as PICout events emitter. When PICout constructs with external PIString* buffer and some id, last copy of this PICout on delete emit event "finished()" on object Notifier::object(). Sample:
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIDiagnostics, including all inherited members.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Connection quality diagnostics. - More...
-
-Classes | |
| struct | State |
| Information about current diagnostics state. More... | |
-Public Types | |
| enum | Quality { - Unknown = 1, -Failure = 2, -Bad = 3, -Average = 4, - - Good = 5 - - } |
| Connection quality. More... | |
Public Types inherited from PITimer | |
| enum | TimerImplementation { Thread = 0x01, -ThreadRT = 0x02, -Pool = 0x04 - } |
| Timer implementations. More... | |
-Public Member Functions | |
| - | PIDiagnostics (bool start_=true) |
| Constructs an empty diagnostics and if "start_" start it. | |
| -PIDiagnostics::State | state () const |
| Returns current state. | |
| -float | disconnectTimeout () const |
| Returns period of full disconnect in seconds and period of averaging frequency. | |
| -void | setDisconnectTimeout (float s) |
| Returns period of full disconnect in seconds and period of averaging frequency. | |
| -float | immediateFrequency () const |
| Returns immediate receive frequency, packets/s. | |
| -float | integralFrequency () const |
| Returns integral receive frequency for disconnectTimeout() seconds, packets/s. | |
| -ullong | receiveCountPerSec () const |
| Returns correct received packets per second. | |
| -ullong | sendCountPerSec () const |
| Returns sended packets per second. | |
| -ullong | receiveBytesPerSec () const |
| Returns correct received bytes per second. | |
| -ullong | sendBytesPerSec () const |
| Returns sended bytes per second. | |
| -ullong | receiveBytes () const |
| Returns overall correct received bytes. | |
| -ullong | wrongBytes () const |
| Returns overall wrong received bytes. | |
| -ullong | sendBytes () const |
| Returns overall sended bytes. | |
| -ullong | receiveCount () const |
| Returns overall correct received packets count. | |
| -ullong | wrongCount () const |
| Returns overall wrong received packets count. | |
| -ullong | sendCount () const |
| Returns overall sended packets count. | |
| -PIDiagnostics::Quality | quality () const |
| Returns connection quality. | |
| -PIString | receiveSpeed () const |
| Returns receive speed in format "n {B|kB|MB|GB|TB}/s". | |
| -PIString | sendSpeed () const |
| Returns send speed in format "n {B|kB|MB|GB|TB}/s". | |
| -const float * | immediateFrequency_ptr () const |
| Returns immediate receive frequency pointer, packets/s. Useful for output to PIConsole. | |
| -const float * | integralFrequency_ptr () const |
| Returns integral receive frequency pointer for period, packets/s. Useful for output to PIConsole. | |
| -const ullong * | receiveCountPerSec_ptr () const |
| Returns correct received packets per second pointer. Useful for output to PIConsole. | |
| -const ullong * | sendCountPerSec_ptr () const |
| Returns sended packets per second pointer. Useful for output to PIConsole. | |
| -const ullong * | receiveBytesPerSec_ptr () const |
| Returns correct received bytes per second pointer. Useful for output to PIConsole. | |
| -const ullong * | sendBytesPerSec_ptr () const |
| Returns sended bytes per second pointer. Useful for output to PIConsole. | |
| -const ullong * | receiveBytes_ptr () const |
| Returns overall correct received bytes pointer. Useful for output to PIConsole. | |
| -const ullong * | wrongBytes_ptr () const |
| Returns overall wrong received bytes pointer. Useful for output to PIConsole. | |
| -const ullong * | sendBytes_ptr () const |
| Returns overall sended bytes pointer. Useful for output to PIConsole. | |
| -const ullong * | receiveCount_ptr () const |
| Returns overall correct received packets count pointer. Useful for output to PIConsole. | |
| -const ullong * | wrongCount_ptr () const |
| Returns overall wrong received packets count pointer. Useful for output to PIConsole. | |
| -const ullong * | sendCount_ptr () const |
| Returns overall sended packets count pointer. Useful for output to PIConsole. | |
| -const int * | quality_ptr () const |
| Returns connection quality pointer. Useful for output to PIConsole. | |
| -const PIString * | receiveSpeed_ptr () const |
| Returns receive speed pointer in format "n {B|kB|MB|GB|TB}/s". Useful for output to PIConsole. | |
| -const PIString * | sendSpeed_ptr () const |
| Returns send speed pointer in format "n {B|kB|MB|GB|TB}/s". Useful for output to PIConsole. | |
Public Member Functions inherited from PITimer | |
| - | PITimer () |
| Constructs timer with PITimer::Thread implementation. | |
| - | PITimer (TimerImplementation ti) |
| Constructs timer with "ti" implementation. | |
| - | PITimer (TimerEvent slot, void *data=0, TimerImplementation ti=Thread) |
| Constructs timer with "slot" slot, "data" data and "ti" implementation. | |
| -PITimer::TimerImplementation | implementation () const |
| Returns timer implementation. | |
| -double | interval () const |
| Returns timer loop delay in milliseconds. | |
| -void | setInterval (double ms) |
| Set timer loop delay in milliseconds. | |
| -bool | isRunning () const |
| Returns if timer is started. | |
| -bool | isStopped () const |
| Returns if timer is not started. | |
| void | startDeferred (double delay_ms) |
| Start timer with interval() loop delay after delay_msecs delay. More... | |
| void | startDeferred (double interval_ms, double delay_ms) |
| Start timer with interval_msecs loop delay after delay_msecs delay. More... | |
| void | startDeferred (PIDateTime start_datetime) |
| Start timer with interval() loop delay after start_datetime date and time. More... | |
| void | startDeferred (double interval_ms, PIDateTime start_datetime) |
| Start timer with interval_msecs loop delay after start_datetime date and time. More... | |
| -void | setData (void *data_) |
| Set custom data. | |
| -void | setSlot (TimerEvent slot) |
| Set timer tick function. | |
| -void * | data () const |
| Returns common data passed to tick functions. | |
| -void | addDelimiter (int delim, TimerEvent slot=0) |
| Add frequency delimiter delim with optional delimiter slot slot. | |
| -void | removeDelimiter (int delim) |
| Remove all frequency delimiters delim. | |
| -void | removeDelimiter (TimerEvent slot) |
| Remove all frequency delimiters with slot slot. | |
| -void | removeDelimiter (int delim, TimerEvent slot) |
| Remove all frequency delimiters delim with slot slot. | |
| bool | start () |
| Start timer with interval() loop delay. More... | |
| bool | start (double interval_ms_d) |
| Start timer with msecs loop delay. More... | |
| -bool | restart () |
| Stop and start timer with interval() loop delay. | |
| -bool | stop (bool wait) |
| Stop timer and wait for it finish if "wait". | |
| -void | clearDelimiters () |
| Remove all frequency delimiters. | |
| void | tickEvent (void *data_, int delimiter) |
| Raise on timer tick. More... | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Handlers | |
| -void | start (double msecs) |
| Start diagnostics evaluations with period "msecs" milliseconds. | |
| -void | reset () |
| Reset diagnostics counters. | |
| -void | received (int size, bool correct) |
| Notify diagnostics about "correct" corected received packet. | |
| -void | sended (int size) |
| Notify diagnostics about sended packet. | |
-Events | |
| -void | qualityChanged (PIDiagnostics::Quality new_quality, PIDiagnostics::Quality old_quality) |
| Raise on change receive quality from "old_quality" to "new_quality". | |
-Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| void | deleted () |
| Raise before object delete. More... | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Connection quality diagnostics.
-This class provide abstract connection quality diagnostics and counting. You should create instance of PIDiagnostics and on packet receive call function received(), on packet send call function sended(). PIDiagnostics calculates correct, wrong and sended counters, packets per second, bytes per seconds, immediate and integral receive frequencies and receive/send speeds in human readable representation. There statistics are calculates one time per period, by default 1 second. To calculate them you should start PIDiagnostics with function start() or pass true to constructor.
-| enum PIDiagnostics::Quality | -
Connection quality.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIDir, including all inherited members.
-| absolutePath() const | PIDir | |
| allEntries() | PIDir | |
| cleanedPath() const | PIDir | inline |
| cleanPath() | PIDir | |
| entries() | PIDir | |
| isAbsolute() const | PIDir | |
| isExists() const | PIDir | inline |
| isRelative() const | PIDir | inline |
| path() const | PIDir | |
| PIDir(const PIString &dir=PIString()) | PIDir | |
| PIDir(const PIFile &file) | PIDir | |
| relative(const PIString &path) const | PIDir | |
| scanDir() const | PIDir | inline |
| setCurrent() | PIDir | inline |
| setDir(const PIString &path) | PIDir |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Local directory. - More...
--Public Member Functions | |
| - | PIDir (const PIString &dir=PIString()) |
| Constructs directory with path "path". | |
| - | PIDir (const PIFile &file) |
| Constructs directory with "file" directory path "path". | |
| -bool | isExists () const |
| Returns if this directory is exists. | |
| -bool | isAbsolute () const |
| Returns if path of this directory is absolute. | |
| -bool | isRelative () const |
| Returns if path of this directory is relative. | |
| const PIString & | scanDir () const |
| -PIString | path () const |
| Returns path of this directory. | |
| -PIString | absolutePath () const |
| Returns absolute path of this directory. | |
| PIDir & | cleanPath () |
| Simplify path of this directory. More... | |
| -PIDir | cleanedPath () const |
| Returns PIDir with simplified path of this directory. | |
| -PIString | relative (const PIString &path) const |
| Returns relative to this directory path "path". | |
| -PIDir & | setDir (const PIString &path) |
| Set this directory path to simplified "path". | |
| -bool | setCurrent () |
| Set this directory path as current for application. | |
| PIVector< PIFile::FileInfo > | entries () |
| Returns this directory content. More... | |
| PIVector< PIFile::FileInfo > | allEntries () |
| Returns all this directory content. More... | |
Local directory.
-This class provide access to local file. You can manipulate binary content or use this class as text stream. To binary access there are function read(), write(), and many writeBinary() functions. For write variables to file in their text representation threr are many "<<" operators.
-
-
|
- -inline | -
Returns path of current reading directory. This path valid only while allEntries functions
- -| PIDir & PIDir::cleanPath | -( | -) | -- |
Simplify path of this directory.
-This function remove repeatedly separators and resolve ".." in path. E.g. "/home/.//peri4/src/../.." will become "/home"
- This function returns reference to this PIDir
| PIVector< PIFile::FileInfo > PIDir::entries | -( | -) | -- |
Returns this directory content.
-Scan this directory and returns all directories and files in one list, sorted alphabetically. This list contains also "." and ".." members. There are absolute pathes in returned list.
| PIVector< PIFile::FileInfo > PIDir::allEntries | -( | -) | -- |
Returns all this directory content.
-Scan this directory recursively and returns all directories and files in one list, sorted alphabetically. This list doesn`t contains "." and ".." members. There are absolute pathes in returned list, and files placed after directories in this list
-TODO: resolve symlinks
- -|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIEthUtilBase, including all inherited members.
-| createCryptKey(const PIString &k) | PIEthUtilBase | |
| cryptData(const PIByteArray &data) | PIEthUtilBase | protected |
| cryptDisable() | PIEthUtilBase | inline |
| cryptEnable() | PIEthUtilBase | inline |
| cryptKey() const | PIEthUtilBase | inline |
| decryptData(const PIByteArray &data) | PIEthUtilBase | protected |
| isCryptEnabled() const | PIEthUtilBase | inline |
| setCryptEnabled(bool on) | PIEthUtilBase | inline |
| setCryptKey(const PIByteArray &k) | PIEthUtilBase | inline |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Base class for ethernet utils. - More...
-
-Public Member Functions | |
| -void | setCryptEnabled (bool on) |
| Set crypt layer enabled. | |
| -void | cryptEnable () |
| Enable crypt layer. | |
| -void | cryptDisable () |
| Disable crypt layer. | |
| -bool | isCryptEnabled () const |
| Returns if crypt layer enabled. | |
| -void | setCryptKey (const PIByteArray &k) |
| Set crypt layer key to "k". | |
| void | createCryptKey (const PIString &k) |
| -PIByteArray | cryptKey () const |
| Returns crypt layer key. | |
-Protected Member Functions | |
| -PIByteArray | cryptData (const PIByteArray &data) |
| Returns encrypted data if layer enabled, otherwise returns unchanged "data". | |
| -PIByteArray | decryptData (const PIByteArray &data) |
| Returns decrypted data if layer enabled, otherwise returns unchanged "data". If decryption was unsuccessfull returns empty PIByteArray. | |
Base class for ethernet utils.
-PIEthUtilBase provides crypt layer for derived classes: PIStreamPacker and PIBroadcast. All input and output (sended and received) data can be decrypted/encrypted by this layer.
-By default crypt layer is disabled.
-You can separetely enable it and set ready-to-use key by setCryptEnabled() and setCryptKey(). Or you can use createCryptKey() to generate key from your passphrase and automatic enable crypt layer.
-You can use this class as base for your own classes. Use cryptData() and decryptData() when send and receive your data.
-| void PIEthUtilBase::createCryptKey | -( | -const PIString & | -k | ) | -- |
Generate crypt layer key by PICrypt::hash and set crypt layer enabled
- -|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIEthernet, including all inherited members.
-| allAddresses() | PIEthernet | static |
| BlockingRead enum value | PIIODevice | |
| BlockingWrite enum value | PIIODevice | |
| Broadcast enum value | PIEthernet | |
| canRead() const | PIIODevice | inlinevirtual |
| canWrite() const | PIEthernet | inlinevirtual |
| className() const | PIObject | inlinevirtual |
| clearThreadedWriteQueue() | PIIODevice | inline |
| close() | PIIODevice | inline |
| closed() | PIIODevice | |
| closeDevice() | PIEthernet | protectedvirtual |
| configure(const PIString &config_file, const PIString §ion, bool parent_section=false) | PIIODevice | |
| configureDevice(const void *e_main, const void *e_parent=0) | PIEthernet | protectedvirtual |
| configureFromFullPath(const PIString &full_path) | PIIODevice | |
| configureFromFullPathDevice(const PIString &full_path) | PIEthernet | protectedvirtual |
| connect() | PIEthernet | |
| connect(const PIString &ip, int port) | PIEthernet | inline |
| connect(const PIString &ip_port) | PIEthernet | inline |
| connect(const Address &addr) | PIEthernet | inline |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| connected() | PIEthernet | |
| CONNECTU | PIObject | related |
| CONNECTU_QUEUED | PIObject | related |
| constructFullPath() const | PIIODevice | |
| constructFullPathDevice() const | PIEthernet | protectedvirtual |
| createFromFullPath(const PIString &full_path) | PIIODevice | static |
| data() const | PIThread | inline |
| debug() const | PIObject | inline |
| deleted() | PIObject | protected |
| DeviceInfoFlag enum name | PIIODevice | |
| deviceInfoFlags() const | PIEthernet | protectedvirtual |
| DeviceMode enum name | PIIODevice | |
| DeviceOption enum name | PIIODevice | |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| disconnected(bool withError) | PIEthernet | |
| DisonnectOnTimeout enum value | PIEthernet | |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlinestatic |
| flush() | PIIODevice | inlinevirtual |
| fullPathPrefix() const | PIEthernet | inlineprotectedvirtual |
| HANDLER | PIObject | related |
| ifActive enum value | PIEthernet | |
| ifBroadcast enum value | PIEthernet | |
| ifLoopback enum value | PIEthernet | |
| ifMulticast enum value | PIEthernet | |
| ifPTP enum value | PIEthernet | |
| ifRunning enum value | PIEthernet | |
| infoFlags() const | PIIODevice | inline |
| init() | PIEthernet | protectedvirtual |
| InterfaceFlag enum name | PIEthernet | |
| InterfaceFlags typedef | PIEthernet | |
| interfaces() | PIEthernet | static |
| ip | PIEthernet | |
| isClosed() const | PIIODevice | inline |
| isConnected() const | PIEthernet | inline |
| isConnecting() const | PIEthernet | inline |
| isOpened() const | PIIODevice | inline |
| isOptionSet(DeviceOption o) const | PIIODevice | inline |
| isParameterSet(PIEthernet::Parameters parameter) const | PIEthernet | inline |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isReadable() const | PIIODevice | inline |
| isReopenEnabled() const | PIIODevice | inline |
| isRunning() const | PIThread | inline |
| isThreadedRead() const | PIIODevice | inline |
| isThreadedWrite() const | PIIODevice | inline |
| isWriteable() const | PIIODevice | inline |
| joinMulticastGroup(const PIString &group) | PIEthernet | |
| KeepConnection enum value | PIEthernet | |
| lastReadAddress() const | PIEthernet | inline |
| lastReadIP() const | PIEthernet | inline |
| lastReadPort() const | PIEthernet | inline |
| leaveMulticastGroup(const PIString &group) | PIEthernet | |
| listen(bool threaded=false) | PIEthernet | |
| listen(const PIString &ip, int port, bool threaded=false) | PIEthernet | inline |
| listen(const PIString &ip_port, bool threaded=false) | PIEthernet | inline |
| listen(const Address &addr, bool threaded=false) | PIEthernet | inline |
| lock() | PIThread | inline |
| mode() const | PIIODevice | inline |
| multicastGroups() const | PIEthernet | inline |
| MulticastLoop enum value | PIEthernet | |
| multicastTTL | PIEthernet | |
| multicastTTL() const | PIEthernet | inline |
| mutex() | PIThread | inline |
| name() const | PIObject | inline |
| needLockRun(bool need) | PIThread | inline |
| newConnection(PIEthernet *client) | PIEthernet | |
| open() | PIIODevice | inline |
| open(const PIString &_path) | PIIODevice | inline |
| openDevice() | PIEthernet | protectedvirtual |
| opened() | PIIODevice | |
| options() const | PIIODevice | inline |
| optionsChanged() | PIIODevice | inlineprotectedvirtual |
| Parameters enum name | PIEthernet | |
| parameters | PIEthernet | |
| parameters() const | PIEthernet | inline |
| parentClassName() const | PIObject | inlinevirtual |
| path() const | PIIODevice | inline |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| PIEthernet() | PIEthernet | explicit |
| PIEthernet(Type type, const PIString &ip_port=PIString(), const PIFlags< Parameters > params=PIEthernet::ReuseAddress|PIEthernet::MulticastLoop|PIEthernet::KeepConnection) | PIEthernet | explicit |
| piHigh enum value | PIThread | |
| piHighest enum value | PIThread | |
| PIIODevice() | PIIODevice | explicit |
| PIIODevice(const PIString &path, DeviceMode mode=ReadWrite) | PIIODevice | explicit |
| PIIODEVICE | PIIODevice | related |
| piLow enum value | PIThread | |
| piLowerst enum value | PIThread | |
| piNormal enum value | PIThread | |
| PIObject(const PIString &name=PIString()) | PIObject | explicit |
| PIOBJECT | PIObject | related |
| PIOBJECT_SUBCLASS | PIObject | related |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | |
| port | PIEthernet | |
| priority() const | PIThread | inline |
| Priority enum name | PIThread | |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIEthernet | protectedvirtual |
| read(void *read_to, int max_size) | PIIODevice | inline |
| read(int max_size) | PIIODevice | inline |
| readAddress() const | PIEthernet | inline |
| readDevice(void *read_to, int max_size) | PIEthernet | protectedvirtual |
| readDeviceSetting(const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) | PIIODevice | related |
| readForTime(double timeout_ms) | PIIODevice | |
| readIP() const | PIEthernet | inline |
| ReadOnly enum value | PIIODevice | |
| readPort() const | PIEthernet | inline |
| readTimeout | PIEthernet | |
| readTimeout() const | PIEthernet | inline |
| ReadWrite enum value | PIIODevice | |
| received(const void *data, int size) | PIEthernet | inlineprotectedvirtual |
| REGISTER_DEVICE | PIIODevice | related |
| Reliable enum value | PIIODevice | |
| reopenEnabled | PIIODevice | |
| reopenTimeout | PIIODevice | |
| reopenTimeout() | PIIODevice | inline |
| ReuseAddress enum value | PIEthernet | |
| send(const void *data, int size, bool threaded=false) | PIEthernet | inline |
| send(const PIString &ip, int port, const void *data, int size, bool threaded=false) | PIEthernet | inline |
| send(const PIString &ip_port, const void *data, int size, bool threaded=false) | PIEthernet | inline |
| send(const Address &addr, const void *data, int size, bool threaded=false) | PIEthernet | inline |
| send(const PIByteArray &data, bool threaded=false) | PIEthernet | inline |
| send(const PIString &ip, int port, const PIByteArray &data, bool threaded=false) | PIEthernet | inline |
| send(const PIString &ip_port, const PIByteArray &data, bool threaded=false) | PIEthernet | inline |
| send(const Address &addr, const PIByteArray &data, bool threaded=false) | PIEthernet | inline |
| sendAddress() const | PIEthernet | inline |
| sendIP() const | PIEthernet | inline |
| sendPort() const | PIEthernet | inline |
| SeparateSockets enum value | PIEthernet | |
| Sequential enum value | PIIODevice | |
| setData(void *d) | PIThread | inline |
| setDebug(bool debug) | PIObject | inline |
| setMode(DeviceMode m) | PIIODevice | inline |
| setMulticastTTL(int ttl) | PIEthernet | inline |
| setName(const PIString &name) | PIObject | inline |
| setOption(DeviceOption o, bool yes=true) | PIIODevice | |
| setOptions(DeviceOptions o) | PIIODevice | |
| setParameter(PIEthernet::Parameters parameter, bool on=true) | PIEthernet | |
| setParameters(PIFlags< PIEthernet::Parameters > parameters_) | PIEthernet | inline |
| setPath(const PIString &path) | PIIODevice | inline |
| setPriority(PIThread::Priority prior) | PIThread | |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setReadAddress(const PIString &ip, int port) | PIEthernet | inline |
| setReadAddress(const PIString &ip_port) | PIEthernet | inline |
| setReadAddress(const Address &addr) | PIEthernet | inline |
| setReadIP(const PIString &ip) | PIEthernet | inline |
| setReadPort(int port) | PIEthernet | inline |
| setReadTimeout(double ms) | PIEthernet | inline |
| setReopenEnabled(bool yes=true) | PIIODevice | inline |
| setReopenTimeout(int msecs) | PIIODevice | inline |
| setSendAddress(const PIString &ip, int port) | PIEthernet | inline |
| setSendAddress(const PIString &ip_port) | PIEthernet | inline |
| setSendAddress(const Address &addr) | PIEthernet | inline |
| setSendIP(const PIString &ip) | PIEthernet | inline |
| setSendPort(int port) | PIEthernet | inline |
| setSlot(ThreadFunc func) | PIThread | inline |
| setThreadedReadBufferSize(int new_size) | PIIODevice | inline |
| setThreadedReadData(void *d) | PIIODevice | inline |
| setThreadedReadSlot(ReadRetFunc func) | PIIODevice | inline |
| setTTL(int ttl) | PIEthernet | inline |
| setWriteTimeout(double ms) | PIEthernet | inline |
| start() | PIIODevice | inline |
| PIThread::start(int timer_delay) | PIThread | |
| started() | PIThread | |
| startOnce() | PIThread | |
| startOnce(ThreadFunc func) | PIThread | inline |
| startThreadedRead() | PIIODevice | inline |
| startThreadedRead(ReadRetFunc func) | PIIODevice | inline |
| startThreadedWrite() | PIIODevice | inline |
| stop(bool wait=false) | PIIODevice | inline |
| stopped() | PIThread | |
| stopThreadedRead() | PIIODevice | inline |
| stopThreadedWrite() | PIIODevice | inline |
| TCP_Client enum value | PIEthernet | |
| TCP_Server enum value | PIEthernet | |
| TCP_SingleTCP enum value | PIEthernet | |
| threadedRead(uchar *readed, int size) | PIIODevice | protectedvirtual |
| threadedReadBuffer() const | PIIODevice | inline |
| threadedReadBufferSize | PIIODevice | |
| threadedReadBufferSize() const | PIIODevice | inline |
| threadedReadBufferSizeChanged() | PIIODevice | inlineprotectedvirtual |
| threadedReadData() const | PIIODevice | inline |
| threadedReadEvent(uchar *readed, int size) | PIIODevice | |
| threadedWriteEvent(ullong id, int written_size) | PIIODevice | |
| tid() const | PIThread | inline |
| TTL | PIEthernet | |
| TTL() const | PIEthernet | inline |
| Type enum name | PIEthernet | |
| type() const | PIEthernet | inline |
| UDP enum value | PIEthernet | |
| unlock() | PIThread | inline |
| waitForFinish(int timeout_msecs) | PIThread | |
| waitForStart(int timeout_msecs) | PIThread | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
| write(const void *data, int max_size) | PIIODevice | inline |
| write(PIByteArray data) | PIIODevice | inline |
| writeDevice(const void *data, int max_size) | PIEthernet | protectedvirtual |
| WriteOnly enum value | PIIODevice | |
| writeThreaded(const void *data, int max_size) | PIIODevice | inline |
| writeThreaded(const PIByteArray &data) | PIIODevice | |
| writeTimeout | PIEthernet | |
| writeTimeout() const | PIEthernet | inline |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Ethernet device. - More...
-
-Classes | |
| class | Address |
| IPv4 network address, IP and port. More... | |
| struct | Interface |
| Network interface descriptor. More... | |
| class | InterfaceList |
| Array of Interface with some features. More... | |
-Public Types | |
| enum | Type { UDP, -TCP_Client, -TCP_Server, -TCP_SingleTCP - } |
| Type of PIEthernet. More... | |
| enum | Parameters { - ReuseAddress = 0x1, -Broadcast = 0x2, -SeparateSockets = 0x4, -MulticastLoop = 0x8, - - KeepConnection = 0x10, -DisonnectOnTimeout = 0x20 - - } |
| Parameters of PIEthernet. More... | |
| enum | InterfaceFlag { - ifActive = 0x1, -ifRunning = 0x2, -ifBroadcast = 0x4, -ifMulticast = 0x8, - - ifLoopback = 0x10, -ifPTP = 0x20 - - } |
| Flags of network interface. More... | |
| -typedef PIFlags< InterfaceFlag > | InterfaceFlags |
| PIFlags of network interface flags | |
Public Types inherited from PIIODevice | |
| enum | DeviceMode { ReadOnly = 0x01, -WriteOnly = 0x02, -ReadWrite = 0x03 - } |
| Open modes for PIIODevice. More... | |
| enum | DeviceOption { BlockingRead = 0x01, -BlockingWrite = 0x02 - } |
| Options for PIIODevice, works with some devices. More... | |
| enum | DeviceInfoFlag { Sequential = 0x01, -Reliable = 0x02 - } |
| Characteristics of PIIODevice subclass. More... | |
Public Types inherited from PIThread | |
| enum | Priority { - piLowerst, -piLow, -piNormal, -piHigh, - - piHighest - - } |
| Priority of thread. More... | |
-Public Member Functions | |
| - | PIEthernet () |
| Contructs UDP PIEthernet with empty read address. | |
| - | PIEthernet (Type type, const PIString &ip_port=PIString(), const PIFlags< Parameters > params=PIEthernet::ReuseAddress|PIEthernet::MulticastLoop|PIEthernet::KeepConnection) |
| Contructs PIEthernet with type "type", read address "ip_port" and parameters "params". | |
| -void | setReadAddress (const PIString &ip, int port) |
| Set read address. | |
| -void | setReadAddress (const PIString &ip_port) |
| Set read address in format "i.i.i.i:p". | |
| -void | setReadAddress (const Address &addr) |
| Set read address. | |
| -void | setReadIP (const PIString &ip) |
| Set read IP. | |
| -void | setReadPort (int port) |
| Set read port. | |
| -void | setSendAddress (const PIString &ip, int port) |
| Set send address. | |
| -void | setSendAddress (const PIString &ip_port) |
| Set send address in format "i.i.i.i:p". | |
| -void | setSendAddress (const Address &addr) |
| Set send address. | |
| -void | setSendIP (const PIString &ip) |
| Set send IP. | |
| -void | setSendPort (int port) |
| Set send port. | |
| -Address | readAddress () const |
| Returns read address in format "i.i.i.i:p". | |
| -PIString | readIP () const |
| Returns read IP. | |
| -int | readPort () const |
| Returns read port. | |
| -Address | sendAddress () const |
| Returns send address in format "i.i.i.i:p". | |
| -PIString | sendIP () const |
| Returns send IP. | |
| -int | sendPort () const |
| Returns send port. | |
| -Address | lastReadAddress () const |
| Returns address of last received UDP packet in format "i.i.i.i:p". | |
| -PIString | lastReadIP () const |
| Returns IP of last received UDP packet. | |
| -int | lastReadPort () const |
| Returns port of last received UDP packet. | |
| -void | setParameters (PIFlags< PIEthernet::Parameters > parameters_) |
| Set parameters to "parameters_". You should to reopen PIEthernet to apply them. | |
| -void | setParameter (PIEthernet::Parameters parameter, bool on=true) |
| Set parameter "parameter" to state "on". You should to reopen PIEthernet to apply this. | |
| -bool | isParameterSet (PIEthernet::Parameters parameter) const |
| Returns if parameter "parameter" is set. | |
| -PIFlags< PIEthernet::Parameters > | parameters () const |
| Returns parameters. | |
| -Type | type () const |
| Returns PIEthernet type. | |
| -double | readTimeout () const |
| Returns read timeout. | |
| -double | writeTimeout () const |
| Returns write timeout. | |
| -void | setReadTimeout (double ms) |
| Set timeout for read. | |
| -void | setWriteTimeout (double ms) |
| Set timeout for write. | |
| -int | TTL () const |
| Returns TTL (Time To Live) | |
| -int | multicastTTL () const |
| Returns multicast TTL (Time To Live) | |
| -void | setTTL (int ttl) |
| Set TTL (Time To Live), default is 64. | |
| -void | setMulticastTTL (int ttl) |
| Set multicast TTL (Time To Live), default is 1. | |
| -bool | joinMulticastGroup (const PIString &group) |
| Join to multicast group with address "group". Use only for UDP. | |
| -bool | leaveMulticastGroup (const PIString &group) |
| Leave multicast group with address "group". Use only for UDP. | |
| -const PIStringList & | multicastGroups () const |
| Returns joined multicast groups. Use only for UDP. | |
| -bool | connect () |
| Connect to TCP server with address readAddress(). Use only for TCP_Client. | |
| -bool | connect (const PIString &ip, int port) |
| Connect to TCP server with address "ip":"port". Use only for TCP_Client. | |
| -bool | connect (const PIString &ip_port) |
| Connect to TCP server with address "ip_port". Use only for TCP_Client. | |
| -bool | connect (const Address &addr) |
| Connect to TCP server with address "addr". Use only for TCP_Client. | |
| -bool | isConnected () const |
| Returns if PIEthernet connected to TCP server. Use only for TCP_Client. | |
| -bool | isConnecting () const |
| Returns if PIEthernet is connecting to TCP server. Use only for TCP_Client. | |
| -bool | listen (bool threaded=false) |
| Start listen for incoming TCP connections on address readAddress(). Use only for TCP_Server. | |
| -bool | listen (const PIString &ip, int port, bool threaded=false) |
| Start listen for incoming TCP connections on address "ip":"port". Use only for TCP_Server. | |
| -bool | listen (const PIString &ip_port, bool threaded=false) |
| Start listen for incoming TCP connections on address "ip_port". Use only for TCP_Server. | |
| -bool | listen (const Address &addr, bool threaded=false) |
| Start listen for incoming TCP connections on address "addr". Use only for TCP_Server. | |
| -bool | send (const void *data, int size, bool threaded=false) |
| Send data "data" with size "size" to address sendAddress() for UDP or readAddress() for TCP_Client. | |
| -bool | send (const PIString &ip, int port, const void *data, int size, bool threaded=false) |
| Send data "data" with size "size" to address "ip":"port". | |
| -bool | send (const PIString &ip_port, const void *data, int size, bool threaded=false) |
| Send data "data" with size "size" to address "ip_port". | |
| -bool | send (const Address &addr, const void *data, int size, bool threaded=false) |
| Send data "data" with size "size" to address "addr". | |
| -bool | send (const PIByteArray &data, bool threaded=false) |
| Send data "data" to address sendAddress() for UDP or readAddress() for TCP_Client. | |
| -bool | send (const PIString &ip, int port, const PIByteArray &data, bool threaded=false) |
| Send data "data" to address "ip":"port" for UDP. | |
| -bool | send (const PIString &ip_port, const PIByteArray &data, bool threaded=false) |
| Send data "data" to address "ip_port" for UDP. | |
| -bool | send (const Address &addr, const PIByteArray &data, bool threaded=false) |
| Send data "data" to address "addr" for UDP. | |
| -virtual bool | canWrite () const |
| Return true if device can write now. | |
Public Member Functions inherited from PIIODevice | |
| - | PIIODevice () |
| Constructs a empty PIIODevice. | |
| PIIODevice (const PIString &path, DeviceMode mode=ReadWrite) | |
| Constructs a PIIODevice with path and mode. More... | |
| -DeviceMode | mode () const |
| Current open mode of device. | |
| -void | setMode (DeviceMode m) |
| Set open mode of device. | |
| -DeviceOptions | options () const |
| Current device options. | |
| -bool | isOptionSet (DeviceOption o) const |
| Current device option "o" state. | |
| -void | setOptions (DeviceOptions o) |
| Set device options. | |
| -bool | setOption (DeviceOption o, bool yes=true) |
| Set device option "o" to "yes" and return previous state. | |
| -DeviceInfoFlags | infoFlags () const |
| Returns device characteristic flags. | |
| -PIString | path () const |
| Current path of device. | |
| -void | setPath (const PIString &path) |
| Set path of device. | |
| -bool | isReadable () const |
| Return true if mode is ReadOnly or ReadWrite. | |
| -bool | isWriteable () const |
| Return true if mode is WriteOnly or ReadWrite. | |
| -bool | isOpened () const |
| Return true if device is successfully opened. | |
| -bool | isClosed () const |
| Return true if device is closed. | |
| -virtual bool | canRead () const |
| Return true if device can read now. | |
| -void | setReopenEnabled (bool yes=true) |
| Set execution of open enabled while threaded read on closed device. | |
| -void | setReopenTimeout (int msecs) |
| Set timeout in milliseconds between open tryings if reopen is enabled. | |
| -bool | isReopenEnabled () const |
| Return reopen enable. | |
| -int | reopenTimeout () |
| Return reopen timeout. | |
| void | setThreadedReadSlot (ReadRetFunc func) |
| Set "threaded read slot". More... | |
| -void | setThreadedReadData (void *d) |
| Set custom data that will be passed to "threaded read slot". | |
| void | setThreadedReadBufferSize (int new_size) |
| Set size of threaded read buffer. More... | |
| -int | threadedReadBufferSize () const |
| Return size of threaded read buffer. | |
| -const uchar * | threadedReadBuffer () const |
| Return content of threaded read buffer. | |
| -void * | threadedReadData () const |
| Return custom data that will be passed to "threaded read slot". | |
| -bool | isThreadedRead () const |
| Return true if threaded read is started. | |
| -void | startThreadedRead () |
| Start threaded read. | |
| -void | startThreadedRead (ReadRetFunc func) |
| Start threaded read and assign "threaded read slot" to "func". | |
| -void | stopThreadedRead () |
| Stop threaded read. | |
| -bool | isThreadedWrite () const |
| Return true if threaded write is started. | |
| -void | startThreadedWrite () |
| Start threaded write. | |
| -void | stopThreadedWrite () |
| Stop threaded write. | |
| -void | clearThreadedWriteQueue () |
| Clear threaded write task queue. | |
| -void | start () |
| Start both threaded read and threaded write. | |
| -void | stop (bool wait=false) |
| Stop both threaded read and threaded write and if "wait" block until both threads are stop. | |
| -int | read (void *read_to, int max_size) |
| Read from device maximum "max_size" bytes to "read_to". | |
| -PIByteArray | read (int max_size) |
| Read from device maximum "max_size" bytes and return them as PIByteArray. | |
| -int | write (const void *data, int max_size) |
| Write maximum "max_size" bytes of "data" to device. | |
| -PIByteArray | readForTime (double timeout_ms) |
| Read from device for "timeout_ms" milliseconds and return readed data as PIByteArray. Timeout should to be greater than 0. | |
| -ullong | writeThreaded (const void *data, int max_size) |
| Add task to threaded write queue and return task ID. | |
| -ullong | writeThreaded (const PIByteArray &data) |
| Add task to threaded write queue and return task ID. | |
| -bool | configure (const PIString &config_file, const PIString §ion, bool parent_section=false) |
| Configure device from section "section" of file "config_file", if "parent_section" parent section also will be read. | |
| -PIString | constructFullPath () const |
| Reimplement to construct full unambiguous string, describes this device, default returns fullPathPrefix() + "://" + path() | |
| -void | configureFromFullPath (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -bool | open () |
| Open device. | |
| -bool | open (const PIString &_path) |
| Open device with path "path". | |
| -bool | close () |
| Close device. | |
| -int | write (PIByteArray data) |
| Write "data" to device. | |
| -virtual void | flush () |
| Immediate write all buffers. | |
| -void | opened () |
| Raise if succesfull open. | |
| -void | closed () |
| Raise if succesfull close. | |
| -void | threadedReadEvent (uchar *readed, int size) |
| Raise if read thread succesfull read some data. | |
| -void | threadedWriteEvent (ullong id, int written_size) |
| Raise if write thread successfull write some data of task with ID "id". | |
Public Member Functions inherited from PIThread | |
| - | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| - | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| -void | setData (void *d) |
| Set common data passed to external function. | |
| -void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| -void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| -void * | data () const |
| Returns common data passed to external function. | |
| -PIThread::Priority | priority () const |
| Return priority of thread. | |
| -bool | isRunning () const |
Return true if thread is running. | |
| -void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| -PIMutex & | mutex () |
| Returns internal mutex. | |
| -llong | tid () const |
| Returns thread ID. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| -void | lock () |
| Lock internal mutex. | |
| -void | unlock () |
| Unlock internal mutex. | |
| -void | started () |
| Raise on thread start. | |
| -void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Static Public Member Functions | |
| -static InterfaceList | interfaces () |
| Returns all system network interfaces. | |
| -static PIVector< PIEthernet::Address > | allAddresses () |
| Returns all system network IP addresses. | |
Static Public Member Functions inherited from PIIODevice | |
| static PIIODevice * | createFromFullPath (const PIString &full_path) |
| Try to determine suitable device, create new one, configure it with configureFromFullPath() and returns it. More... | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
-Protected Member Functions | |
| -void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| -PIString | fullPathPrefix () const |
| Reimplement to construct full unambiguous string prefix. Creating devices by unambiguous string. | |
| -PIString | constructFullPathDevice () const |
| Reimplement to construct full unambiguous string, describes this device. Default implementation returns path() | |
| -void | configureFromFullPathDevice (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -bool | configureDevice (const void *e_main, const void *e_parent=0) |
| Reimplement to configure device from entries "e_main" and "e_parent", cast arguments to PIConfig::Entry*. | |
| -int | readDevice (void *read_to, int max_size) |
| Reimplement this function to read from your device. | |
| -int | writeDevice (const void *data, int max_size) |
| Reimplement this function to write to your device. | |
| -DeviceInfoFlags | deviceInfoFlags () const |
| Reimplement to return correct DeviceInfoFlags. Default implementation returns 0. | |
| -virtual void | received (const void *data, int size) |
| Executes when any read function was successful. Default implementation does nothing. | |
| -bool | init () |
| Function executed before first openDevice() or from constructor. | |
| -bool | openDevice () |
| Reimplement to open device, return value will be set to "opened_" variable; don't call this function in subclass, use open() | |
| -bool | closeDevice () |
| Reimplement to close device, inverse return value will be set to "opened_" variable. | |
Protected Member Functions inherited from PIIODevice | |
| -virtual bool | threadedRead (uchar *readed, int size) |
| Function executed when thread read some data, default implementation execute external slot "ret_func_". | |
| -virtual void | optionsChanged () |
| Reimplement to apply new device options. | |
| -virtual void | threadedReadBufferSizeChanged () |
| Reimplement to apply new threadedReadBufferSize() | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| void | deleted () |
| Raise before object delete. More... | |
-Events | |
| -void | newConnection (PIEthernet *client) |
| Raise on new TCP connection received. | |
| -void | connected () |
| Raise if succesfull TCP connection. | |
| -void | disconnected (bool withError) |
| Raise if TCP connection was closed. | |
-Configurable parameters | |
| -string | ip |
| read ip, default "" | |
| -int | port |
| read port, default 0 | |
| -int | parameters |
| ethernet parameters | |
| -double | readTimeout |
| read timeout, default 1000 ms | |
| -double | writeTimeout |
| write timeout, default 1000 ms | |
| -int | TTL |
| time-to-live, default 64 | |
| -int | multicastTTL |
| time-to-live for multicast, default 1 | |
-Additional Inherited Members | |
Public Attributes inherited from PIIODevice | |
| -bool | reopenEnabled |
| setReopenEnabled, default "true" | |
| -int | reopenTimeout |
| setReopenTimeout in ms, default 1000 | |
| -int | threadedReadBufferSize |
| setThreadedReadBufferSize in bytes, default 4096 | |
Related Functions inherited from PIIODevice | |
| template<typename T > | |
| T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) |
| Service function. useful for configuring devices. More... | |
| -#define | REGISTER_DEVICE(class) |
| Use this macro to enable automatic creation instances of your class with createFromFullPath() function. | |
| -#define | PIIODEVICE(class) |
| Use this macro instead of PIOBJECT when describe your own PIIODevice. | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Ethernet device.
-PIEthernet designed to work with IPv4 network via two protocols: UDP and TCP. This class allow you send and receive packets to/from another computer through network. Also it supports broadcast and multicast extensions.
-User Datagram Protocol
-Transmission Control Protocol
-| enum PIEthernet::Type | -
| enum PIEthernet::Parameters | -
Parameters of PIEthernet.
-| enum PIEthernet::InterfaceFlag | -
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIEthernet::Address, including all inherited members.
-| Address(uint ip=0, ushort port=0) | PIEthernet::Address | |
| Address(const PIString &ip_port) | PIEthernet::Address | |
| Address(const PIString &ip, ushort port) | PIEthernet::Address | |
| clear() | PIEthernet::Address | |
| ip() const | PIEthernet::Address | inline |
| ipString() const | PIEthernet::Address | |
| isNull() const | PIEthernet::Address | |
| port() const | PIEthernet::Address | inline |
| resolve(const PIString &host_port) | PIEthernet::Address | static |
| resolve(const PIString &host, ushort port) | PIEthernet::Address | static |
| set(const PIString &ip_port) | PIEthernet::Address | |
| set(const PIString &ip, ushort port) | PIEthernet::Address | |
| set(uint ip, ushort port) | PIEthernet::Address | |
| setIP(uint ip) | PIEthernet::Address | |
| setIP(const PIString &ip) | PIEthernet::Address | |
| setPort(ushort port) | PIEthernet::Address | |
| toString() const | PIEthernet::Address |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
IPv4 network address, IP and port. - More...
--Public Member Functions | |
| - | Address (uint ip=0, ushort port=0) |
| Contructs Address with binary representation of IP and port. | |
| - | Address (const PIString &ip_port) |
| Contructs Address with string representation "i.i.i.i:p". | |
| - | Address (const PIString &ip, ushort port) |
| Contructs Address with IP string representation "i.i.i.i" and port. | |
| -uint | ip () const |
| Returns binary IP. | |
| -ushort | port () const |
| Returns port. | |
| -PIString | ipString () const |
| Returns string IP. | |
| -PIString | toString () const |
| Returns string representation of IP and port "i.i.i.i:p". | |
| -void | setIP (uint ip) |
| Set address IP. | |
| -void | setIP (const PIString &ip) |
| Set address IP. | |
| -void | setPort (ushort port) |
| Set address port. | |
| -void | set (const PIString &ip_port) |
| Set address IP and port, "i.i.i.i:p". | |
| -void | set (const PIString &ip, ushort port) |
| Set address IP and port, "i.i.i.i". | |
| -void | set (uint ip, ushort port) |
| Set address binary IP and port. | |
| -void | clear () |
| Set IP and port to 0. | |
| -bool | isNull () const |
| Returns if IP and port is 0. | |
-Static Public Member Functions | |
| -static Address | resolve (const PIString &host_port) |
| Resolve hostname "host:port" and return it address or null address on error. | |
| -static Address | resolve (const PIString &host, ushort port) |
| Resolve hostname "host" with port "port" and return it address or null address on error. | |
IPv4 network address, IP and port.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIEthernet::InterfaceList, including all inherited members.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Array of Interface with some features. - More...
-
-Public Member Functions | |
| -const Interface * | getByIndex (int index) const |
| Get interface with system index "index" or 0 if there is no one. | |
| -const Interface * | getByName (const PIString &name) const |
| Get interface with system name "name" or 0 if there is no one. | |
| -const Interface * | getByAddress (const PIString &address) const |
| Get interface with IP address "address" or 0 if there is no one. | |
| -const Interface * | getLoopback () const |
| Get loopback interface or 0 if there is no one. | |
Public Member Functions inherited from PIVector< PIEthernet::Interface > | |
| PIVector () | |
| -size_t | size () const |
| Elements count. | |
| -ssize_t | size_s () const |
| Elements count. | |
| -bool | isEmpty () const |
Return "true" if vector is empty, i.e. size = 0. | |
| -PIEthernet::Interface & | back () |
| Last element of the vector. | |
| -const PIEthernet::Interface & | back () const |
| Last element of the vector. | |
| -PIEthernet::Interface & | front () |
| First element of the vector. | |
| -const PIEthernet::Interface & | front () const |
| First element of the vector. | |
| -bool | operator== (const PIVector< PIEthernet::Interface > &t) const |
| Compare with vector "t". | |
| -bool | operator!= (const PIVector< PIEthernet::Interface > &t) const |
| Compare with vector "t". | |
| -bool | contains (const PIEthernet::Interface &v) const |
Return "true" if vector has at least one element equal "t". | |
| -int | etries (const PIEthernet::Interface &v) const |
| Return how many times element "t" appears in vector. | |
| -PIVector< PIEthernet::Interface > & | clear () |
Clear vector. Equivalent to call "resize(0)" | |
| PIVector< PIEthernet::Interface > & | fill (const PIEthernet::Interface &f=PIEthernet::Interface()) |
| Fill vector with elements "t" leave size is unchanged and return reference to vector. More... | |
| PIVector< PIEthernet::Interface > & | resize (size_t new_size, const PIEthernet::Interface &f=PIEthernet::Interface()) |
| Resize vector to size "size". More... | |
| PIVector< PIEthernet::Interface > & | remove (size_t index, size_t count=1) |
| Remove one element by index "index" and return reference to vector. More... | |
| PIVector< PIEthernet::Interface > & | sort (CompareFunc compare=compare_func) |
| Sort vector using quick sort algorithm and standard compare function. More... | |
| -PIVector< PIEthernet::Interface > & | enlarge (llong piv_size) |
| Increase vector size with "size" elements. | |
| PIVector< PIEthernet::Interface > & | removeOne (const PIEthernet::Interface &v) |
| Remove no more than one element equal "v" and return reference to vector. More... | |
| PIVector< PIEthernet::Interface > & | removeAll (const PIEthernet::Interface &v) |
| Remove all elements equal "v" and return reference to vector. More... | |
| -PIVector< PIEthernet::Interface > & | push_back (const PIEthernet::Interface &v) |
| Add new element "t" at the end of vector and return reference to vector. | |
| -PIVector< PIEthernet::Interface > & | operator<< (const PIVector< PIEthernet::Interface > &other) |
| Add vector "t" at the end of vector and return reference to vector. | |
| -PIVector< PIEthernet::Interface > & | push_front (const PIEthernet::Interface &v) |
| Add new element "t" at the beginning of vector and return reference to vector. | |
| -PIVector< PIEthernet::Interface > & | pop_back () |
| Remove one element from the end of vector and return reference to vector. | |
| -PIVector< PIEthernet::Interface > & | pop_front () |
| Remove one element from the beginning of vector and return reference to vector. | |
| -PIEthernet::Interface | take_back () |
| Remove one element from the end of vector and return it. | |
| -PIEthernet::Interface | take_front () |
| Remove one element from the beginning of vector and return it. | |
-Additional Inherited Members | |
Static Public Member Functions inherited from PIVector< PIEthernet::Interface > | |
| -static int | compare_func (const PIEthernet::Interface *t0, const PIEthernet::Interface *t1) |
| Standard compare function for type "Type". Return 0 if t0 = t1, -1 if t0 < t1 and 1 if t0 > t1. | |
Array of Interface with some features.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIEvaluator, including all inherited members.
-| check(const PIString &string) | PIEvaluator | |
| clearCustomVariables() | PIEvaluator | inline |
| data() | PIEvaluator | inline |
| error() const | PIEvaluator | inline |
| evaluate() | PIEvaluator | |
| expression() const | PIEvaluator | inline |
| isCorrect() const | PIEvaluator | inline |
| lastResult() const | PIEvaluator | inline |
| PIEvaluator() | PIEvaluator | inline |
| removeVariable(const PIString &name) | PIEvaluator | inline |
| setData(void *_data) | PIEvaluator | inline |
| setVariable(const PIString &name, complexd value=0.) | PIEvaluator | inline |
| setVariable(int index, complexd value=0.) | PIEvaluator | inline |
| unknownVariables() const | PIEvaluator | inline |
| variableIndex(const PIString &name) const | PIEvaluator | inline |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This class provide mathematical evaluations of custom expression. - More...
--Public Member Functions | |
| - | PIEvaluator () |
| Constructs an empty evaluator. | |
| -void * | data () |
| Returns custom data. | |
| -void | setData (void *_data) |
| Set custom data to "_data". | |
| -bool | check (const PIString &string) |
| Check mathematical expression and parse it to list of instructions. | |
| -bool | isCorrect () const |
| Returns true if expression was checked succesfully. | |
| -int | setVariable (const PIString &name, complexd value=0.) |
| Set variable value with name "name" to value "value". Add variable if it doesn`t exists. | |
| -void | setVariable (int index, complexd value=0.) |
Set variable value with index "index" to value "value". Dont add variable if it doesnt exists. | |
| -complexd | evaluate () |
| Evaluate last successfully checked with function check() expression and returns result. | |
| -void | removeVariable (const PIString &name) |
| Remove variable with name "name". | |
| -void | clearCustomVariables () |
| Remove all manually added variables. | |
| -int | variableIndex (const PIString &name) const |
| Returns index of variable with name "name". | |
| -const PIStringList & | unknownVariables () const |
| Returns all unknown variables founded in last expression passed to check() function. | |
| -const PIString & | expression () const |
| Returns processed last expression passed to check() function. | |
| -const PIString & | error () const |
| Returns last error description occured in check() function. | |
| -const complexd & | lastResult () const |
| Returns last result of evaluate() | |
This class provide mathematical evaluations of custom expression.
-PIEvaluator developed for stream evaluations of once set expression. It`s create internal list of instructions on function check() and executes very fast on function evaluate(). Once given expression can be evaluated any times with different variable values. Evaluator supports many common mathematic functions described below. Also it`s automatic puts unnecessarily signs and bracets. Processed expression can be obtains with function expression(). If there is an error in expression you can get it with function error(). Last evaluated result you can get with function lastResult().
-First you should set your variables with function setVariable(). Next give your expression with function check() and check for error with functions isCorrect() and error(). If expression is correct you can get processed expression with function expression() and evaluate it with function evaluate(). You can change variable values without rechecking expression.
-PIEvaluator supports arithmetical operations with complex numbers, this is their list in priority order:
In addition there are compare and logical operations:
Compare and logical functions works with real operators part and returns 0 or 1.
-Mathematical functions:
There are some built-in constans:
All trigonometric functions takes angle in radians.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIFile, including all inherited members.
-| applyFileInfo(const PIString &path, const FileInfo &info) | PIFile | static |
| applyFileInfo(const FileInfo &info) | PIFile | inlinestatic |
| BlockingRead enum value | PIIODevice | |
| BlockingWrite enum value | PIIODevice | |
| canRead() const | PIIODevice | inlinevirtual |
| canWrite() const | PIIODevice | inlinevirtual |
| className() const | PIObject | inlinevirtual |
| clear() | PIFile | |
| clearThreadedWriteQueue() | PIIODevice | inline |
| close() | PIIODevice | inline |
| closed() | PIIODevice | |
| closeDevice() | PIFile | protectedvirtual |
| configure(const PIString &config_file, const PIString §ion, bool parent_section=false) | PIIODevice | |
| configureDevice(const void *e_main, const void *e_parent=0) | PIIODevice | inlineprotectedvirtual |
| configureFromFullPath(const PIString &full_path) | PIIODevice | |
| configureFromFullPathDevice(const PIString &full_path) | PIFile | protectedvirtual |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| CONNECTU_QUEUED | PIObject | related |
| constructFullPath() const | PIIODevice | |
| constructFullPathDevice() const | PIFile | protectedvirtual |
| createFromFullPath(const PIString &full_path) | PIIODevice | static |
| data() const | PIThread | inline |
| debug() const | PIObject | inline |
| deleted() | PIObject | protected |
| DeviceInfoFlag enum name | PIIODevice | |
| deviceInfoFlags() const | PIFile | inlineprotectedvirtual |
| DeviceMode enum name | PIIODevice | |
| DeviceOption enum name | PIIODevice | |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| fileInfo() const | PIFile | inline |
| fileInfo(const PIString &path) | PIFile | static |
| findByName(const PIString &name) | PIObject | inlinestatic |
| flush() | PIFile | virtual |
| fullPathPrefix() const | PIFile | inlineprotectedvirtual |
| HANDLER | PIObject | related |
| infoFlags() const | PIIODevice | inline |
| init() | PIIODevice | inlineprotectedvirtual |
| isClosed() const | PIIODevice | inline |
| isEmpty() const | PIFile | inline |
| isEnd() const | PIFile | |
| isExists(const PIString &path) | PIFile | static |
| isOpened() const | PIIODevice | inline |
| isOptionSet(DeviceOption o) const | PIIODevice | inline |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isReadable() const | PIIODevice | inline |
| isReopenEnabled() const | PIIODevice | inline |
| isRunning() const | PIThread | inline |
| isThreadedRead() const | PIIODevice | inline |
| isThreadedWrite() const | PIIODevice | inline |
| isWriteable() const | PIIODevice | inline |
| lock() | PIThread | inline |
| mode() const | PIIODevice | inline |
| mutex() | PIThread | inline |
| name() const | PIObject | inline |
| needLockRun(bool need) | PIThread | inline |
| open() | PIIODevice | inline |
| open(const PIString &_path) | PIIODevice | inline |
| openDevice() | PIFile | protectedvirtual |
| opened() | PIIODevice | |
| openTemporary(PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) | PIFile | |
| operator<<(const char v) | PIFile | |
| operator<<(const PIString &v) | PIFile | |
| operator<<(const PIByteArray &v) | PIFile | |
| operator<<(short v) | PIFile | |
| operator<<(int v) | PIFile | |
| operator<<(long v) | PIFile | |
| operator<<(llong v) | PIFile | |
| operator<<(uchar v) | PIFile | |
| operator<<(ushort v) | PIFile | |
| operator<<(uint v) | PIFile | |
| operator<<(ulong v) | PIFile | |
| operator<<(ullong v) | PIFile | |
| operator<<(float v) | PIFile | |
| operator<<(double v) | PIFile | |
| operator>>(char &v) | PIFile | |
| operator>>(short &v) | PIFile | |
| operator>>(int &v) | PIFile | |
| operator>>(long &v) | PIFile | |
| operator>>(llong &v) | PIFile | |
| operator>>(uchar &v) | PIFile | |
| operator>>(ushort &v) | PIFile | |
| operator>>(uint &v) | PIFile | |
| operator>>(ulong &v) | PIFile | |
| operator>>(ullong &v) | PIFile | |
| operator>>(float &v) | PIFile | |
| operator>>(double &v) | PIFile | |
| options() const | PIIODevice | inline |
| optionsChanged() | PIIODevice | inlineprotectedvirtual |
| parentClassName() const | PIObject | inlinevirtual |
| path() const | PIIODevice | inline |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| PIFile() | PIFile | explicit |
| PIFile(const PIString &path, DeviceMode mode=ReadWrite) | PIFile | explicit |
| piHigh enum value | PIThread | |
| piHighest enum value | PIThread | |
| PIIODEVICE | PIIODevice | related |
| PIIODevice() | PIIODevice | explicit |
| PIIODevice(const PIString &path, DeviceMode mode=ReadWrite) | PIIODevice | explicit |
| piLow enum value | PIThread | |
| piLowerst enum value | PIThread | |
| piNormal enum value | PIThread | |
| PIObject(const PIString &name=PIString()) | PIObject | explicit |
| PIOBJECT | PIObject | related |
| PIOBJECT_SUBCLASS | PIObject | related |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | |
| pos() const | PIFile | |
| precision() const | PIFile | inline |
| priority() const | PIThread | inline |
| Priority enum name | PIThread | |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| read(void *read_to, int max_size) | PIIODevice | inline |
| read(int max_size) | PIIODevice | inline |
| readAll(void *data) | PIFile | |
| readAll(bool forceRead=false) | PIFile | |
| readChar() | PIFile | |
| readDevice(void *read_to, int max_size) | PIFile | protectedvirtual |
| readDeviceSetting(const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) | PIIODevice | related |
| readForTime(double timeout_ms) | PIIODevice | |
| readLine() | PIFile | |
| ReadOnly enum value | PIIODevice | |
| ReadWrite enum value | PIIODevice | |
| REGISTER_DEVICE | PIIODevice | related |
| Reliable enum value | PIIODevice | |
| remove() | PIFile | |
| remove(const PIString &path) | PIFile | static |
| rename(const PIString &from, const PIString &to) | PIFile | static |
| reopenEnabled | PIIODevice | |
| reopenTimeout | PIIODevice | |
| reopenTimeout() | PIIODevice | inline |
| resize(llong new_size) | PIFile | inline |
| resize(llong new_size, uchar fill) | PIFile | |
| seek(llong position) | PIFile | |
| seekToBegin() | PIFile | |
| seekToEnd() | PIFile | |
| seekToLine(llong line) | PIFile | |
| Sequential enum value | PIIODevice | |
| setData(void *d) | PIThread | inline |
| setDebug(bool debug) | PIObject | inline |
| setMode(DeviceMode m) | PIIODevice | inline |
| setName(const PIString &name) | PIObject | inline |
| setOption(DeviceOption o, bool yes=true) | PIIODevice | |
| setOptions(DeviceOptions o) | PIIODevice | |
| setPath(const PIString &path) | PIFile | |
| setPrecision(int prec) | PIFile | |
| setPriority(PIThread::Priority prior) | PIThread | |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setReopenEnabled(bool yes=true) | PIIODevice | inline |
| setReopenTimeout(int msecs) | PIIODevice | inline |
| setSlot(ThreadFunc func) | PIThread | inline |
| setThreadedReadBufferSize(int new_size) | PIIODevice | inline |
| setThreadedReadData(void *d) | PIIODevice | inline |
| setThreadedReadSlot(ReadRetFunc func) | PIIODevice | inline |
| size() const | PIFile | |
| start() | PIIODevice | inline |
| PIThread::start(int timer_delay) | PIThread | |
| started() | PIThread | |
| startOnce() | PIThread | |
| startOnce(ThreadFunc func) | PIThread | inline |
| startThreadedRead() | PIIODevice | inline |
| startThreadedRead(ReadRetFunc func) | PIIODevice | inline |
| startThreadedWrite() | PIIODevice | inline |
| stop(bool wait=false) | PIIODevice | inline |
| stopped() | PIThread | |
| stopThreadedRead() | PIIODevice | inline |
| stopThreadedWrite() | PIIODevice | inline |
| threadedRead(uchar *readed, int size) | PIIODevice | protectedvirtual |
| threadedReadBuffer() const | PIIODevice | inline |
| threadedReadBufferSize | PIIODevice | |
| threadedReadBufferSize() const | PIIODevice | inline |
| threadedReadBufferSizeChanged() | PIIODevice | inlineprotectedvirtual |
| threadedReadData() const | PIIODevice | inline |
| threadedReadEvent(uchar *readed, int size) | PIIODevice | |
| threadedWriteEvent(ullong id, int written_size) | PIIODevice | |
| tid() const | PIThread | inline |
| unlock() | PIThread | inline |
| waitForFinish(int timeout_msecs) | PIThread | |
| waitForStart(int timeout_msecs) | PIThread | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
| write(const void *data, int max_size) | PIIODevice | inline |
| write(PIByteArray data) | PIIODevice | inline |
| writeBinary(const char v) | PIFile | inline |
| writeBinary(const short v) | PIFile | inline |
| writeBinary(const int v) | PIFile | inline |
| writeBinary(const long v) | PIFile | inline |
| writeBinary(const llong v) | PIFile | inline |
| writeBinary(const uchar v) | PIFile | inline |
| writeBinary(const ushort v) | PIFile | inline |
| writeBinary(const uint v) | PIFile | inline |
| writeBinary(const ulong v) | PIFile | inline |
| writeBinary(const ullong v) | PIFile | inline |
| writeBinary(const float v) | PIFile | inline |
| writeBinary(const double v) | PIFile | inline |
| writeDevice(const void *data, int max_size) | PIFile | protectedvirtual |
| WriteOnly enum value | PIIODevice | |
| writeThreaded(const void *data, int max_size) | PIIODevice | inline |
| writeThreaded(const PIByteArray &data) | PIIODevice |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Local file. - More...
-
-Public Member Functions | |
| - | PIFile () |
| Constructs an empty file. | |
| - | PIFile (const PIString &path, DeviceMode mode=ReadWrite) |
| Constructs a file with path "path" and open mode "mode". | |
| -bool | openTemporary (PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) |
| Open temporary file with open mode "mode". | |
| -void | flush () |
| Immediate write all buffered data to disk. | |
| -void | seek (llong position) |
| Move read/write position to "position". | |
| -void | seekToBegin () |
| Move read/write position to the begin of the file. | |
| -void | seekToEnd () |
| Move read/write position to the end of the file. | |
| -void | seekToLine (llong line) |
| Move read/write position to text line number "line". | |
| -char | readChar () |
| Read one char and return it. | |
| -PIString | readLine () |
| Read one text line and return it. | |
| -llong | readAll (void *data) |
| Read all file content to "data" and return readed bytes count. Position leaved unchanged. | |
| -PIByteArray | readAll (bool forceRead=false) |
| Read all file content to byte array and return it. Position leaved unchanged. | |
| -void | setPath (const PIString &path) |
| Set file path to "path" and reopen file if need. | |
| -llong | size () const |
| Returns file size. | |
| -llong | pos () const |
| Returns read/write position. | |
| -bool | isEnd () const |
| Returns if position is at the end of file. | |
| -bool | isEmpty () const |
| Returns if file is empty. | |
| -FileInfo | fileInfo () const |
| Returns FileInfo of current file. | |
| -int | precision () const |
| Returns float numbers write precision. | |
| -void | setPrecision (int prec) |
| Set float numbers write precision to "prec_" digits. | |
| -PIFile & | writeBinary (const char v) |
| Write to file binary content of "v". | |
| -PIFile & | writeBinary (const short v) |
| Write to file binary content of "v". | |
| -PIFile & | writeBinary (const int v) |
| Write to file binary content of "v". | |
| -PIFile & | writeBinary (const long v) |
| Write to file binary content of "v". | |
| -PIFile & | writeBinary (const llong v) |
| Write to file binary content of "v". | |
| -PIFile & | writeBinary (const uchar v) |
| Write to file binary content of "v". | |
| -PIFile & | writeBinary (const ushort v) |
| Write to file binary content of "v". | |
| -PIFile & | writeBinary (const uint v) |
| Write to file binary content of "v". | |
| -PIFile & | writeBinary (const ulong v) |
| Write to file binary content of "v". | |
| -PIFile & | writeBinary (const ullong v) |
| Write to file binary content of "v". | |
| -PIFile & | writeBinary (const float v) |
| Write to file binary content of "v". | |
| -PIFile & | writeBinary (const double v) |
| Write to file binary content of "v". | |
| -PIFile & | operator<< (const char v) |
| Write to file text representation of "v". | |
| -PIFile & | operator<< (const PIString &v) |
| Write to file string "v". | |
| -PIFile & | operator<< (const PIByteArray &v) |
| Write to file text representation of "v". | |
| -PIFile & | operator<< (short v) |
| Write to file text representation of "v". | |
| -PIFile & | operator<< (int v) |
| Write to file text representation of "v". | |
| -PIFile & | operator<< (long v) |
| Write to file text representation of "v". | |
| -PIFile & | operator<< (llong v) |
| Write to file text representation of "v". | |
| -PIFile & | operator<< (uchar v) |
| Write to file text representation of "v". | |
| -PIFile & | operator<< (ushort v) |
| Write to file text representation of "v". | |
| -PIFile & | operator<< (uint v) |
| Write to file text representation of "v". | |
| -PIFile & | operator<< (ulong v) |
| Write to file text representation of "v". | |
| -PIFile & | operator<< (ullong v) |
| Write to file text representation of "v". | |
| -PIFile & | operator<< (float v) |
| Write to file text representation of "v" with precision precision() | |
| -PIFile & | operator<< (double v) |
| Write to file text representation of "v" with precision precision() | |
| -PIFile & | operator>> (char &v) |
| Read from file text representation of "v". | |
| -PIFile & | operator>> (short &v) |
| Read from file text representation of "v". | |
| -PIFile & | operator>> (int &v) |
| Read from file text representation of "v". | |
| -PIFile & | operator>> (long &v) |
| Read from file text representation of "v". | |
| -PIFile & | operator>> (llong &v) |
| Read from file text representation of "v". | |
| -PIFile & | operator>> (uchar &v) |
| Read from file text representation of "v". | |
| -PIFile & | operator>> (ushort &v) |
| Read from file text representation of "v". | |
| -PIFile & | operator>> (uint &v) |
| Read from file text representation of "v". | |
| -PIFile & | operator>> (ulong &v) |
| Read from file text representation of "v". | |
| -PIFile & | operator>> (ullong &v) |
| Read from file text representation of "v". | |
| -PIFile & | operator>> (float &v) |
| Read from file text representation of "v". | |
| -PIFile & | operator>> (double &v) |
| Read from file text representation of "v". | |
Public Member Functions inherited from PIIODevice | |
| - | PIIODevice () |
| Constructs a empty PIIODevice. | |
| PIIODevice (const PIString &path, DeviceMode mode=ReadWrite) | |
| Constructs a PIIODevice with path and mode. More... | |
| -DeviceMode | mode () const |
| Current open mode of device. | |
| -void | setMode (DeviceMode m) |
| Set open mode of device. | |
| -DeviceOptions | options () const |
| Current device options. | |
| -bool | isOptionSet (DeviceOption o) const |
| Current device option "o" state. | |
| -void | setOptions (DeviceOptions o) |
| Set device options. | |
| -bool | setOption (DeviceOption o, bool yes=true) |
| Set device option "o" to "yes" and return previous state. | |
| -DeviceInfoFlags | infoFlags () const |
| Returns device characteristic flags. | |
| -PIString | path () const |
| Current path of device. | |
| -void | setPath (const PIString &path) |
| Set path of device. | |
| -bool | isReadable () const |
| Return true if mode is ReadOnly or ReadWrite. | |
| -bool | isWriteable () const |
| Return true if mode is WriteOnly or ReadWrite. | |
| -bool | isOpened () const |
| Return true if device is successfully opened. | |
| -bool | isClosed () const |
| Return true if device is closed. | |
| -virtual bool | canRead () const |
| Return true if device can read now. | |
| -virtual bool | canWrite () const |
| Return true if device can write now. | |
| -void | setReopenEnabled (bool yes=true) |
| Set execution of open enabled while threaded read on closed device. | |
| -void | setReopenTimeout (int msecs) |
| Set timeout in milliseconds between open tryings if reopen is enabled. | |
| -bool | isReopenEnabled () const |
| Return reopen enable. | |
| -int | reopenTimeout () |
| Return reopen timeout. | |
| void | setThreadedReadSlot (ReadRetFunc func) |
| Set "threaded read slot". More... | |
| -void | setThreadedReadData (void *d) |
| Set custom data that will be passed to "threaded read slot". | |
| void | setThreadedReadBufferSize (int new_size) |
| Set size of threaded read buffer. More... | |
| -int | threadedReadBufferSize () const |
| Return size of threaded read buffer. | |
| -const uchar * | threadedReadBuffer () const |
| Return content of threaded read buffer. | |
| -void * | threadedReadData () const |
| Return custom data that will be passed to "threaded read slot". | |
| -bool | isThreadedRead () const |
| Return true if threaded read is started. | |
| -void | startThreadedRead () |
| Start threaded read. | |
| -void | startThreadedRead (ReadRetFunc func) |
| Start threaded read and assign "threaded read slot" to "func". | |
| -void | stopThreadedRead () |
| Stop threaded read. | |
| -bool | isThreadedWrite () const |
| Return true if threaded write is started. | |
| -void | startThreadedWrite () |
| Start threaded write. | |
| -void | stopThreadedWrite () |
| Stop threaded write. | |
| -void | clearThreadedWriteQueue () |
| Clear threaded write task queue. | |
| -void | start () |
| Start both threaded read and threaded write. | |
| -void | stop (bool wait=false) |
| Stop both threaded read and threaded write and if "wait" block until both threads are stop. | |
| -int | read (void *read_to, int max_size) |
| Read from device maximum "max_size" bytes to "read_to". | |
| -PIByteArray | read (int max_size) |
| Read from device maximum "max_size" bytes and return them as PIByteArray. | |
| -int | write (const void *data, int max_size) |
| Write maximum "max_size" bytes of "data" to device. | |
| -PIByteArray | readForTime (double timeout_ms) |
| Read from device for "timeout_ms" milliseconds and return readed data as PIByteArray. Timeout should to be greater than 0. | |
| -ullong | writeThreaded (const void *data, int max_size) |
| Add task to threaded write queue and return task ID. | |
| -ullong | writeThreaded (const PIByteArray &data) |
| Add task to threaded write queue and return task ID. | |
| -bool | configure (const PIString &config_file, const PIString §ion, bool parent_section=false) |
| Configure device from section "section" of file "config_file", if "parent_section" parent section also will be read. | |
| -PIString | constructFullPath () const |
| Reimplement to construct full unambiguous string, describes this device, default returns fullPathPrefix() + "://" + path() | |
| -void | configureFromFullPath (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -bool | open () |
| Open device. | |
| -bool | open (const PIString &_path) |
| Open device with path "path". | |
| -bool | close () |
| Close device. | |
| -int | write (PIByteArray data) |
| Write "data" to device. | |
| -void | opened () |
| Raise if succesfull open. | |
| -void | closed () |
| Raise if succesfull close. | |
| -void | threadedReadEvent (uchar *readed, int size) |
| Raise if read thread succesfull read some data. | |
| -void | threadedWriteEvent (ullong id, int written_size) |
| Raise if write thread successfull write some data of task with ID "id". | |
Public Member Functions inherited from PIThread | |
| - | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| - | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| -void | setData (void *d) |
| Set common data passed to external function. | |
| -void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| -void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| -void * | data () const |
| Returns common data passed to external function. | |
| -PIThread::Priority | priority () const |
| Return priority of thread. | |
| -bool | isRunning () const |
Return true if thread is running. | |
| -void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| -PIMutex & | mutex () |
| Returns internal mutex. | |
| -llong | tid () const |
| Returns thread ID. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| -void | lock () |
| Lock internal mutex. | |
| -void | unlock () |
| Unlock internal mutex. | |
| -void | started () |
| Raise on thread start. | |
| -void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Static Public Member Functions | |
| -static bool | isExists (const PIString &path) |
| Returns if file with path "path" does exists. | |
| -static bool | remove (const PIString &path) |
| Remove file with path "path" and returns if remove was successful. | |
| -static bool | rename (const PIString &from, const PIString &to) |
| Rename file with path "from" to path "to" and returns if rename was successful. | |
| -static FileInfo | fileInfo (const PIString &path) |
| Returns FileInfo of file or dir with path "path". | |
| -static bool | applyFileInfo (const PIString &path, const FileInfo &info) |
| Apply "info" parameters to file or dir with path "path". | |
| -static bool | applyFileInfo (const FileInfo &info) |
| Apply "info" parameters to file or dir with path "info".path. | |
Static Public Member Functions inherited from PIIODevice | |
| static PIIODevice * | createFromFullPath (const PIString &full_path) |
| Try to determine suitable device, create new one, configure it with configureFromFullPath() and returns it. More... | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
-Protected Member Functions | |
| -PIString | fullPathPrefix () const |
| Reimplement to construct full unambiguous string prefix. Creating devices by unambiguous string. | |
| -PIString | constructFullPathDevice () const |
| Reimplement to construct full unambiguous string, describes this device. Default implementation returns path() | |
| -void | configureFromFullPathDevice (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -int | readDevice (void *read_to, int max_size) |
| Reimplement this function to read from your device. | |
| -int | writeDevice (const void *data, int max_size) |
| Reimplement this function to write to your device. | |
| -bool | openDevice () |
| Reimplement to open device, return value will be set to "opened_" variable; don't call this function in subclass, use open() | |
| -bool | closeDevice () |
| Reimplement to close device, inverse return value will be set to "opened_" variable. | |
| -DeviceInfoFlags | deviceInfoFlags () const |
| Reimplement to return correct DeviceInfoFlags. Default implementation returns 0. | |
Protected Member Functions inherited from PIIODevice | |
| -virtual bool | init () |
| Function executed before first openDevice() or from constructor. | |
| -virtual bool | configureDevice (const void *e_main, const void *e_parent=0) |
| Reimplement to configure device from entries "e_main" and "e_parent", cast arguments to PIConfig::Entry*. | |
| -virtual bool | threadedRead (uchar *readed, int size) |
| Function executed when thread read some data, default implementation execute external slot "ret_func_". | |
| -virtual void | optionsChanged () |
| Reimplement to apply new device options. | |
| -virtual void | threadedReadBufferSizeChanged () |
| Reimplement to apply new threadedReadBufferSize() | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
-Handlers | |
| -void | clear () |
| Clear content of file. | |
| -void | remove () |
| Remove file. | |
| -void | resize (llong new_size) |
| Resize file to "new_size" with "fill" filling. | |
| -void | resize (llong new_size, uchar fill) |
| Resize file to "new_size" with "fill" filling. | |
-Additional Inherited Members | |
Public Types inherited from PIIODevice | |
| enum | DeviceMode { ReadOnly = 0x01, -WriteOnly = 0x02, -ReadWrite = 0x03 - } |
| Open modes for PIIODevice. More... | |
| enum | DeviceOption { BlockingRead = 0x01, -BlockingWrite = 0x02 - } |
| Options for PIIODevice, works with some devices. More... | |
| enum | DeviceInfoFlag { Sequential = 0x01, -Reliable = 0x02 - } |
| Characteristics of PIIODevice subclass. More... | |
Public Types inherited from PIThread | |
| enum | Priority { - piLowerst, -piLow, -piNormal, -piHigh, - - piHighest - - } |
| Priority of thread. More... | |
Public Attributes inherited from PIIODevice | |
| -bool | reopenEnabled |
| setReopenEnabled, default "true" | |
| -int | reopenTimeout |
| setReopenTimeout in ms, default 1000 | |
| -int | threadedReadBufferSize |
| setThreadedReadBufferSize in bytes, default 4096 | |
Related Functions inherited from PIIODevice | |
| template<typename T > | |
| T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) |
| Service function. useful for configuring devices. More... | |
| -#define | REGISTER_DEVICE(class) |
| Use this macro to enable automatic creation instances of your class with createFromFullPath() function. | |
| -#define | PIIODEVICE(class) |
| Use this macro instead of PIOBJECT when describe your own PIIODevice. | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Local file.
-This class provide access to local file. You can manipulate binary content or use this class as text stream. To binary access there are function read(), write(), and many writeBinary() functions. For write variables to file in their text representation threr are many "<<" operators.
-Each opened file has a read/write position - logical position in the file content you read from or you write to. You can find out current position with function pos(). Function seek(llong position) move position to position "position", seekToBegin() move position to the begin of file, seekToEnd() move position to the end of file.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIFlags< Enum >, including all inherited members.
-| operator int() const | PIFlags< Enum > | inline |
| operator!=(const PIFlags &f) | PIFlags< Enum > | inline |
| operator!=(const Enum &e) | PIFlags< Enum > | inline |
| operator!=(const int i) | PIFlags< Enum > | inline |
| operator&(PIFlags f) const | PIFlags< Enum > | inline |
| operator&(Enum e) const | PIFlags< Enum > | inline |
| operator&(int i) const | PIFlags< Enum > | inline |
| operator&=(const PIFlags &f) | PIFlags< Enum > | inline |
| operator&=(const Enum &e) | PIFlags< Enum > | inline |
| operator&=(const int i) | PIFlags< Enum > | inline |
| operator<(const PIFlags &f) | PIFlags< Enum > | inline |
| operator<(const Enum &e) | PIFlags< Enum > | inline |
| operator<(const int i) | PIFlags< Enum > | inline |
| operator<=(const PIFlags &f) | PIFlags< Enum > | inline |
| operator<=(const Enum &e) | PIFlags< Enum > | inline |
| operator<=(const int i) | PIFlags< Enum > | inline |
| operator=(const PIFlags &f) | PIFlags< Enum > | inline |
| operator=(const Enum &e) | PIFlags< Enum > | inline |
| operator=(const int &i) | PIFlags< Enum > | inline |
| operator==(const PIFlags &f) | PIFlags< Enum > | inline |
| operator==(const Enum &e) | PIFlags< Enum > | inline |
| operator==(const int i) | PIFlags< Enum > | inline |
| operator>(const PIFlags &f) | PIFlags< Enum > | inline |
| operator>(const Enum &e) | PIFlags< Enum > | inline |
| operator>(const int i) | PIFlags< Enum > | inline |
| operator>=(const PIFlags &f) | PIFlags< Enum > | inline |
| operator>=(const Enum &e) | PIFlags< Enum > | inline |
| operator>=(const int i) | PIFlags< Enum > | inline |
| operator[](Enum e) const | PIFlags< Enum > | inline |
| operator^(PIFlags f) const | PIFlags< Enum > | inline |
| operator^(Enum e) const | PIFlags< Enum > | inline |
| operator^(int i) const | PIFlags< Enum > | inline |
| operator^=(const PIFlags &f) | PIFlags< Enum > | inline |
| operator^=(const Enum &e) | PIFlags< Enum > | inline |
| operator^=(const int i) | PIFlags< Enum > | inline |
| operator|(PIFlags f) const | PIFlags< Enum > | inline |
| operator|(Enum e) const | PIFlags< Enum > | inline |
| operator|(int i) const | PIFlags< Enum > | inline |
| operator|=(const PIFlags &f) | PIFlags< Enum > | inline |
| operator|=(const Enum &e) | PIFlags< Enum > | inline |
| operator|=(const int i) | PIFlags< Enum > | inline |
| PIFlags() | PIFlags< Enum > | inline |
| PIFlags(Enum e) | PIFlags< Enum > | inline |
| PIFlags(const PIFlags &f) | PIFlags< Enum > | inline |
| PIFlags(const int i) | PIFlags< Enum > | inline |
| setFlag(const PIFlags &f, bool on=true) | PIFlags< Enum > | inline |
| setFlag(const Enum &e, bool on=true) | PIFlags< Enum > | inline |
| setFlag(const int &i, bool on=true) | PIFlags< Enum > | inline |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This class used as container for bit flags. - More...
--Public Member Functions | |
| - | PIFlags () |
| Constructor with flags = 0. | |
| - | PIFlags (Enum e) |
| Constructor with flags = Enum "e". | |
| - | PIFlags (const PIFlags &f) |
| Constructor with flags = PIFlags "f". | |
| - | PIFlags (const int i) |
| Constructor with flags = int "i". | |
| -PIFlags & | setFlag (const PIFlags &f, bool on=true) |
| Set flags "f" to value "on". | |
| -PIFlags & | setFlag (const Enum &e, bool on=true) |
| Set flag "e" to value "on". | |
| -PIFlags & | setFlag (const int &i, bool on=true) |
| Set flag "i" to value "on". | |
| -void | operator= (const PIFlags &f) |
| copy operator | |
| -void | operator= (const Enum &e) |
| copy operator | |
| -void | operator= (const int &i) |
| copy operator | |
| -bool | operator== (const PIFlags &f) |
| compare operator | |
| -bool | operator== (const Enum &e) |
| compare operator | |
| -bool | operator== (const int i) |
| compare operator | |
| -bool | operator!= (const PIFlags &f) |
| compare operator | |
| -bool | operator!= (const Enum &e) |
| compare operator | |
| -bool | operator!= (const int i) |
| compare operator | |
| -bool | operator> (const PIFlags &f) |
| compare operator | |
| -bool | operator> (const Enum &e) |
| compare operator | |
| -bool | operator> (const int i) |
| compare operator | |
| -bool | operator< (const PIFlags &f) |
| compare operator | |
| -bool | operator< (const Enum &e) |
| compare operator | |
| -bool | operator< (const int i) |
| compare operator | |
| -bool | operator>= (const PIFlags &f) |
| compare operator | |
| -bool | operator>= (const Enum &e) |
| compare operator | |
| -bool | operator>= (const int i) |
| compare operator | |
| -bool | operator<= (const PIFlags &f) |
| compare operator | |
| -bool | operator<= (const Enum &e) |
| compare operator | |
| -bool | operator<= (const int i) |
| compare operator | |
| -void | operator&= (const PIFlags &f) |
| Bit-wise AND operator. | |
| -void | operator&= (const Enum &e) |
| Bit-wise AND operator. | |
| -void | operator&= (const int i) |
| Bit-wise AND operator. | |
| -void | operator|= (const PIFlags &f) |
| Bit-wise OR operator. | |
| -void | operator|= (const Enum &e) |
| Bit-wise OR operator. | |
| -void | operator|= (const int i) |
| Bit-wise OR operator. | |
| -void | operator^= (const PIFlags &f) |
| Bit-wise XOR operator. | |
| -void | operator^= (const Enum &e) |
| Bit-wise XOR operator. | |
| -void | operator^= (const int i) |
| Bit-wise XOR operator. | |
| -PIFlags | operator& (PIFlags f) const |
| Bit-wise AND operator. | |
| -PIFlags | operator& (Enum e) const |
| Bit-wise AND operator. | |
| -PIFlags | operator& (int i) const |
| Bit-wise AND operator. | |
| -PIFlags | operator| (PIFlags f) const |
| Bit-wise OR operator. | |
| -PIFlags | operator| (Enum e) const |
| Bit-wise OR operator. | |
| -PIFlags | operator| (int i) const |
| Bit-wise OR operator. | |
| -PIFlags | operator^ (PIFlags f) const |
| Bit-wise XOR operator. | |
| -PIFlags | operator^ (Enum e) const |
| Bit-wise XOR operator. | |
| -PIFlags | operator^ (int i) const |
| Bit-wise XOR operator. | |
| -bool | operator[] (Enum e) const |
| Test flag operator. | |
| - | operator int () const |
Implicity conversion to int. | |
This class used as container for bit flags.
-PIFlags is wrapper around "int". There are many bit-wise operators, native conversion to int and function to test flag.
- Example:
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIIOByteArray, including all inherited members.
-| BlockingRead enum value | PIIODevice | |
| BlockingWrite enum value | PIIODevice | |
| byteArray() const | PIIOByteArray | inline |
| canRead() const | PIIODevice | inlinevirtual |
| canWrite() const | PIIODevice | inlinevirtual |
| className() const | PIObject | inlinevirtual |
| clear() | PIIOByteArray | inline |
| clearThreadedWriteQueue() | PIIODevice | inline |
| close() | PIIODevice | inline |
| closed() | PIIODevice | |
| closeDevice() | PIIODevice | inlineprotectedvirtual |
| configure(const PIString &config_file, const PIString §ion, bool parent_section=false) | PIIODevice | |
| configureDevice(const void *e_main, const void *e_parent=0) | PIIODevice | inlineprotectedvirtual |
| configureFromFullPath(const PIString &full_path) | PIIODevice | |
| configureFromFullPathDevice(const PIString &full_path) | PIIODevice | inlineprotectedvirtual |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| CONNECTU_QUEUED | PIObject | related |
| constructFullPath() const | PIIODevice | |
| constructFullPathDevice() const | PIIODevice | inlineprotectedvirtual |
| createFromFullPath(const PIString &full_path) | PIIODevice | static |
| data() const | PIThread | inline |
| debug() const | PIObject | inline |
| deleted() | PIObject | protected |
| DeviceInfoFlag enum name | PIIODevice | |
| deviceInfoFlags() const | PIIOByteArray | inlineprotectedvirtual |
| DeviceMode enum name | PIIODevice | |
| DeviceOption enum name | PIIODevice | |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlinestatic |
| flush() | PIIODevice | inlinevirtual |
| fullPathPrefix() const | PIIODevice | inlinevirtual |
| HANDLER | PIObject | related |
| infoFlags() const | PIIODevice | inline |
| init() | PIIODevice | inlineprotectedvirtual |
| isClosed() const | PIIODevice | inline |
| isEnd() const | PIIOByteArray | inline |
| isOpened() const | PIIODevice | inline |
| isOptionSet(DeviceOption o) const | PIIODevice | inline |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isReadable() const | PIIODevice | inline |
| isReopenEnabled() const | PIIODevice | inline |
| isRunning() const | PIThread | inline |
| isThreadedRead() const | PIIODevice | inline |
| isThreadedWrite() const | PIIODevice | inline |
| isWriteable() const | PIIODevice | inline |
| lock() | PIThread | inline |
| mode() const | PIIODevice | inline |
| mutex() | PIThread | inline |
| name() const | PIObject | inline |
| needLockRun(bool need) | PIThread | inline |
| open(PIByteArray *buffer, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) | PIIOByteArray | |
| open(const PIByteArray &buffer) | PIIOByteArray | |
| PIIODevice::open() | PIIODevice | inline |
| PIIODevice::open(const PIString &_path) | PIIODevice | inline |
| openDevice() | PIIOByteArray | protectedvirtual |
| opened() | PIIODevice | |
| options() const | PIIODevice | inline |
| optionsChanged() | PIIODevice | inlineprotectedvirtual |
| parentClassName() const | PIObject | inlinevirtual |
| path() const | PIIODevice | inline |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| piHigh enum value | PIThread | |
| piHighest enum value | PIThread | |
| PIIOByteArray(PIByteArray *buffer=0, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) | PIIOByteArray | explicit |
| PIIOByteArray(const PIByteArray &buffer) | PIIOByteArray | explicit |
| PIIODEVICE | PIIODevice | related |
| PIIODevice() | PIIODevice | explicit |
| PIIODevice(const PIString &path, DeviceMode mode=ReadWrite) | PIIODevice | explicit |
| piLow enum value | PIThread | |
| piLowerst enum value | PIThread | |
| piNormal enum value | PIThread | |
| PIObject(const PIString &name=PIString()) | PIObject | explicit |
| PIOBJECT | PIObject | related |
| PIOBJECT_SUBCLASS | PIObject | related |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | |
| priority() const | PIThread | inline |
| Priority enum name | PIThread | |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| read(void *read_to, int max_size) | PIIODevice | inline |
| read(int max_size) | PIIODevice | inline |
| readDevice(void *read_to, int size) | PIIOByteArray | protectedvirtual |
| readDeviceSetting(const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) | PIIODevice | related |
| readForTime(double timeout_ms) | PIIODevice | |
| ReadOnly enum value | PIIODevice | |
| ReadWrite enum value | PIIODevice | |
| REGISTER_DEVICE | PIIODevice | related |
| Reliable enum value | PIIODevice | |
| reopenEnabled | PIIODevice | |
| reopenTimeout | PIIODevice | |
| reopenTimeout() | PIIODevice | inline |
| seek(llong position) | PIIOByteArray | inline |
| seekToBegin() | PIIOByteArray | inline |
| seekToEnd() | PIIOByteArray | inline |
| Sequential enum value | PIIODevice | |
| setData(void *d) | PIThread | inline |
| setDebug(bool debug) | PIObject | inline |
| setMode(DeviceMode m) | PIIODevice | inline |
| setName(const PIString &name) | PIObject | inline |
| setOption(DeviceOption o, bool yes=true) | PIIODevice | |
| setOptions(DeviceOptions o) | PIIODevice | |
| setPath(const PIString &path) | PIIODevice | inline |
| setPriority(PIThread::Priority prior) | PIThread | |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setReopenEnabled(bool yes=true) | PIIODevice | inline |
| setReopenTimeout(int msecs) | PIIODevice | inline |
| setSlot(ThreadFunc func) | PIThread | inline |
| setThreadedReadBufferSize(int new_size) | PIIODevice | inline |
| setThreadedReadData(void *d) | PIIODevice | inline |
| setThreadedReadSlot(ReadRetFunc func) | PIIODevice | inline |
| start() | PIIODevice | inline |
| PIThread::start(int timer_delay) | PIThread | |
| started() | PIThread | |
| startOnce() | PIThread | |
| startOnce(ThreadFunc func) | PIThread | inline |
| startThreadedRead() | PIIODevice | inline |
| startThreadedRead(ReadRetFunc func) | PIIODevice | inline |
| startThreadedWrite() | PIIODevice | inline |
| stop(bool wait=false) | PIIODevice | inline |
| stopped() | PIThread | |
| stopThreadedRead() | PIIODevice | inline |
| stopThreadedWrite() | PIIODevice | inline |
| threadedRead(uchar *readed, int size) | PIIODevice | protectedvirtual |
| threadedReadBuffer() const | PIIODevice | inline |
| threadedReadBufferSize | PIIODevice | |
| threadedReadBufferSize() const | PIIODevice | inline |
| threadedReadBufferSizeChanged() | PIIODevice | inlineprotectedvirtual |
| threadedReadData() const | PIIODevice | inline |
| threadedReadEvent(uchar *readed, int size) | PIIODevice | |
| threadedWriteEvent(ullong id, int written_size) | PIIODevice | |
| tid() const | PIThread | inline |
| unlock() | PIThread | inline |
| waitForFinish(int timeout_msecs) | PIThread | |
| waitForStart(int timeout_msecs) | PIThread | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
| write(const void *data, int max_size) | PIIODevice | inline |
| write(PIByteArray data) | PIIODevice | inline |
| writeByteArray(const PIByteArray &ba) | PIIOByteArray | |
| writeDevice(const void *data_, int size) | PIIOByteArray | protectedvirtual |
| WriteOnly enum value | PIIODevice | |
| writeThreaded(const void *data, int max_size) | PIIODevice | inline |
| writeThreaded(const PIByteArray &data) | PIIODevice |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
PIIODevice wrapper around PIByteArray. - More...
-
-Public Member Functions | |
| - | PIIOByteArray (PIByteArray *buffer=0, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) |
| Contructs PIIOByteArray with "buffer" content and "mode" open mode. | |
| - | PIIOByteArray (const PIByteArray &buffer) |
| Contructs PIIOByteArray with "buffer" content only for read. | |
| -PIByteArray * | byteArray () const |
| Returns content. | |
| -void | clear () |
| Clear content buffer. | |
| -bool | open (PIByteArray *buffer, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) |
| Open "buffer" content with "mode" open mode. | |
| -bool | open (const PIByteArray &buffer) |
| Open "buffer" content only for read. | |
| -bool | isEnd () const |
| Returns if position is at the end of content. | |
| -void | seek (llong position) |
| Move read/write position to "position". | |
| -void | seekToBegin () |
| Move read/write position to the begin of the string. | |
| -void | seekToEnd () |
| Move read/write position to the end of the string. | |
| -int | writeByteArray (const PIByteArray &ba) |
| Insert data "ba" into content at current position. | |
Public Member Functions inherited from PIIODevice | |
| - | PIIODevice () |
| Constructs a empty PIIODevice. | |
| PIIODevice (const PIString &path, DeviceMode mode=ReadWrite) | |
| Constructs a PIIODevice with path and mode. More... | |
| -DeviceMode | mode () const |
| Current open mode of device. | |
| -void | setMode (DeviceMode m) |
| Set open mode of device. | |
| -DeviceOptions | options () const |
| Current device options. | |
| -bool | isOptionSet (DeviceOption o) const |
| Current device option "o" state. | |
| -void | setOptions (DeviceOptions o) |
| Set device options. | |
| -bool | setOption (DeviceOption o, bool yes=true) |
| Set device option "o" to "yes" and return previous state. | |
| -DeviceInfoFlags | infoFlags () const |
| Returns device characteristic flags. | |
| -PIString | path () const |
| Current path of device. | |
| -void | setPath (const PIString &path) |
| Set path of device. | |
| -bool | isReadable () const |
| Return true if mode is ReadOnly or ReadWrite. | |
| -bool | isWriteable () const |
| Return true if mode is WriteOnly or ReadWrite. | |
| -bool | isOpened () const |
| Return true if device is successfully opened. | |
| -bool | isClosed () const |
| Return true if device is closed. | |
| -virtual bool | canRead () const |
| Return true if device can read now. | |
| -virtual bool | canWrite () const |
| Return true if device can write now. | |
| -void | setReopenEnabled (bool yes=true) |
| Set execution of open enabled while threaded read on closed device. | |
| -void | setReopenTimeout (int msecs) |
| Set timeout in milliseconds between open tryings if reopen is enabled. | |
| -bool | isReopenEnabled () const |
| Return reopen enable. | |
| -int | reopenTimeout () |
| Return reopen timeout. | |
| void | setThreadedReadSlot (ReadRetFunc func) |
| Set "threaded read slot". More... | |
| -void | setThreadedReadData (void *d) |
| Set custom data that will be passed to "threaded read slot". | |
| void | setThreadedReadBufferSize (int new_size) |
| Set size of threaded read buffer. More... | |
| -int | threadedReadBufferSize () const |
| Return size of threaded read buffer. | |
| -const uchar * | threadedReadBuffer () const |
| Return content of threaded read buffer. | |
| -void * | threadedReadData () const |
| Return custom data that will be passed to "threaded read slot". | |
| -bool | isThreadedRead () const |
| Return true if threaded read is started. | |
| -void | startThreadedRead () |
| Start threaded read. | |
| -void | startThreadedRead (ReadRetFunc func) |
| Start threaded read and assign "threaded read slot" to "func". | |
| -void | stopThreadedRead () |
| Stop threaded read. | |
| -bool | isThreadedWrite () const |
| Return true if threaded write is started. | |
| -void | startThreadedWrite () |
| Start threaded write. | |
| -void | stopThreadedWrite () |
| Stop threaded write. | |
| -void | clearThreadedWriteQueue () |
| Clear threaded write task queue. | |
| -void | start () |
| Start both threaded read and threaded write. | |
| -void | stop (bool wait=false) |
| Stop both threaded read and threaded write and if "wait" block until both threads are stop. | |
| -int | read (void *read_to, int max_size) |
| Read from device maximum "max_size" bytes to "read_to". | |
| -PIByteArray | read (int max_size) |
| Read from device maximum "max_size" bytes and return them as PIByteArray. | |
| -int | write (const void *data, int max_size) |
| Write maximum "max_size" bytes of "data" to device. | |
| -PIByteArray | readForTime (double timeout_ms) |
| Read from device for "timeout_ms" milliseconds and return readed data as PIByteArray. Timeout should to be greater than 0. | |
| -ullong | writeThreaded (const void *data, int max_size) |
| Add task to threaded write queue and return task ID. | |
| -ullong | writeThreaded (const PIByteArray &data) |
| Add task to threaded write queue and return task ID. | |
| -bool | configure (const PIString &config_file, const PIString §ion, bool parent_section=false) |
| Configure device from section "section" of file "config_file", if "parent_section" parent section also will be read. | |
| -virtual PIString | fullPathPrefix () const |
| Reimplement to construct full unambiguous string prefix. Creating devices by unambiguous string. | |
| -PIString | constructFullPath () const |
| Reimplement to construct full unambiguous string, describes this device, default returns fullPathPrefix() + "://" + path() | |
| -void | configureFromFullPath (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -bool | open () |
| Open device. | |
| -bool | open (const PIString &_path) |
| Open device with path "path". | |
| -bool | close () |
| Close device. | |
| -int | write (PIByteArray data) |
| Write "data" to device. | |
| -virtual void | flush () |
| Immediate write all buffers. | |
| -void | opened () |
| Raise if succesfull open. | |
| -void | closed () |
| Raise if succesfull close. | |
| -void | threadedReadEvent (uchar *readed, int size) |
| Raise if read thread succesfull read some data. | |
| -void | threadedWriteEvent (ullong id, int written_size) |
| Raise if write thread successfull write some data of task with ID "id". | |
Public Member Functions inherited from PIThread | |
| - | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| - | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| -void | setData (void *d) |
| Set common data passed to external function. | |
| -void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| -void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| -void * | data () const |
| Returns common data passed to external function. | |
| -PIThread::Priority | priority () const |
| Return priority of thread. | |
| -bool | isRunning () const |
Return true if thread is running. | |
| -void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| -PIMutex & | mutex () |
| Returns internal mutex. | |
| -llong | tid () const |
| Returns thread ID. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| -void | lock () |
| Lock internal mutex. | |
| -void | unlock () |
| Unlock internal mutex. | |
| -void | started () |
| Raise on thread start. | |
| -void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Protected Member Functions | |
| -bool | openDevice () |
| Reimplement to open device, return value will be set to "opened_" variable; don't call this function in subclass, use open() | |
| -int | readDevice (void *read_to, int size) |
| Reimplement this function to read from your device. | |
| -int | writeDevice (const void *data_, int size) |
| Reimplement this function to write to your device. | |
| -DeviceInfoFlags | deviceInfoFlags () const |
| Reimplement to return correct DeviceInfoFlags. Default implementation returns 0. | |
Protected Member Functions inherited from PIIODevice | |
| -virtual bool | init () |
| Function executed before first openDevice() or from constructor. | |
| -virtual bool | configureDevice (const void *e_main, const void *e_parent=0) |
| Reimplement to configure device from entries "e_main" and "e_parent", cast arguments to PIConfig::Entry*. | |
| -virtual bool | closeDevice () |
| Reimplement to close device, inverse return value will be set to "opened_" variable. | |
| -virtual bool | threadedRead (uchar *readed, int size) |
| Function executed when thread read some data, default implementation execute external slot "ret_func_". | |
| -virtual PIString | constructFullPathDevice () const |
| Reimplement to construct full unambiguous string, describes this device. Default implementation returns path() | |
| -virtual void | configureFromFullPathDevice (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -virtual void | optionsChanged () |
| Reimplement to apply new device options. | |
| -virtual void | threadedReadBufferSizeChanged () |
| Reimplement to apply new threadedReadBufferSize() | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
-Additional Inherited Members | |
Public Types inherited from PIIODevice | |
| enum | DeviceMode { ReadOnly = 0x01, -WriteOnly = 0x02, -ReadWrite = 0x03 - } |
| Open modes for PIIODevice. More... | |
| enum | DeviceOption { BlockingRead = 0x01, -BlockingWrite = 0x02 - } |
| Options for PIIODevice, works with some devices. More... | |
| enum | DeviceInfoFlag { Sequential = 0x01, -Reliable = 0x02 - } |
| Characteristics of PIIODevice subclass. More... | |
Public Types inherited from PIThread | |
| enum | Priority { - piLowerst, -piLow, -piNormal, -piHigh, - - piHighest - - } |
| Priority of thread. More... | |
Static Public Member Functions inherited from PIIODevice | |
| static PIIODevice * | createFromFullPath (const PIString &full_path) |
| Try to determine suitable device, create new one, configure it with configureFromFullPath() and returns it. More... | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Public Attributes inherited from PIIODevice | |
| -bool | reopenEnabled |
| setReopenEnabled, default "true" | |
| -int | reopenTimeout |
| setReopenTimeout in ms, default 1000 | |
| -int | threadedReadBufferSize |
| setThreadedReadBufferSize in bytes, default 4096 | |
Related Functions inherited from PIIODevice | |
| template<typename T > | |
| T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) |
| Service function. useful for configuring devices. More... | |
| -#define | REGISTER_DEVICE(class) |
| Use this macro to enable automatic creation instances of your class with createFromFullPath() function. | |
| -#define | PIIODEVICE(class) |
| Use this macro instead of PIOBJECT when describe your own PIIODevice. | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
PIIODevice wrapper around PIByteArray.
-This class sllow you to use PIByteArray as PIIODevice and pass it to, e.g. PIConfig
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIIODevice, including all inherited members.
-| BlockingRead enum value | PIIODevice | |
| BlockingWrite enum value | PIIODevice | |
| canRead() const | PIIODevice | inlinevirtual |
| canWrite() const | PIIODevice | inlinevirtual |
| className() const | PIObject | inlinevirtual |
| clearThreadedWriteQueue() | PIIODevice | inline |
| close() | PIIODevice | inline |
| closed() | PIIODevice | |
| closeDevice() | PIIODevice | inlineprotectedvirtual |
| configure(const PIString &config_file, const PIString §ion, bool parent_section=false) | PIIODevice | |
| configureDevice(const void *e_main, const void *e_parent=0) | PIIODevice | inlineprotectedvirtual |
| configureFromFullPath(const PIString &full_path) | PIIODevice | |
| configureFromFullPathDevice(const PIString &full_path) | PIIODevice | inlineprotectedvirtual |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| CONNECTU_QUEUED | PIObject | related |
| constructFullPath() const | PIIODevice | |
| constructFullPathDevice() const | PIIODevice | inlineprotectedvirtual |
| createFromFullPath(const PIString &full_path) | PIIODevice | static |
| data() const | PIThread | inline |
| debug() const | PIObject | inline |
| deleted() | PIObject | protected |
| DeviceInfoFlag enum name | PIIODevice | |
| deviceInfoFlags() const | PIIODevice | inlineprotectedvirtual |
| DeviceMode enum name | PIIODevice | |
| DeviceOption enum name | PIIODevice | |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlinestatic |
| flush() | PIIODevice | inlinevirtual |
| fullPathPrefix() const | PIIODevice | inlinevirtual |
| HANDLER | PIObject | related |
| infoFlags() const | PIIODevice | inline |
| init() | PIIODevice | inlineprotectedvirtual |
| isClosed() const | PIIODevice | inline |
| isOpened() const | PIIODevice | inline |
| isOptionSet(DeviceOption o) const | PIIODevice | inline |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isReadable() const | PIIODevice | inline |
| isReopenEnabled() const | PIIODevice | inline |
| isRunning() const | PIThread | inline |
| isThreadedRead() const | PIIODevice | inline |
| isThreadedWrite() const | PIIODevice | inline |
| isWriteable() const | PIIODevice | inline |
| lock() | PIThread | inline |
| mode() const | PIIODevice | inline |
| mutex() | PIThread | inline |
| name() const | PIObject | inline |
| needLockRun(bool need) | PIThread | inline |
| open() | PIIODevice | inline |
| open(const PIString &_path) | PIIODevice | inline |
| openDevice()=0 | PIIODevice | protectedpure virtual |
| opened() | PIIODevice | |
| options() const | PIIODevice | inline |
| optionsChanged() | PIIODevice | inlineprotectedvirtual |
| parentClassName() const | PIObject | inlinevirtual |
| path() const | PIIODevice | inline |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| piHigh enum value | PIThread | |
| piHighest enum value | PIThread | |
| PIIODevice() | PIIODevice | explicit |
| PIIODevice(const PIString &path, DeviceMode mode=ReadWrite) | PIIODevice | explicit |
| PIIODEVICE | PIIODevice | related |
| piLow enum value | PIThread | |
| piLowerst enum value | PIThread | |
| piNormal enum value | PIThread | |
| PIObject(const PIString &name=PIString()) | PIObject | explicit |
| PIOBJECT | PIObject | related |
| PIOBJECT_SUBCLASS | PIObject | related |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | |
| priority() const | PIThread | inline |
| Priority enum name | PIThread | |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| read(void *read_to, int max_size) | PIIODevice | inline |
| read(int max_size) | PIIODevice | inline |
| readDevice(void *read_to, int max_size) | PIIODevice | inlineprotectedvirtual |
| readDeviceSetting(const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) | PIIODevice | related |
| readForTime(double timeout_ms) | PIIODevice | |
| ReadOnly enum value | PIIODevice | |
| ReadWrite enum value | PIIODevice | |
| REGISTER_DEVICE | PIIODevice | related |
| Reliable enum value | PIIODevice | |
| reopenEnabled | PIIODevice | |
| reopenTimeout | PIIODevice | |
| reopenTimeout() | PIIODevice | inline |
| Sequential enum value | PIIODevice | |
| setData(void *d) | PIThread | inline |
| setDebug(bool debug) | PIObject | inline |
| setMode(DeviceMode m) | PIIODevice | inline |
| setName(const PIString &name) | PIObject | inline |
| setOption(DeviceOption o, bool yes=true) | PIIODevice | |
| setOptions(DeviceOptions o) | PIIODevice | |
| setPath(const PIString &path) | PIIODevice | inline |
| setPriority(PIThread::Priority prior) | PIThread | |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setReopenEnabled(bool yes=true) | PIIODevice | inline |
| setReopenTimeout(int msecs) | PIIODevice | inline |
| setSlot(ThreadFunc func) | PIThread | inline |
| setThreadedReadBufferSize(int new_size) | PIIODevice | inline |
| setThreadedReadData(void *d) | PIIODevice | inline |
| setThreadedReadSlot(ReadRetFunc func) | PIIODevice | inline |
| start() | PIIODevice | inline |
| PIThread::start(int timer_delay) | PIThread | |
| started() | PIThread | |
| startOnce() | PIThread | |
| startOnce(ThreadFunc func) | PIThread | inline |
| startThreadedRead() | PIIODevice | inline |
| startThreadedRead(ReadRetFunc func) | PIIODevice | inline |
| startThreadedWrite() | PIIODevice | inline |
| stop(bool wait=false) | PIIODevice | inline |
| stopped() | PIThread | |
| stopThreadedRead() | PIIODevice | inline |
| stopThreadedWrite() | PIIODevice | inline |
| threadedRead(uchar *readed, int size) | PIIODevice | protectedvirtual |
| threadedReadBuffer() const | PIIODevice | inline |
| threadedReadBufferSize | PIIODevice | |
| threadedReadBufferSize() const | PIIODevice | inline |
| threadedReadBufferSizeChanged() | PIIODevice | inlineprotectedvirtual |
| threadedReadData() const | PIIODevice | inline |
| threadedReadEvent(uchar *readed, int size) | PIIODevice | |
| threadedWriteEvent(ullong id, int written_size) | PIIODevice | |
| tid() const | PIThread | inline |
| unlock() | PIThread | inline |
| waitForFinish(int timeout_msecs) | PIThread | |
| waitForStart(int timeout_msecs) | PIThread | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
| write(const void *data, int max_size) | PIIODevice | inline |
| write(PIByteArray data) | PIIODevice | inline |
| writeDevice(const void *data, int max_size) | PIIODevice | inlineprotectedvirtual |
| WriteOnly enum value | PIIODevice | |
| writeThreaded(const void *data, int max_size) | PIIODevice | inline |
| writeThreaded(const PIByteArray &data) | PIIODevice |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Base class for input/output classes. - More...
-
-Public Types | |
| enum | DeviceMode { ReadOnly = 0x01, -WriteOnly = 0x02, -ReadWrite = 0x03 - } |
| Open modes for PIIODevice. More... | |
| enum | DeviceOption { BlockingRead = 0x01, -BlockingWrite = 0x02 - } |
| Options for PIIODevice, works with some devices. More... | |
| enum | DeviceInfoFlag { Sequential = 0x01, -Reliable = 0x02 - } |
| Characteristics of PIIODevice subclass. More... | |
Public Types inherited from PIThread | |
| enum | Priority { - piLowerst, -piLow, -piNormal, -piHigh, - - piHighest - - } |
| Priority of thread. More... | |
-Public Member Functions | |
| - | PIIODevice () |
| Constructs a empty PIIODevice. | |
| PIIODevice (const PIString &path, DeviceMode mode=ReadWrite) | |
| Constructs a PIIODevice with path and mode. More... | |
| -DeviceMode | mode () const |
| Current open mode of device. | |
| -void | setMode (DeviceMode m) |
| Set open mode of device. | |
| -DeviceOptions | options () const |
| Current device options. | |
| -bool | isOptionSet (DeviceOption o) const |
| Current device option "o" state. | |
| -void | setOptions (DeviceOptions o) |
| Set device options. | |
| -bool | setOption (DeviceOption o, bool yes=true) |
| Set device option "o" to "yes" and return previous state. | |
| -DeviceInfoFlags | infoFlags () const |
| Returns device characteristic flags. | |
| -PIString | path () const |
| Current path of device. | |
| -void | setPath (const PIString &path) |
| Set path of device. | |
| -bool | isReadable () const |
| Return true if mode is ReadOnly or ReadWrite. | |
| -bool | isWriteable () const |
| Return true if mode is WriteOnly or ReadWrite. | |
| -bool | isOpened () const |
| Return true if device is successfully opened. | |
| -bool | isClosed () const |
| Return true if device is closed. | |
| -virtual bool | canRead () const |
| Return true if device can read now. | |
| -virtual bool | canWrite () const |
| Return true if device can write now. | |
| -void | setReopenEnabled (bool yes=true) |
| Set execution of open enabled while threaded read on closed device. | |
| -void | setReopenTimeout (int msecs) |
| Set timeout in milliseconds between open tryings if reopen is enabled. | |
| -bool | isReopenEnabled () const |
| Return reopen enable. | |
| -int | reopenTimeout () |
| Return reopen timeout. | |
| void | setThreadedReadSlot (ReadRetFunc func) |
| Set "threaded read slot". More... | |
| -void | setThreadedReadData (void *d) |
| Set custom data that will be passed to "threaded read slot". | |
| void | setThreadedReadBufferSize (int new_size) |
| Set size of threaded read buffer. More... | |
| -int | threadedReadBufferSize () const |
| Return size of threaded read buffer. | |
| -const uchar * | threadedReadBuffer () const |
| Return content of threaded read buffer. | |
| -void * | threadedReadData () const |
| Return custom data that will be passed to "threaded read slot". | |
| -bool | isThreadedRead () const |
| Return true if threaded read is started. | |
| -void | startThreadedRead () |
| Start threaded read. | |
| -void | startThreadedRead (ReadRetFunc func) |
| Start threaded read and assign "threaded read slot" to "func". | |
| -void | stopThreadedRead () |
| Stop threaded read. | |
| -bool | isThreadedWrite () const |
| Return true if threaded write is started. | |
| -void | startThreadedWrite () |
| Start threaded write. | |
| -void | stopThreadedWrite () |
| Stop threaded write. | |
| -void | clearThreadedWriteQueue () |
| Clear threaded write task queue. | |
| -void | start () |
| Start both threaded read and threaded write. | |
| -void | stop (bool wait=false) |
| Stop both threaded read and threaded write and if "wait" block until both threads are stop. | |
| -int | read (void *read_to, int max_size) |
| Read from device maximum "max_size" bytes to "read_to". | |
| -PIByteArray | read (int max_size) |
| Read from device maximum "max_size" bytes and return them as PIByteArray. | |
| -int | write (const void *data, int max_size) |
| Write maximum "max_size" bytes of "data" to device. | |
| -PIByteArray | readForTime (double timeout_ms) |
| Read from device for "timeout_ms" milliseconds and return readed data as PIByteArray. Timeout should to be greater than 0. | |
| -ullong | writeThreaded (const void *data, int max_size) |
| Add task to threaded write queue and return task ID. | |
| -ullong | writeThreaded (const PIByteArray &data) |
| Add task to threaded write queue and return task ID. | |
| -bool | configure (const PIString &config_file, const PIString §ion, bool parent_section=false) |
| Configure device from section "section" of file "config_file", if "parent_section" parent section also will be read. | |
| -virtual PIString | fullPathPrefix () const |
| Reimplement to construct full unambiguous string prefix. Creating devices by unambiguous string. | |
| -PIString | constructFullPath () const |
| Reimplement to construct full unambiguous string, describes this device, default returns fullPathPrefix() + "://" + path() | |
| -void | configureFromFullPath (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
Public Member Functions inherited from PIThread | |
| - | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| - | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| -void | setData (void *d) |
| Set common data passed to external function. | |
| -void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| -void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| -void * | data () const |
| Returns common data passed to external function. | |
| -PIThread::Priority | priority () const |
| Return priority of thread. | |
| -bool | isRunning () const |
Return true if thread is running. | |
| -void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| -PIMutex & | mutex () |
| Returns internal mutex. | |
| -llong | tid () const |
| Returns thread ID. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| -void | lock () |
| Lock internal mutex. | |
| -void | unlock () |
| Unlock internal mutex. | |
| -void | started () |
| Raise on thread start. | |
| -void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Static Public Member Functions | |
| static PIIODevice * | createFromFullPath (const PIString &full_path) |
| Try to determine suitable device, create new one, configure it with configureFromFullPath() and returns it. More... | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
-Protected Member Functions | |
| -virtual bool | init () |
| Function executed before first openDevice() or from constructor. | |
| -virtual bool | configureDevice (const void *e_main, const void *e_parent=0) |
| Reimplement to configure device from entries "e_main" and "e_parent", cast arguments to PIConfig::Entry*. | |
| -virtual bool | openDevice ()=0 |
| Reimplement to open device, return value will be set to "opened_" variable; don't call this function in subclass, use open() | |
| -virtual bool | closeDevice () |
| Reimplement to close device, inverse return value will be set to "opened_" variable. | |
| -virtual int | readDevice (void *read_to, int max_size) |
| Reimplement this function to read from your device. | |
| -virtual int | writeDevice (const void *data, int max_size) |
| Reimplement this function to write to your device. | |
| -virtual bool | threadedRead (uchar *readed, int size) |
| Function executed when thread read some data, default implementation execute external slot "ret_func_". | |
| -virtual PIString | constructFullPathDevice () const |
| Reimplement to construct full unambiguous string, describes this device. Default implementation returns path() | |
| -virtual void | configureFromFullPathDevice (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -virtual void | optionsChanged () |
| Reimplement to apply new device options. | |
| -virtual DeviceInfoFlags | deviceInfoFlags () const |
| Reimplement to return correct DeviceInfoFlags. Default implementation returns 0. | |
| -virtual void | threadedReadBufferSizeChanged () |
| Reimplement to apply new threadedReadBufferSize() | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
-Related Functions | |
(Note that these are not member functions.) - | |
| template<typename T > | |
| T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) |
| Service function. useful for configuring devices. More... | |
| -#define | REGISTER_DEVICE(class) |
| Use this macro to enable automatic creation instances of your class with createFromFullPath() function. | |
| -#define | PIIODEVICE(class) |
| Use this macro instead of PIOBJECT when describe your own PIIODevice. | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
-Handlers | |
| -bool | open () |
| Open device. | |
| -bool | open (const PIString &_path) |
| Open device with path "path". | |
| -bool | close () |
| Close device. | |
| -int | write (PIByteArray data) |
| Write "data" to device. | |
-Virtual handlers | |
| -virtual void | flush () |
| Immediate write all buffers. | |
-Events | |
| -void | opened () |
| Raise if succesfull open. | |
| -void | closed () |
| Raise if succesfull close. | |
| -void | threadedReadEvent (uchar *readed, int size) |
| Raise if read thread succesfull read some data. | |
| -void | threadedWriteEvent (ullong id, int written_size) |
| Raise if write thread successfull write some data of task with ID "id". | |
-Configurable parameters | |
| -bool | reopenEnabled |
| setReopenEnabled, default "true" | |
| -int | reopenTimeout |
| setReopenTimeout in ms, default 1000 | |
| -int | threadedReadBufferSize |
| setThreadedReadBufferSize in bytes, default 4096 | |
Base class for input/output classes.
-This class provide open/close logic, threaded read/write and virtual input/output functions read() and write(). You should implement pure virtual function openDevice() in your subclass.
-PIIODevice have boolean variable indicated open status. Returns of functions openDevice() and closeDevice() change this variable.
-PIIODevice based on PIThread, so it`s overload run() to exec read() in background thread. If read is successful virtual function threadedRead() is executed. Default implementation of this function execute external static function set by setThreadedReadSlot() with data set by setThreadedReadData(). Extrenal static function should have format
-bool func_name(void * Threaded_read_data, uchar * readed_data, int readed_size)
-Threaded read starts with function startThreadedRead().
PIIODevice aggregate another PIThread to perform a threaded write by function writeThreaded(). This function add task to internal queue and return queue entry ID. You should start write thread by function startThreadedWrite. On successful write event threadedWriteEvent is raised with two arguments - task ID and written bytes count.
-PIIODevice have internal buffer for threaded read, and threadedRead() function receive pointer to this buffer in first argument. You can adjust size of this buffer by function setThreadedReadBufferSize()
-Default size of this buffer is 4096 bytes.
When threaded read is begin its call open() if device is closed. While threaded read running PIIODevice check if device opened every read and if not call open() every reopen timeout if reopen enabled. Reopen timeout is set by setReopenTimeout(), reopen enable is set by setReopenEnabled().
-This is virtual function configureDevice() which executes when configure() executes. This function takes two arguments: "e_main" and "e_parent" as void*. There are pointers to PIConfig::Entry entries of section "section" and their parent. If there is no parent "e_parent" = 0. Function configure() set three parameters of device: "reopenEnabled", "reopenTimeout" and "threadedReadBufferSize", then execute function configureDevice().
- Each ancestor of PIIODevice reimlements configureDevice() function to be able to be confured from configuration file. This parameters described at section "Configurable parameters" in the class reference.
- Usage example:
Implementation example:
There are some virtual functions to describe child class without its declaration.
- fullPathPrefix() should returns unique prefix of device
- constructFullPath() should returns full unambiguous string, contains prefix and all device parameters
- configureFromFullPath() provide configuring device from full unambiguous string without prefix and "://"
- Macro PIIODEVICE should be used instead of PIOBJECT
- Macro REGISTER_DEVICE should be used after definition of class, i.e. at the last line of *.cpp file
-
- If custom I/O device corresponds there rules, it can be returned by function createFromFullPath().
- Each PIP I/O device has custom unambiguous string description:
| enum PIIODevice::DeviceMode | -
Open modes for PIIODevice.
-| Enumerator | |
|---|---|
| ReadOnly | Device can only read - |
| WriteOnly | Device can only write - |
| ReadWrite | Device can both read and write - |
| enum PIIODevice::DeviceOption | -
Options for PIIODevice, works with some devices.
-| Enumerator | |
|---|---|
| BlockingRead | read block until data is received, default off - |
| BlockingWrite | write block until data is sent, default off - |
| enum PIIODevice::DeviceInfoFlag | -
Characteristics of PIIODevice subclass.
-| Enumerator | |
|---|---|
| Sequential | Continuous channel - |
| Reliable | Channel is safe - |
-
|
- -explicit | -
Constructs a PIIODevice with path and mode.
-| path | path to device |
| type | mode for open |
-
|
- -inline | -
Set "threaded read slot".
-Set external static function of threaded read that will be executed at every successful threaded read. Function should have format "bool func(void * data, uchar * readed, int size)"
- -
-
|
- -inline | -
Set size of threaded read buffer.
-Default size is 4096 bytes. If your device can read at single read more than 4096 bytes you should use this function to adjust buffer size
- -
-
|
- -static | -
Try to determine suitable device, create new one, configure it with configureFromFullPath() and returns it.
-To function configureFromFullPath() "full_path" passed without fullPathPrefix() + "://". See Creating devices by unambiguous string
- -
-
|
- -related | -
Service function. useful for configuring devices.
-Function takes entry name "name", default value "def" and two PIConfig::Entry sections: "em" and their parent "ep". If there is no parent ep = 0. If "ep" is not null and entry "name" exists in "ep" function returns this value. Else returns value of entry "name" in section "em" or "def" if entry doesn`t exists.
- This function useful to read settings from configuration file in implementation PIIODevice::configureDevice() function
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIIOString, including all inherited members.
-| BlockingRead enum value | PIIODevice | |
| BlockingWrite enum value | PIIODevice | |
| canRead() const | PIIODevice | inlinevirtual |
| canWrite() const | PIIODevice | inlinevirtual |
| className() const | PIObject | inlinevirtual |
| clear() | PIIOString | inline |
| clearThreadedWriteQueue() | PIIODevice | inline |
| close() | PIIODevice | inline |
| closed() | PIIODevice | |
| closeDevice() | PIIODevice | inlineprotectedvirtual |
| configure(const PIString &config_file, const PIString §ion, bool parent_section=false) | PIIODevice | |
| configureDevice(const void *e_main, const void *e_parent=0) | PIIODevice | inlineprotectedvirtual |
| configureFromFullPath(const PIString &full_path) | PIIODevice | |
| configureFromFullPathDevice(const PIString &full_path) | PIIODevice | inlineprotectedvirtual |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| CONNECTU_QUEUED | PIObject | related |
| constructFullPath() const | PIIODevice | |
| constructFullPathDevice() const | PIIODevice | inlineprotectedvirtual |
| createFromFullPath(const PIString &full_path) | PIIODevice | static |
| data() const | PIThread | inline |
| debug() const | PIObject | inline |
| deleted() | PIObject | protected |
| DeviceInfoFlag enum name | PIIODevice | |
| deviceInfoFlags() const | PIIOString | inlineprotectedvirtual |
| DeviceMode enum name | PIIODevice | |
| DeviceOption enum name | PIIODevice | |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlinestatic |
| flush() | PIIODevice | inlinevirtual |
| fullPathPrefix() const | PIIODevice | inlinevirtual |
| HANDLER | PIObject | related |
| infoFlags() const | PIIODevice | inline |
| init() | PIIODevice | inlineprotectedvirtual |
| isClosed() const | PIIODevice | inline |
| isEnd() const | PIIOString | inline |
| isOpened() const | PIIODevice | inline |
| isOptionSet(DeviceOption o) const | PIIODevice | inline |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isReadable() const | PIIODevice | inline |
| isReopenEnabled() const | PIIODevice | inline |
| isRunning() const | PIThread | inline |
| isThreadedRead() const | PIIODevice | inline |
| isThreadedWrite() const | PIIODevice | inline |
| isWriteable() const | PIIODevice | inline |
| lock() | PIThread | inline |
| mode() const | PIIODevice | inline |
| mutex() | PIThread | inline |
| name() const | PIObject | inline |
| needLockRun(bool need) | PIThread | inline |
| open(PIString *string, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) | PIIOString | |
| open(const PIString &string) | PIIOString | |
| PIIODevice::open() | PIIODevice | inline |
| openDevice() | PIIOString | protectedvirtual |
| opened() | PIIODevice | |
| options() const | PIIODevice | inline |
| optionsChanged() | PIIODevice | inlineprotectedvirtual |
| parentClassName() const | PIObject | inlinevirtual |
| path() const | PIIODevice | inline |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| piHigh enum value | PIThread | |
| piHighest enum value | PIThread | |
| PIIODevice() | PIIODevice | explicit |
| PIIODevice(const PIString &path, DeviceMode mode=ReadWrite) | PIIODevice | explicit |
| PIIODEVICE | PIIODevice | related |
| PIIOString(PIString *string=0, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) | PIIOString | explicit |
| PIIOString(const PIString &string) | PIIOString | explicit |
| piLow enum value | PIThread | |
| piLowerst enum value | PIThread | |
| piNormal enum value | PIThread | |
| PIObject(const PIString &name=PIString()) | PIObject | explicit |
| PIOBJECT | PIObject | related |
| PIOBJECT_SUBCLASS | PIObject | related |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | |
| Priority enum name | PIThread | |
| priority() const | PIThread | inline |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| read(void *read_to, int max_size) | PIIODevice | inline |
| read(int max_size) | PIIODevice | inline |
| readDevice(void *read_to, int max_size) | PIIOString | protectedvirtual |
| readDeviceSetting(const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) | PIIODevice | related |
| readForTime(double timeout_ms) | PIIODevice | |
| readLine() | PIIOString | |
| ReadOnly enum value | PIIODevice | |
| ReadWrite enum value | PIIODevice | |
| REGISTER_DEVICE | PIIODevice | related |
| Reliable enum value | PIIODevice | |
| reopenEnabled | PIIODevice | |
| reopenTimeout | PIIODevice | |
| reopenTimeout() | PIIODevice | inline |
| seek(llong position) | PIIOString | inline |
| seekToBegin() | PIIOString | inline |
| seekToEnd() | PIIOString | inline |
| Sequential enum value | PIIODevice | |
| setData(void *d) | PIThread | inline |
| setDebug(bool debug) | PIObject | inline |
| setMode(DeviceMode m) | PIIODevice | inline |
| setName(const PIString &name) | PIObject | inline |
| setOption(DeviceOption o, bool yes=true) | PIIODevice | |
| setOptions(DeviceOptions o) | PIIODevice | |
| setPath(const PIString &path) | PIIODevice | inline |
| setPriority(PIThread::Priority prior) | PIThread | |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setReopenEnabled(bool yes=true) | PIIODevice | inline |
| setReopenTimeout(int msecs) | PIIODevice | inline |
| setSlot(ThreadFunc func) | PIThread | inline |
| setThreadedReadBufferSize(int new_size) | PIIODevice | inline |
| setThreadedReadData(void *d) | PIIODevice | inline |
| setThreadedReadSlot(ReadRetFunc func) | PIIODevice | inline |
| start() | PIIODevice | inline |
| PIThread::start(int timer_delay) | PIThread | |
| started() | PIThread | |
| startOnce() | PIThread | |
| startOnce(ThreadFunc func) | PIThread | inline |
| startThreadedRead() | PIIODevice | inline |
| startThreadedRead(ReadRetFunc func) | PIIODevice | inline |
| startThreadedWrite() | PIIODevice | inline |
| stop(bool wait=false) | PIIODevice | inline |
| stopped() | PIThread | |
| stopThreadedRead() | PIIODevice | inline |
| stopThreadedWrite() | PIIODevice | inline |
| string() const | PIIOString | inline |
| threadedRead(uchar *readed, int size) | PIIODevice | protectedvirtual |
| threadedReadBuffer() const | PIIODevice | inline |
| threadedReadBufferSize | PIIODevice | |
| threadedReadBufferSize() const | PIIODevice | inline |
| threadedReadBufferSizeChanged() | PIIODevice | inlineprotectedvirtual |
| threadedReadData() const | PIIODevice | inline |
| threadedReadEvent(uchar *readed, int size) | PIIODevice | |
| threadedWriteEvent(ullong id, int written_size) | PIIODevice | |
| tid() const | PIThread | inline |
| unlock() | PIThread | inline |
| waitForFinish(int timeout_msecs) | PIThread | |
| waitForStart(int timeout_msecs) | PIThread | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
| write(const void *data, int max_size) | PIIODevice | inline |
| write(PIByteArray data) | PIIODevice | inline |
| writeDevice(const void *data, int max_size) | PIIOString | protectedvirtual |
| WriteOnly enum value | PIIODevice | |
| writeString(const PIString &string) | PIIOString | |
| writeThreaded(const void *data, int max_size) | PIIODevice | inline |
| writeThreaded(const PIByteArray &data) | PIIODevice |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
PIIODevice wrapper around PIString. - More...
-
-Public Member Functions | |
| - | PIIOString (PIString *string=0, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) |
| Contructs PIIOString with "string" content and "mode" open mode. | |
| - | PIIOString (const PIString &string) |
| Contructs PIIOString with "string" content only for read. | |
| -PIString * | string () const |
| Returns content. | |
| -void | clear () |
| Clear content string. | |
| -bool | open (PIString *string, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) |
| Open "string" content with "mode" open mode. | |
| -bool | open (const PIString &string) |
| Open "string" content only for read. | |
| -bool | isEnd () const |
| Returns if position is at the end of content. | |
| -void | seek (llong position) |
| Move read/write position to "position". | |
| -void | seekToBegin () |
| Move read/write position to the begin of the string. | |
| -void | seekToEnd () |
| Move read/write position to the end of the string. | |
| -PIString | readLine () |
| Read one text line and return it. | |
| -int | writeString (const PIString &string) |
| Insert string "string" into content at current position. | |
Public Member Functions inherited from PIIODevice | |
| - | PIIODevice () |
| Constructs a empty PIIODevice. | |
| PIIODevice (const PIString &path, DeviceMode mode=ReadWrite) | |
| Constructs a PIIODevice with path and mode. More... | |
| -DeviceMode | mode () const |
| Current open mode of device. | |
| -void | setMode (DeviceMode m) |
| Set open mode of device. | |
| -DeviceOptions | options () const |
| Current device options. | |
| -bool | isOptionSet (DeviceOption o) const |
| Current device option "o" state. | |
| -void | setOptions (DeviceOptions o) |
| Set device options. | |
| -bool | setOption (DeviceOption o, bool yes=true) |
| Set device option "o" to "yes" and return previous state. | |
| -DeviceInfoFlags | infoFlags () const |
| Returns device characteristic flags. | |
| -PIString | path () const |
| Current path of device. | |
| -void | setPath (const PIString &path) |
| Set path of device. | |
| -bool | isReadable () const |
| Return true if mode is ReadOnly or ReadWrite. | |
| -bool | isWriteable () const |
| Return true if mode is WriteOnly or ReadWrite. | |
| -bool | isOpened () const |
| Return true if device is successfully opened. | |
| -bool | isClosed () const |
| Return true if device is closed. | |
| -virtual bool | canRead () const |
| Return true if device can read now. | |
| -virtual bool | canWrite () const |
| Return true if device can write now. | |
| -void | setReopenEnabled (bool yes=true) |
| Set execution of open enabled while threaded read on closed device. | |
| -void | setReopenTimeout (int msecs) |
| Set timeout in milliseconds between open tryings if reopen is enabled. | |
| -bool | isReopenEnabled () const |
| Return reopen enable. | |
| -int | reopenTimeout () |
| Return reopen timeout. | |
| void | setThreadedReadSlot (ReadRetFunc func) |
| Set "threaded read slot". More... | |
| -void | setThreadedReadData (void *d) |
| Set custom data that will be passed to "threaded read slot". | |
| void | setThreadedReadBufferSize (int new_size) |
| Set size of threaded read buffer. More... | |
| -int | threadedReadBufferSize () const |
| Return size of threaded read buffer. | |
| -const uchar * | threadedReadBuffer () const |
| Return content of threaded read buffer. | |
| -void * | threadedReadData () const |
| Return custom data that will be passed to "threaded read slot". | |
| -bool | isThreadedRead () const |
| Return true if threaded read is started. | |
| -void | startThreadedRead () |
| Start threaded read. | |
| -void | startThreadedRead (ReadRetFunc func) |
| Start threaded read and assign "threaded read slot" to "func". | |
| -void | stopThreadedRead () |
| Stop threaded read. | |
| -bool | isThreadedWrite () const |
| Return true if threaded write is started. | |
| -void | startThreadedWrite () |
| Start threaded write. | |
| -void | stopThreadedWrite () |
| Stop threaded write. | |
| -void | clearThreadedWriteQueue () |
| Clear threaded write task queue. | |
| -void | start () |
| Start both threaded read and threaded write. | |
| -void | stop (bool wait=false) |
| Stop both threaded read and threaded write and if "wait" block until both threads are stop. | |
| -int | read (void *read_to, int max_size) |
| Read from device maximum "max_size" bytes to "read_to". | |
| -PIByteArray | read (int max_size) |
| Read from device maximum "max_size" bytes and return them as PIByteArray. | |
| -int | write (const void *data, int max_size) |
| Write maximum "max_size" bytes of "data" to device. | |
| -PIByteArray | readForTime (double timeout_ms) |
| Read from device for "timeout_ms" milliseconds and return readed data as PIByteArray. Timeout should to be greater than 0. | |
| -ullong | writeThreaded (const void *data, int max_size) |
| Add task to threaded write queue and return task ID. | |
| -ullong | writeThreaded (const PIByteArray &data) |
| Add task to threaded write queue and return task ID. | |
| -bool | configure (const PIString &config_file, const PIString §ion, bool parent_section=false) |
| Configure device from section "section" of file "config_file", if "parent_section" parent section also will be read. | |
| -virtual PIString | fullPathPrefix () const |
| Reimplement to construct full unambiguous string prefix. Creating devices by unambiguous string. | |
| -PIString | constructFullPath () const |
| Reimplement to construct full unambiguous string, describes this device, default returns fullPathPrefix() + "://" + path() | |
| -void | configureFromFullPath (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -bool | open () |
| Open device. | |
| -bool | open (const PIString &_path) |
| Open device with path "path". | |
| -bool | close () |
| Close device. | |
| -int | write (PIByteArray data) |
| Write "data" to device. | |
| -virtual void | flush () |
| Immediate write all buffers. | |
| -void | opened () |
| Raise if succesfull open. | |
| -void | closed () |
| Raise if succesfull close. | |
| -void | threadedReadEvent (uchar *readed, int size) |
| Raise if read thread succesfull read some data. | |
| -void | threadedWriteEvent (ullong id, int written_size) |
| Raise if write thread successfull write some data of task with ID "id". | |
Public Member Functions inherited from PIThread | |
| - | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| - | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| -void | setData (void *d) |
| Set common data passed to external function. | |
| -void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| -void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| -void * | data () const |
| Returns common data passed to external function. | |
| -PIThread::Priority | priority () const |
| Return priority of thread. | |
| -bool | isRunning () const |
Return true if thread is running. | |
| -void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| -PIMutex & | mutex () |
| Returns internal mutex. | |
| -llong | tid () const |
| Returns thread ID. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| -void | lock () |
| Lock internal mutex. | |
| -void | unlock () |
| Unlock internal mutex. | |
| -void | started () |
| Raise on thread start. | |
| -void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Protected Member Functions | |
| -bool | openDevice () |
| Reimplement to open device, return value will be set to "opened_" variable; don't call this function in subclass, use open() | |
| -int | readDevice (void *read_to, int max_size) |
| Reimplement this function to read from your device. | |
| -int | writeDevice (const void *data, int max_size) |
| Reimplement this function to write to your device. | |
| -DeviceInfoFlags | deviceInfoFlags () const |
| Reimplement to return correct DeviceInfoFlags. Default implementation returns 0. | |
Protected Member Functions inherited from PIIODevice | |
| -virtual bool | init () |
| Function executed before first openDevice() or from constructor. | |
| -virtual bool | configureDevice (const void *e_main, const void *e_parent=0) |
| Reimplement to configure device from entries "e_main" and "e_parent", cast arguments to PIConfig::Entry*. | |
| -virtual bool | closeDevice () |
| Reimplement to close device, inverse return value will be set to "opened_" variable. | |
| -virtual bool | threadedRead (uchar *readed, int size) |
| Function executed when thread read some data, default implementation execute external slot "ret_func_". | |
| -virtual PIString | constructFullPathDevice () const |
| Reimplement to construct full unambiguous string, describes this device. Default implementation returns path() | |
| -virtual void | configureFromFullPathDevice (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -virtual void | optionsChanged () |
| Reimplement to apply new device options. | |
| -virtual void | threadedReadBufferSizeChanged () |
| Reimplement to apply new threadedReadBufferSize() | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
-Additional Inherited Members | |
Public Types inherited from PIIODevice | |
| enum | DeviceMode { ReadOnly = 0x01, -WriteOnly = 0x02, -ReadWrite = 0x03 - } |
| Open modes for PIIODevice. More... | |
| enum | DeviceOption { BlockingRead = 0x01, -BlockingWrite = 0x02 - } |
| Options for PIIODevice, works with some devices. More... | |
| enum | DeviceInfoFlag { Sequential = 0x01, -Reliable = 0x02 - } |
| Characteristics of PIIODevice subclass. More... | |
Public Types inherited from PIThread | |
| enum | Priority { - piLowerst, -piLow, -piNormal, -piHigh, - - piHighest - - } |
| Priority of thread. More... | |
Static Public Member Functions inherited from PIIODevice | |
| static PIIODevice * | createFromFullPath (const PIString &full_path) |
| Try to determine suitable device, create new one, configure it with configureFromFullPath() and returns it. More... | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Public Attributes inherited from PIIODevice | |
| -bool | reopenEnabled |
| setReopenEnabled, default "true" | |
| -int | reopenTimeout |
| setReopenTimeout in ms, default 1000 | |
| -int | threadedReadBufferSize |
| setThreadedReadBufferSize in bytes, default 4096 | |
Related Functions inherited from PIIODevice | |
| template<typename T > | |
| T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) |
| Service function. useful for configuring devices. More... | |
| -#define | REGISTER_DEVICE(class) |
| Use this macro to enable automatic creation instances of your class with createFromFullPath() function. | |
| -#define | PIIODEVICE(class) |
| Use this macro instead of PIOBJECT when describe your own PIIODevice. | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
PIIODevice wrapper around PIString.
-This class allow you to use PIString as PIIODevice and pass it to, e.g. PIConfig
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIKbdListener, including all inherited members.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Keyboard console input listener. - More...
-
-Classes | |
| struct | KeyEvent |
| This struct contains information about pressed keyboard key. More... | |
| struct | MouseEvent |
| This struct contains information about mouse action. More... | |
| struct | WheelEvent |
| This struct contains information about mouse wheel action. More... | |
-Public Types | |
| enum | SpecialKey { - Tab = 0x09, -Return = 0x0a, -Esc = 0x1b, -Space = 0x20, - - Backspace = 0x7f, -UpArrow = -1, -DownArrow = -2, -RightArrow = -3, - - LeftArrow = -4, -Home = -5, -End = -6, -PageUp = -7, - - PageDown = -8, -Insert = -9, -Delete = -10, -F1 = -11, - - F2 = -12, -F3 = -13, -F4 = -14, -F5 = -15, - - F6 = -16, -F7 = -17, -F8 = -18, -F9 = -19, - - F10 = -20, -F11 = -21, -F12 = -22 - - } |
| Special keyboard keys. More... | |
| enum | KeyModifier { Ctrl = 0x1, -Shift = 0x2, -Alt = 0x4 - } |
| Keyboard modifiers. More... | |
| enum | MouseButton { MouseLeft = 0x01, -MouseRight = 0x02, -MouseMiddle = 0x04 - } |
| Mouse buttons. More... | |
| enum | MouseAction { - MouseButtonPress, -MouseButtonRelease, -MouseButtonDblClick, -MouseMove, - - MouseWheel - - } |
| Mouse actions. More... | |
Public Types inherited from PIThread | |
| enum | Priority { - piLowerst, -piLow, -piNormal, -piHigh, - - piHighest - - } |
| Priority of thread. More... | |
-Public Member Functions | |
| - | PIKbdListener (KBFunc slot=0, void *data=0, bool startNow=true) |
| Constructs keyboard listener with external function "slot" and custom data "data". | |
| -void * | data () |
| Returns custom data. | |
| -void | setData (void *_data) |
| Set custom data to "_data". | |
| -void | setSlot (KBFunc slot) |
| Set external function to "slot". | |
| -bool | exitCaptured () const |
| Returns if exit key if awaiting. | |
| -int | exitKey () const |
| Returns exit key, default 'Q'. | |
| -bool | isActive () |
| Returns if keyboard listening is active (not running!) | |
Public Member Functions inherited from PIThread | |
| - | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| - | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| -void | setData (void *d) |
| Set common data passed to external function. | |
| -void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| -void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| -void * | data () const |
| Returns common data passed to external function. | |
| -PIThread::Priority | priority () const |
| Return priority of thread. | |
| -bool | isRunning () const |
Return true if thread is running. | |
| -void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| -PIMutex & | mutex () |
| Returns internal mutex. | |
| -llong | tid () const |
| Returns thread ID. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| -void | lock () |
| Lock internal mutex. | |
| -void | unlock () |
| Unlock internal mutex. | |
| -void | started () |
| Raise on thread start. | |
| -void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Handlers | |
| -void | enableExitCapture (int key) |
| Enable exit key "key" awaiting. | |
| -void | disableExitCapture () |
| Disable exit key awaiting. | |
| -void | setActive (bool yes) |
| Set keyboard listening is active or not. | |
-Events | |
| -void | keyPressed (PIKbdListener::KeyEvent key, void *data) |
| Raise on key "key" pressed, "data" is custom data. | |
-Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Keyboard console input listener.
-This class provide listening of console keyboard input. There is two ways to receive pressed key:
Also there is static variable exiting which by default is set to false. If enableExitCapture() was called and listener was started with function start(), this variable will be set to true if exit key will be pressed. By default exit key is 'Q' = shift + 'q'. To wait for this variable changes to true there is WAIT_FOR_EXIT macro
| enum PIKbdListener::SpecialKey | -
Special keyboard keys.
-| enum PIKbdListener::KeyModifier | -
| enum PIKbdListener::MouseButton | -
| enum PIKbdListener::MouseAction | -
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Mutex. - More...
--Public Member Functions | |
| - | PIMutex () |
| Constructs unlocked mutex. | |
| - | ~PIMutex () |
| Destroy mutex. | |
| void | lock () |
| Lock mutex. More... | |
| void | unlock () |
| Unlock mutex. More... | |
| bool | tryLock () |
| Try to lock mutex. More... | |
| -bool | isLocked () const |
| Returns if mutex is locked. | |
Mutex.
-PIMutex provides synchronization blocks between several threads. Using mutex guarantees execution of some code only one of threads. Mutex contains logic state and functions to change it: lock(), unlock() and tryLock().
-Block of code that should to be executed only one thread simultaniously should to be started with lock() and ended with unlock().
"mutex" in this example is one for all threads.
-| void PIMutex::lock | -( | -) | -- |
Lock mutex.
-If mutex is unlocked it set to locked state and returns immediate. If mutex is already locked function blocks until mutex will be unlocked
- -| void PIMutex::unlock | -( | -) | -- |
Unlock mutex.
-In any case this function returns immediate
- -| bool PIMutex::tryLock | -( | -) | -- |
Try to lock mutex.
-If mutex is unlocked it set to locked state and returns "true" immediate. If mutex is already locked function returns immediate an returns "false"
- -|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIObject, including all inherited members.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is base class for any classes which use events -> handlers mechanism. - More...
-
-Public Member Functions | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Static Public Member Functions | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
-Protected Member Functions | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
-Related Functions | |
(Note that these are not member functions.) - | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
-Events | |
| void | deleted () |
| Raise before object delete. More... | |
This is base class for any classes which use events -> handlers mechanism.
-PIObject provide notification mechanism similar Qt but implemented on language capabilities without any special preprocessors or compilers. Any class inherits PIObject should use macro PIOBJECT() immediate after declaration to proper compile.
-Event is a some abstract event that can be raised at any time. Event is a function but declared with special macro EVENT(). To raise event simply execute event function.
-Event handler is a function but declared with special macro EVENT_HANDLER(). You can use event handlers as ordinary functions.
-Main goal of this mechanism is perform abstract connections between various objects. This functionality provide macro CONNECT() which connect some event of first object to some event handler or event of second object. Each event can be connected any times to any event handlers.
-
-Example:
Result:
-
|
- -protected | -
Raise before object delete.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIPacketExtractor, including all inherited members.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Packets extractor. - More...
-
-Public Types | |
| enum | SplitMode { - None, -Header, -Footer, -HeaderAndFooter, - - Size, -Timeout - - } |
| Extract algorithms. More... | |
Public Types inherited from PIIODevice | |
| enum | DeviceMode { ReadOnly = 0x01, -WriteOnly = 0x02, -ReadWrite = 0x03 - } |
| Open modes for PIIODevice. More... | |
| enum | DeviceOption { BlockingRead = 0x01, -BlockingWrite = 0x02 - } |
| Options for PIIODevice, works with some devices. More... | |
| enum | DeviceInfoFlag { Sequential = 0x01, -Reliable = 0x02 - } |
| Characteristics of PIIODevice subclass. More... | |
Public Types inherited from PIThread | |
| enum | Priority { - piLowerst, -piLow, -piNormal, -piHigh, - - piHighest - - } |
| Priority of thread. More... | |
-Public Member Functions | |
| - | PIPacketExtractor (PIIODevice *device_=0, SplitMode mode=None) |
| Contructs extractor with child device "device_" and extract algorithm "mode". | |
| -PIIODevice * | device () |
| Returns child device. | |
| -void | setDevice (PIIODevice *device_) |
| Set child device to "device_". | |
| -int | bufferSize () const |
| Returns buffer size. | |
| -void | setBufferSize (int new_size) |
| Set buffer size to "new_size" bytes, should be at least greater than whole packet size. | |
| -void | setSplitMode (SplitMode mode) |
| Set extract algorithm. | |
| -void | setPayloadSize (int size) |
| Set payload size, used for PIPacketExtractor::Header and PIPacketExtractor::Footer algorithms. | |
| -void | setHeader (const PIByteArray &data) |
| Set header data, used for PIPacketExtractor::Header and PIPacketExtractor::HeaderAndFooter algorithms. | |
| -void | setFooter (const PIByteArray &data) |
| Set footer data, used for PIPacketExtractor::Footer and PIPacketExtractor::HeaderAndFooter algorithms. | |
| -void | setPacketSize (int size) |
| Set packet size, used for PIPacketExtractor::Size algorithm. | |
| -void | setTimeout (double msecs) |
| Set timeout in milliseconds, used for PIPacketExtractor::Timeout algorithm. | |
| -SplitMode | splitMode () const |
| Returns current extract algorithm. | |
| -int | payloadSize () const |
| Returns current payload size, used for PIPacketExtractor::Header and PIPacketExtractor::Footer algorithms. | |
| -PIByteArray | header () const |
| Returns current header data, used for PIPacketExtractor::Header and PIPacketExtractor::HeaderAndFooter algorithms. | |
| -PIByteArray | footer () const |
| Returns current footer data, used for PIPacketExtractor::Footer and PIPacketExtractor::HeaderAndFooter algorithms. | |
| -int | packetSize () const |
| Returns current packet size, used for PIPacketExtractor::Size algorithm. | |
| -double | timeout () const |
| Returns current timeout in milliseconds, used for PIPacketExtractor::Timeout algorithm. | |
| -ullong | missedBytes () const |
| Returns missed by validating functions bytes count. | |
| -const ullong * | missedBytes_ptr () const |
| Returns pointer to missedBytes() count. Useful for output to PIConsole. | |
Public Member Functions inherited from PIIODevice | |
| - | PIIODevice () |
| Constructs a empty PIIODevice. | |
| PIIODevice (const PIString &path, DeviceMode mode=ReadWrite) | |
| Constructs a PIIODevice with path and mode. More... | |
| -DeviceMode | mode () const |
| Current open mode of device. | |
| -void | setMode (DeviceMode m) |
| Set open mode of device. | |
| -DeviceOptions | options () const |
| Current device options. | |
| -bool | isOptionSet (DeviceOption o) const |
| Current device option "o" state. | |
| -void | setOptions (DeviceOptions o) |
| Set device options. | |
| -bool | setOption (DeviceOption o, bool yes=true) |
| Set device option "o" to "yes" and return previous state. | |
| -DeviceInfoFlags | infoFlags () const |
| Returns device characteristic flags. | |
| -PIString | path () const |
| Current path of device. | |
| -void | setPath (const PIString &path) |
| Set path of device. | |
| -bool | isReadable () const |
| Return true if mode is ReadOnly or ReadWrite. | |
| -bool | isWriteable () const |
| Return true if mode is WriteOnly or ReadWrite. | |
| -bool | isOpened () const |
| Return true if device is successfully opened. | |
| -bool | isClosed () const |
| Return true if device is closed. | |
| -virtual bool | canRead () const |
| Return true if device can read now. | |
| -virtual bool | canWrite () const |
| Return true if device can write now. | |
| -void | setReopenEnabled (bool yes=true) |
| Set execution of open enabled while threaded read on closed device. | |
| -void | setReopenTimeout (int msecs) |
| Set timeout in milliseconds between open tryings if reopen is enabled. | |
| -bool | isReopenEnabled () const |
| Return reopen enable. | |
| -int | reopenTimeout () |
| Return reopen timeout. | |
| void | setThreadedReadSlot (ReadRetFunc func) |
| Set "threaded read slot". More... | |
| -void | setThreadedReadData (void *d) |
| Set custom data that will be passed to "threaded read slot". | |
| void | setThreadedReadBufferSize (int new_size) |
| Set size of threaded read buffer. More... | |
| -int | threadedReadBufferSize () const |
| Return size of threaded read buffer. | |
| -const uchar * | threadedReadBuffer () const |
| Return content of threaded read buffer. | |
| -void * | threadedReadData () const |
| Return custom data that will be passed to "threaded read slot". | |
| -bool | isThreadedRead () const |
| Return true if threaded read is started. | |
| -void | startThreadedRead () |
| Start threaded read. | |
| -void | startThreadedRead (ReadRetFunc func) |
| Start threaded read and assign "threaded read slot" to "func". | |
| -void | stopThreadedRead () |
| Stop threaded read. | |
| -bool | isThreadedWrite () const |
| Return true if threaded write is started. | |
| -void | startThreadedWrite () |
| Start threaded write. | |
| -void | stopThreadedWrite () |
| Stop threaded write. | |
| -void | clearThreadedWriteQueue () |
| Clear threaded write task queue. | |
| -void | start () |
| Start both threaded read and threaded write. | |
| -void | stop (bool wait=false) |
| Stop both threaded read and threaded write and if "wait" block until both threads are stop. | |
| -int | read (void *read_to, int max_size) |
| Read from device maximum "max_size" bytes to "read_to". | |
| -PIByteArray | read (int max_size) |
| Read from device maximum "max_size" bytes and return them as PIByteArray. | |
| -int | write (const void *data, int max_size) |
| Write maximum "max_size" bytes of "data" to device. | |
| -PIByteArray | readForTime (double timeout_ms) |
| Read from device for "timeout_ms" milliseconds and return readed data as PIByteArray. Timeout should to be greater than 0. | |
| -ullong | writeThreaded (const void *data, int max_size) |
| Add task to threaded write queue and return task ID. | |
| -ullong | writeThreaded (const PIByteArray &data) |
| Add task to threaded write queue and return task ID. | |
| -bool | configure (const PIString &config_file, const PIString §ion, bool parent_section=false) |
| Configure device from section "section" of file "config_file", if "parent_section" parent section also will be read. | |
| -PIString | constructFullPath () const |
| Reimplement to construct full unambiguous string, describes this device, default returns fullPathPrefix() + "://" + path() | |
| -void | configureFromFullPath (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -bool | open () |
| Open device. | |
| -bool | open (const PIString &_path) |
| Open device with path "path". | |
| -bool | close () |
| Close device. | |
| -int | write (PIByteArray data) |
| Write "data" to device. | |
| -virtual void | flush () |
| Immediate write all buffers. | |
| -void | opened () |
| Raise if succesfull open. | |
| -void | closed () |
| Raise if succesfull close. | |
| -void | threadedReadEvent (uchar *readed, int size) |
| Raise if read thread succesfull read some data. | |
| -void | threadedWriteEvent (ullong id, int written_size) |
| Raise if write thread successfull write some data of task with ID "id". | |
Public Member Functions inherited from PIThread | |
| - | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| - | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| -void | setData (void *d) |
| Set common data passed to external function. | |
| -void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| -void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| -void * | data () const |
| Returns common data passed to external function. | |
| -PIThread::Priority | priority () const |
| Return priority of thread. | |
| -bool | isRunning () const |
Return true if thread is running. | |
| -void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| -PIMutex & | mutex () |
| Returns internal mutex. | |
| -llong | tid () const |
| Returns thread ID. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| -void | lock () |
| Lock internal mutex. | |
| -void | unlock () |
| Unlock internal mutex. | |
| -void | started () |
| Raise on thread start. | |
| -void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Protected Member Functions | |
| virtual bool | validateHeader (uchar *src, uchar *rec, int size) |
| Function to validate header. More... | |
| virtual bool | validateFooter (uchar *src, uchar *rec, int size) |
| Function to validate footer. More... | |
| virtual bool | validatePayload (uchar *rec, int size) |
| Function to validate payload. More... | |
Protected Member Functions inherited from PIIODevice | |
| -virtual bool | init () |
| Function executed before first openDevice() or from constructor. | |
| -virtual bool | configureDevice (const void *e_main, const void *e_parent=0) |
| Reimplement to configure device from entries "e_main" and "e_parent", cast arguments to PIConfig::Entry*. | |
| -virtual void | configureFromFullPathDevice (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -virtual void | optionsChanged () |
| Reimplement to apply new device options. | |
| -virtual void | threadedReadBufferSizeChanged () |
| Reimplement to apply new threadedReadBufferSize() | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| void | deleted () |
| Raise before object delete. More... | |
-Events | |
| -void | packetReceived (uchar *data, int size) |
| Raise on successfull packetValidate() function. | |
-Additional Inherited Members | |
Static Public Member Functions inherited from PIIODevice | |
| static PIIODevice * | createFromFullPath (const PIString &full_path) |
| Try to determine suitable device, create new one, configure it with configureFromFullPath() and returns it. More... | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Public Attributes inherited from PIIODevice | |
| -bool | reopenEnabled |
| setReopenEnabled, default "true" | |
| -int | reopenTimeout |
| setReopenTimeout in ms, default 1000 | |
| -int | threadedReadBufferSize |
| setThreadedReadBufferSize in bytes, default 4096 | |
Related Functions inherited from PIIODevice | |
| template<typename T > | |
| T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) |
| Service function. useful for configuring devices. More... | |
| -#define | REGISTER_DEVICE(class) |
| Use this macro to enable automatic creation instances of your class with createFromFullPath() function. | |
| -#define | PIIODEVICE(class) |
| Use this macro instead of PIOBJECT when describe your own PIIODevice. | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Packets extractor.
-This class implements packet recognition by various algorithms and custom validating from data stream. Stream is formed from child PIIODevice passed from contructor or with function setDevice().
-PIPacketExtractor works with child PIIODevice. read and write functions directly call child device functions. You should start threaded read of extractor (not child device) to proper work. Extractor read data from child device, try to detect packet from readed data and raise packetReceived() event on success.
-There are 6 algorithms:
-
There are three parameters:
Extractor can detect packet with compare your header with readed data. It is default implementation of function packetHeaderValidate(). If header validating passed, function packetValidate() will be called. If either of this function return false extractor shifts by one byte and takes next header. If both functions returns true extractor shifts by whole packet size.
-| enum PIPacketExtractor::SplitMode | -
Extract algorithms.
-| Enumerator | |
|---|---|
| None | No data processing - |
| Header | Detect packets with header() and following payloadSize() - |
| Footer | Detect packets with footer() and leading payloadSize() - |
| HeaderAndFooter | Detect packets with header() and footer() without payloadSize() - |
| Size | Detect packets with packetSize() - |
| Timeout | Wait for first read, then read for timeout() milliseconds - |
-
|
- -inlineprotectedvirtual | -
Function to validate header.
-| src | Your header content |
| rec | Received header |
| size | Header size |
Default implementation returns by-byte "src" with "rec" compare result
- -
-
|
- -inlineprotectedvirtual | -
Function to validate footer.
-| src | Your footer content |
| rec | Received footer |
| size | Footer size |
Default implementation returns by-byte "src" with "rec" compare result
- -
-
|
- -inlineprotectedvirtual | -
Function to validate payload.
-| rec | Received payload |
| size | payload size |
Default implementation returns true
- -|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIProcess, including all inherited members.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

-Additional Inherited Members | |
Public Types inherited from PIThread | |
| enum | Priority { - piLowerst, -piLow, -piNormal, -piHigh, - - piHighest - - } |
| Priority of thread. More... | |
Public Member Functions inherited from PIThread | |
| - | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| - | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| -void | setData (void *d) |
| Set common data passed to external function. | |
| -void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| -void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| -void * | data () const |
| Returns common data passed to external function. | |
| -PIThread::Priority | priority () const |
| Return priority of thread. | |
| -bool | isRunning () const |
Return true if thread is running. | |
| -void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| -PIMutex & | mutex () |
| Returns internal mutex. | |
| -llong | tid () const |
| Returns thread ID. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| -void | lock () |
| Lock internal mutex. | |
| -void | unlock () |
| Unlock internal mutex. | |
| -void | started () |
| Raise on thread start. | |
| -void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Protected Member Functions inherited from PIThread | |
| -virtual void | begin () |
| Function executed once at the start of thread. | |
| -virtual void | end () |
| Function executed once at the end of thread. | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
events: execStarted(PIString program) execFinished(PIString program, int exit_code)
-handlers: bool exec(const PIString & program) bool exec(const PIString & program, const PIString & arg1) bool exec(const PIString & program, const PIString & arg1, const PIString & arg2) bool exec(const PIString & program, const PIString & arg1, const PIString & arg2, const PIString & arg3) bool exec(const PIString & program, const PIStringList & args) void terminate() bool waitForFinish(int timeout_msecs = 60000)
-|
- PIP
- 1.7.1
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIProtocol, including all inherited members.
-|
- PIP
- 1.7.1
-
- Platform-Independent Primitives
- |
-
DEPRECATED. - More...
-
-Public Types | |
| enum | Quality { - Unknown = 1, -Failure = 2, -Bad = 3, -Average = 4, - - Good = 5 - - } |
| Connection quality. More... | |
-Public Member Functions | |
| - | PIProtocol () |
| Contructs an empty unconfigured protocol. | |
| PIProtocol (const PIString &config, const PIString &name, void *recHeaderPtr=0, int recHeaderSize=0, void *recDataPtr=0, int recDataSize=0, void *sendDataPtr=0, int sendDataSize=0) | |
| DEPRECATED. More... | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
DEPRECATED.
-events: void receiverStarted() void receiverStopped() void senderStarted() void senderStopped() void received(bool validate_is_ok) void qualityChanged(PIProtocol::Quality old_quality, PIProtocol::Quality new_quality)
-handlers: void startReceive(float exp_frequency = -1.f) void stopReceive() void startSend(float frequency = -1.f) void stopSend() void start() void stop() void send() void send(const void * data, int size, bool direct = false)
-| enum PIProtocol::Quality | -
Connection quality.
-| PIProtocol::PIProtocol | -( | -const PIString & | -config, | -
| - | - | const PIString & | -name, | -
| - | - | void * | -recHeaderPtr = 0, |
-
| - | - | int | -recHeaderSize = 0, |
-
| - | - | void * | -recDataPtr = 0, |
-
| - | - | int | -recDataSize = 0, |
-
| - | - | void * | -sendDataPtr = 0, |
-
| - | - | int | -sendDataSize = 0 |
-
| - | ) | -- |
DEPRECATED.
-Contructs protocol configured from file "config", config file section "name"
- -|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIScreen, including all inherited members.
-| className() const | PIObject | inlinevirtual |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| data() const | PIThread | inline |
| debug() const | PIObject | inline |
| deleted() | PIObject | protected |
| disableExitCapture() | PIScreen | inline |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| enableExitCapture(int key= 'Q') | PIScreen | inline |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| exitCaptured() const | PIScreen | inline |
| exitKey() const | PIScreen | inline |
| findByName(const PIString &name) | PIObject | inlinestatic |
| HANDLER | PIObject | related |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isRunning() const | PIThread | inline |
| keyPressed(PIKbdListener::KeyEvent key, void *data) | PIScreen | |
| lock() | PIThread | inline |
| mutex() | PIThread | inline |
| name() const | PIObject | inline |
| needLockRun(bool need) | PIThread | inline |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| piHigh enum value | PIThread | |
| piHighest enum value | PIThread | |
| piLow enum value | PIThread | |
| piLowerst enum value | PIThread | |
| piNormal enum value | PIThread | |
| PIObject(const PIString &name=PIString()) | PIObject | |
| PIOBJECT | PIObject | related |
| PIOBJECT_SUBCLASS | PIObject | related |
| PIScreen(bool startNow=true, PIKbdListener::KBFunc slot=0) | PIScreen | |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | |
| priority() const | PIThread | inline |
| Priority enum name | PIThread | |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| setData(void *d) | PIThread | inline |
| setDebug(bool debug) | PIObject | inline |
| setName(const PIString &name) | PIObject | inline |
| setPriority(PIThread::Priority prior) | PIThread | |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setSlot(ThreadFunc func) | PIThread | inline |
| start(bool wait) | PIScreen | inline |
| PIThread::start(int timer_delay) | PIThread | |
| PIThread::start(ThreadFunc func, int timer_delay) | PIThread | inline |
| started() | PIThread | |
| startOnce() | PIThread | |
| startOnce(ThreadFunc func) | PIThread | inline |
| stop(bool clear) | PIScreen | |
| stopped() | PIThread | |
| superClassName() const | PIObject | inlinevirtual |
| terminate() | PIThread | |
| tileEvent(PIScreenTile *tile, PIScreenTypes::TileEvent e) | PIScreen | |
| unlock() | PIThread | inline |
| waitForFinish() | PIScreen | |
| PIThread::waitForFinish(int timeout_msecs) | PIThread | |
| waitForStart(int timeout_msecs) | PIThread | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
Console output class. - More...
-
-Public Member Functions | |
| - | PIScreen (bool startNow=true, PIKbdListener::KBFunc slot=0) |
| Constructs PIScreen with key handler "slot" and if "startNow" start it. | |
| -void | enableExitCapture (int key= 'Q') |
| Directly call function from PIKbdListener. | |
| -void | disableExitCapture () |
| Directly call function from PIKbdListener. | |
| -bool | exitCaptured () const |
| Directly call function from PIKbdListener. | |
| -int | exitKey () const |
| Directly call function from PIKbdListener. | |
Public Member Functions inherited from PIThread | |
| - | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| - | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| -void | setData (void *d) |
| Set common data passed to external function. | |
| -void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| -void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| -void * | data () const |
| Returns common data passed to external function. | |
| -PIThread::Priority | priority () const |
| Return priority of thread. | |
| -bool | isRunning () const |
Return true if thread is running. | |
| -void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| -PIMutex & | mutex () |
| Return internal mutex. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | start (ThreadFunc func, int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| -void | lock () |
| Lock internal mutex. | |
| -void | unlock () |
| Unlock internal mutex. | |
| -void | started () |
| Raise on thread start. | |
| -void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | superClassName () const |
| Returns object superclass name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Handlers | |
| -void | waitForFinish () |
| block until finished (exit key will be pressed) | |
| -void | start (bool wait) |
| Start console output and if "wait" block until finished (exit key will be pressed) | |
| -void | stop (bool clear) |
| Stop console output and if "clear" clear the screen. | |
-Events | |
| -void | keyPressed (PIKbdListener::KeyEvent key, void *data) |
| Raise on key "key" pressed, "data" is pointer to PIConsole object. | |
| -void | tileEvent (PIScreenTile *tile, PIScreenTypes::TileEvent e) |
| Raise on some event "e" from tile "tile". | |
-Additional Inherited Members | |
Public Types inherited from PIThread | |
| enum | Priority { - piLowerst, -piLow, -piNormal, -piHigh, - - piHighest - - } |
| Priority of thread. More... | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Console output class.
-This class provides output to console with automatic alignment and update. It supports tabs, keyboard listening, formats and colors.
-PIScreen works with variable pointers. You should add your variables with functions addVariable() which receives label name, pointer to variable and optional column and format. Columns count is dynamically increased if new column used. E.g. if you add variable to empty tab to column 3, columns count will be increased to 3, but two firsts columns will be empty. Each column filled from top to bottom, but you can add just string with function addString() or add empty line with function addEmptyLine(). Layout scheme:
PIScreen should to be single in application. PIScreen aggregate PIKbdListener which grab keyboard and automatic switch tabs by theirs bind keys. If there is no tab binded to pressed key external function "slot" will be called
-|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIScreenDrawer, including all inherited members.
-|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
Console output class. - More...
-Console output class.
-This class provides output to console with automatic alignment and update. It supports tabs, keyboard listening, formats and colors.
-PIScreen works with variable pointers. You should add your variables with functions addVariable() which receives label name, pointer to variable and optional column and format. Columns count is dynamically increased if new column used. E.g. if you add variable to empty tab to column 3, columns count will be increased to 3, but two firsts columns will be empty. Each column filled from top to bottom, but you can add just string with function addString() or add empty line with function addEmptyLine(). Layout scheme:
PIScreen should to be single in application. PIScreen aggregate PIKbdListener which grab keyboard and automatic switch tabs by theirs bind keys. If there is no tab binded to pressed key external function "slot" will be called
-|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIScreenTile, including all inherited members.
-|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
Console output class. - More...
-
-Protected Member Functions | |
| -virtual void | sizeHint (int &w, int &h) const |
| Returns desired tile size in "w" and "h". | |
| -virtual void | resizeEvent (int w, int h) |
| Tile has been resized to "w"x"h". | |
| -virtual void | drawEvent (PIScreenDrawer *d) |
| Draw tile with drawer "d" in world-space coordinates. | |
| -virtual bool | keyEvent (PIKbdListener::KeyEvent key) |
| Return "true" if you process key. | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
-Additional Inherited Members | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | superClassName () const |
| Returns object superclass name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Console output class.
-This class provides output to console with automatic alignment and update. It supports tabs, keyboard listening, formats and colors.
-PIScreen works with variable pointers. You should add your variables with functions addVariable() which receives label name, pointer to variable and optional column and format. Columns count is dynamically increased if new column used. E.g. if you add variable to empty tab to column 3, columns count will be increased to 3, but two firsts columns will be empty. Each column filled from top to bottom, but you can add just string with function addString() or add empty line with function addEmptyLine(). Layout scheme:
PIScreen should to be single in application. PIScreen aggregate PIKbdListener which grab keyboard and automatic switch tabs by theirs bind keys. If there is no tab binded to pressed key external function "slot" will be called
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PISerial, including all inherited members.
-| availableDevices(bool test=false) | PISerial | static |
| availableSpeeds() | PISerial | static |
| BlockingRead enum value | PIIODevice | |
| BlockingWrite enum value | PIIODevice | |
| canRead() const | PIIODevice | inlinevirtual |
| canWrite() const | PIIODevice | inlinevirtual |
| className() const | PIObject | inlinevirtual |
| clearThreadedWriteQueue() | PIIODevice | inline |
| close() | PIIODevice | inline |
| closed() | PIIODevice | |
| closeDevice() | PISerial | protectedvirtual |
| configure(const PIString &config_file, const PIString §ion, bool parent_section=false) | PIIODevice | |
| configureDevice(const void *e_main, const void *e_parent=0) | PISerial | protectedvirtual |
| configureFromFullPath(const PIString &full_path) | PIIODevice | |
| configureFromFullPathDevice(const PIString &full_path) | PISerial | protectedvirtual |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| CONNECTU_QUEUED | PIObject | related |
| constructFullPath() const | PIIODevice | |
| constructFullPathDevice() const | PISerial | protectedvirtual |
| createFromFullPath(const PIString &full_path) | PIIODevice | static |
| data() const | PIThread | inline |
| dataBitsCount | PISerial | |
| dataBitsCount() const | PISerial | inline |
| debug() const | PIObject | inline |
| deleted() | PIObject | protected |
| device | PISerial | |
| device() const | PISerial | inline |
| DeviceInfoFlag enum name | PIIODevice | |
| deviceInfoFlags() const | PISerial | inlineprotectedvirtual |
| DeviceMode enum name | PIIODevice | |
| DeviceOption enum name | PIIODevice | |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlinestatic |
| flush() | PISerial | virtual |
| fullPathPrefix() const | PISerial | inlineprotectedvirtual |
| HANDLER | PIObject | related |
| infoFlags() const | PIIODevice | inline |
| init() | PIIODevice | inlineprotectedvirtual |
| inSpeed() const | PISerial | inline |
| isClosed() const | PIIODevice | inline |
| isOpened() const | PIIODevice | inline |
| isOptionSet(DeviceOption o) const | PIIODevice | inline |
| isParameterSet(PISerial::Parameters parameter) const | PISerial | |
| isPin(int number) const | PISerial | |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isReadable() const | PIIODevice | inline |
| isReopenEnabled() const | PIIODevice | inline |
| isRunning() const | PIThread | inline |
| isThreadedRead() const | PIIODevice | inline |
| isThreadedWrite() const | PIIODevice | inline |
| isWriteable() const | PIIODevice | inline |
| lock() | PIThread | inline |
| mode() const | PIIODevice | inline |
| mutex() | PIThread | inline |
| name() const | PIObject | inline |
| needLockRun(bool need) | PIThread | inline |
| open() | PIIODevice | inline |
| open(const PIString &_path) | PIIODevice | inline |
| openDevice() | PISerial | protectedvirtual |
| opened() | PIIODevice | |
| options() const | PIIODevice | inline |
| optionsChanged() | PISerial | protectedvirtual |
| outSpeed() const | PISerial | inline |
| Parameters enum name | PISerial | |
| parameters() const | PISerial | inline |
| parentClassName() const | PIObject | inlinevirtual |
| parityControl | PISerial | |
| ParityControl enum value | PISerial | |
| parityOdd | PISerial | |
| ParityOdd enum value | PISerial | |
| path() const | PIIODevice | inline |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| piHigh enum value | PIThread | |
| piHighest enum value | PIThread | |
| PIIODevice() | PIIODevice | explicit |
| PIIODevice(const PIString &path, DeviceMode mode=ReadWrite) | PIIODevice | explicit |
| PIIODEVICE | PIIODevice | related |
| piLow enum value | PIThread | |
| piLowerst enum value | PIThread | |
| piNormal enum value | PIThread | |
| PIObject(const PIString &name=PIString()) | PIObject | explicit |
| PIOBJECT | PIObject | related |
| PIOBJECT_SUBCLASS | PIObject | related |
| PISerial() | PISerial | explicit |
| PISerial(const PIString &device, PISerial::Speed speed=S115200, PIFlags< PISerial::Parameters > params=0) | PISerial | explicit |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | |
| Priority enum name | PIThread | |
| priority() const | PIThread | inline |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| read(void *read_to, int max_size, double timeout_ms) | PISerial | |
| read(int size=-1, double timeout_ms=1000.) | PISerial | |
| PIIODevice::read(int max_size) | PIIODevice | inline |
| readData(int size=-1, double timeout_ms=1000.) | PISerial | |
| readDevice(void *read_to, int max_size) | PISerial | protectedvirtual |
| readDeviceSetting(const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) | PIIODevice | related |
| readForTime(double timeout_ms) | PIIODevice | |
| ReadOnly enum value | PIIODevice | |
| ReadWrite enum value | PIIODevice | |
| received(const void *data, int size) | PISerial | inlineprotectedvirtual |
| REGISTER_DEVICE | PIIODevice | related |
| Reliable enum value | PIIODevice | |
| reopenEnabled | PIIODevice | |
| reopenTimeout | PIIODevice | |
| reopenTimeout() | PIIODevice | inline |
| S1000000 enum value | PISerial | |
| S110 enum value | PISerial | |
| S115200 enum value | PISerial | |
| S1152000 enum value | PISerial | |
| S1200 enum value | PISerial | |
| S1500000 enum value | PISerial | |
| S19200 enum value | PISerial | |
| S2000000 enum value | PISerial | |
| S230400 enum value | PISerial | |
| S2400 enum value | PISerial | |
| S2500000 enum value | PISerial | |
| S300 enum value | PISerial | |
| S3000000 enum value | PISerial | |
| S3500000 enum value | PISerial | |
| S38400 enum value | PISerial | |
| S4000000 enum value | PISerial | |
| S460800 enum value | PISerial | |
| S4800 enum value | PISerial | |
| S50 enum value | PISerial | |
| S500000 enum value | PISerial | |
| S57600 enum value | PISerial | |
| S576000 enum value | PISerial | |
| S600 enum value | PISerial | |
| S75 enum value | PISerial | |
| S921600 enum value | PISerial | |
| S9600 enum value | PISerial | |
| send(const void *data, int size) | PISerial | inline |
| send(const PIByteArray &data) | PISerial | inline |
| Sequential enum value | PIIODevice | |
| setData(void *d) | PIThread | inline |
| setDataBitsCount(int bits) | PISerial | inline |
| setDebug(bool debug) | PIObject | inline |
| setDevice(const PIString &dev) | PISerial | inline |
| setInSpeed(PISerial::Speed speed) | PISerial | inline |
| setMode(DeviceMode m) | PIIODevice | inline |
| setName(const PIString &name) | PIObject | inline |
| setOption(DeviceOption o, bool yes=true) | PIIODevice | |
| setOptions(DeviceOptions o) | PIIODevice | |
| setOutSpeed(PISerial::Speed speed) | PISerial | inline |
| setParameter(PISerial::Parameters parameter, bool on=true) | PISerial | |
| setParameters(PIFlags< PISerial::Parameters > parameters_) | PISerial | inline |
| setPath(const PIString &path) | PIIODevice | inline |
| setPin(int number, bool on) | PISerial | |
| setPriority(PIThread::Priority prior) | PIThread | |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setReopenEnabled(bool yes=true) | PIIODevice | inline |
| setReopenTimeout(int msecs) | PIIODevice | inline |
| setSlot(ThreadFunc func) | PIThread | inline |
| setSpeed(PISerial::Speed speed) | PISerial | inline |
| setThreadedReadBufferSize(int new_size) | PIIODevice | inline |
| setThreadedReadData(void *d) | PIIODevice | inline |
| setThreadedReadSlot(ReadRetFunc func) | PIIODevice | inline |
| speed | PISerial | |
| Speed enum name | PISerial | |
| start() | PIIODevice | inline |
| PIThread::start(int timer_delay) | PIThread | |
| started() | PIThread | |
| startOnce() | PIThread | |
| startOnce(ThreadFunc func) | PIThread | inline |
| startThreadedRead() | PIIODevice | inline |
| startThreadedRead(ReadRetFunc func) | PIIODevice | inline |
| startThreadedWrite() | PIIODevice | inline |
| stop(bool wait=false) | PIIODevice | inline |
| stopped() | PIThread | |
| stopThreadedRead() | PIIODevice | inline |
| stopThreadedWrite() | PIIODevice | inline |
| threadedRead(uchar *readed, int size) | PIIODevice | protectedvirtual |
| threadedReadBuffer() const | PIIODevice | inline |
| threadedReadBufferSize | PIIODevice | |
| threadedReadBufferSize() const | PIIODevice | inline |
| threadedReadBufferSizeChanged() | PISerial | protectedvirtual |
| threadedReadData() const | PIIODevice | inline |
| threadedReadEvent(uchar *readed, int size) | PIIODevice | |
| threadedWriteEvent(ullong id, int written_size) | PIIODevice | |
| tid() const | PIThread | inline |
| twoStopBits | PISerial | |
| TwoStopBits enum value | PISerial | |
| unlock() | PIThread | inline |
| waitForFinish(int timeout_msecs) | PIThread | |
| waitForStart(int timeout_msecs) | PIThread | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
| write(const void *data, int max_size) | PIIODevice | inline |
| write(PIByteArray data) | PIIODevice | inline |
| writeDevice(const void *data, int max_size) | PISerial | protectedvirtual |
| WriteOnly enum value | PIIODevice | |
| writeThreaded(const void *data, int max_size) | PIIODevice | inline |
| writeThreaded(const PIByteArray &data) | PIIODevice |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Serial device. - More...
-
-Public Types | |
| enum | Parameters { ParityControl = 0x1, -ParityOdd = 0x2, -TwoStopBits = 0x4 - } |
| Parameters of PISerial. More... | |
| enum | Speed { - S50 = 50, -S75 = 75, -S110 = 110, -S300 = 300, - - S600 = 600, -S1200 = 1200, -S2400 = 2400, -S4800 = 4800, - - S9600 = 9600, -S19200 = 19200, -S38400 = 38400, -S57600 = 57600, - - S115200 = 115200, -S230400 = 230400, -S460800 = 460800, -S500000 = 500000, - - S576000 = 576000, -S921600 = 921600, -S1000000 = 1000000, -S1152000 = 1152000, - - S1500000 = 1500000, -S2000000 = 2000000, -S2500000 = 2500000, -S3000000 = 3000000, - - S3500000 = 3500000, -S4000000 = 4000000 - - } |
| Speed of PISerial. More... | |
Public Types inherited from PIIODevice | |
| enum | DeviceMode { ReadOnly = 0x01, -WriteOnly = 0x02, -ReadWrite = 0x03 - } |
| Open modes for PIIODevice. More... | |
| enum | DeviceOption { BlockingRead = 0x01, -BlockingWrite = 0x02 - } |
| Options for PIIODevice, works with some devices. More... | |
| enum | DeviceInfoFlag { Sequential = 0x01, -Reliable = 0x02 - } |
| Characteristics of PIIODevice subclass. More... | |
Public Types inherited from PIThread | |
| enum | Priority { - piLowerst, -piLow, -piNormal, -piHigh, - - piHighest - - } |
| Priority of thread. More... | |
-Public Member Functions | |
| - | PISerial () |
| Contructs an empty PISerial. | |
| - | PISerial (const PIString &device, PISerial::Speed speed=S115200, PIFlags< PISerial::Parameters > params=0) |
| Contructs PISerial with device name "device", speed "speed" and parameters "params". | |
| -void | setSpeed (PISerial::Speed speed) |
| Set both input and output speed to "speed". | |
| -void | setOutSpeed (PISerial::Speed speed) |
| Set output speed to "speed". | |
| -void | setInSpeed (PISerial::Speed speed) |
| Set input speed to "speed". | |
| -void | setDevice (const PIString &dev) |
| Set device name to "dev". | |
| -void | setParameters (PIFlags< PISerial::Parameters > parameters_) |
| Set parameters to "parameters_". | |
| -void | setParameter (PISerial::Parameters parameter, bool on=true) |
| Set parameter "parameter" to "on" state. | |
| -bool | isParameterSet (PISerial::Parameters parameter) const |
| Returns if parameter "parameter" is set. | |
| -PIFlags< PISerial::Parameters > | parameters () const |
| Returns parameters. | |
| -void | setDataBitsCount (int bits) |
| Set data bits count. Valid range is from 5 to 8, befault is 8. | |
| -int | dataBitsCount () const |
| Returns data bits count. | |
| -bool | setPin (int number, bool on) |
| Set pin number "number" to logic level "on". Valid numbers are 4 (DTR) and 7 (RTS) | |
| -bool | isPin (int number) const |
| Returns pin number "number" logic level. Valid numbers range is from 1 to 9. | |
| -PIString | device () const |
| Returns device name. | |
| -PISerial::Speed | outSpeed () const |
| Returns output speed. | |
| -PISerial::Speed | inSpeed () const |
| Returns input speed. | |
| -void | flush () |
| Discard all buffered input and output data. | |
| bool | read (void *read_to, int max_size, double timeout_ms) |
| Advanced read function. More... | |
| PIString | read (int size=-1, double timeout_ms=1000.) |
| Advanced read function. More... | |
| PIByteArray | readData (int size=-1, double timeout_ms=1000.) |
| Advanced read function. More... | |
| bool | send (const void *data, int size) |
| Write to device data "data" with maximum size "size" and wait for data written if "wait" is true. More... | |
| bool | send (const PIByteArray &data) |
| Write to device byte array "data" and wait for data written if "wait" is true. More... | |
Public Member Functions inherited from PIIODevice | |
| - | PIIODevice () |
| Constructs a empty PIIODevice. | |
| PIIODevice (const PIString &path, DeviceMode mode=ReadWrite) | |
| Constructs a PIIODevice with path and mode. More... | |
| -DeviceMode | mode () const |
| Current open mode of device. | |
| -void | setMode (DeviceMode m) |
| Set open mode of device. | |
| -DeviceOptions | options () const |
| Current device options. | |
| -bool | isOptionSet (DeviceOption o) const |
| Current device option "o" state. | |
| -void | setOptions (DeviceOptions o) |
| Set device options. | |
| -bool | setOption (DeviceOption o, bool yes=true) |
| Set device option "o" to "yes" and return previous state. | |
| -DeviceInfoFlags | infoFlags () const |
| Returns device characteristic flags. | |
| -PIString | path () const |
| Current path of device. | |
| -void | setPath (const PIString &path) |
| Set path of device. | |
| -bool | isReadable () const |
| Return true if mode is ReadOnly or ReadWrite. | |
| -bool | isWriteable () const |
| Return true if mode is WriteOnly or ReadWrite. | |
| -bool | isOpened () const |
| Return true if device is successfully opened. | |
| -bool | isClosed () const |
| Return true if device is closed. | |
| -virtual bool | canRead () const |
| Return true if device can read now. | |
| -virtual bool | canWrite () const |
| Return true if device can write now. | |
| -void | setReopenEnabled (bool yes=true) |
| Set execution of open enabled while threaded read on closed device. | |
| -void | setReopenTimeout (int msecs) |
| Set timeout in milliseconds between open tryings if reopen is enabled. | |
| -bool | isReopenEnabled () const |
| Return reopen enable. | |
| -int | reopenTimeout () |
| Return reopen timeout. | |
| void | setThreadedReadSlot (ReadRetFunc func) |
| Set "threaded read slot". More... | |
| -void | setThreadedReadData (void *d) |
| Set custom data that will be passed to "threaded read slot". | |
| void | setThreadedReadBufferSize (int new_size) |
| Set size of threaded read buffer. More... | |
| -int | threadedReadBufferSize () const |
| Return size of threaded read buffer. | |
| -const uchar * | threadedReadBuffer () const |
| Return content of threaded read buffer. | |
| -void * | threadedReadData () const |
| Return custom data that will be passed to "threaded read slot". | |
| -bool | isThreadedRead () const |
| Return true if threaded read is started. | |
| -void | startThreadedRead () |
| Start threaded read. | |
| -void | startThreadedRead (ReadRetFunc func) |
| Start threaded read and assign "threaded read slot" to "func". | |
| -void | stopThreadedRead () |
| Stop threaded read. | |
| -bool | isThreadedWrite () const |
| Return true if threaded write is started. | |
| -void | startThreadedWrite () |
| Start threaded write. | |
| -void | stopThreadedWrite () |
| Stop threaded write. | |
| -void | clearThreadedWriteQueue () |
| Clear threaded write task queue. | |
| -void | start () |
| Start both threaded read and threaded write. | |
| -void | stop (bool wait=false) |
| Stop both threaded read and threaded write and if "wait" block until both threads are stop. | |
| -int | read (void *read_to, int max_size) |
| Read from device maximum "max_size" bytes to "read_to". | |
| -PIByteArray | read (int max_size) |
| Read from device maximum "max_size" bytes and return them as PIByteArray. | |
| -int | write (const void *data, int max_size) |
| Write maximum "max_size" bytes of "data" to device. | |
| -PIByteArray | readForTime (double timeout_ms) |
| Read from device for "timeout_ms" milliseconds and return readed data as PIByteArray. Timeout should to be greater than 0. | |
| -ullong | writeThreaded (const void *data, int max_size) |
| Add task to threaded write queue and return task ID. | |
| -ullong | writeThreaded (const PIByteArray &data) |
| Add task to threaded write queue and return task ID. | |
| -bool | configure (const PIString &config_file, const PIString §ion, bool parent_section=false) |
| Configure device from section "section" of file "config_file", if "parent_section" parent section also will be read. | |
| -PIString | constructFullPath () const |
| Reimplement to construct full unambiguous string, describes this device, default returns fullPathPrefix() + "://" + path() | |
| -void | configureFromFullPath (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -bool | open () |
| Open device. | |
| -bool | open (const PIString &_path) |
| Open device with path "path". | |
| -bool | close () |
| Close device. | |
| -int | write (PIByteArray data) |
| Write "data" to device. | |
| -void | opened () |
| Raise if succesfull open. | |
| -void | closed () |
| Raise if succesfull close. | |
| -void | threadedReadEvent (uchar *readed, int size) |
| Raise if read thread succesfull read some data. | |
| -void | threadedWriteEvent (ullong id, int written_size) |
| Raise if write thread successfull write some data of task with ID "id". | |
Public Member Functions inherited from PIThread | |
| - | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| - | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| -void | setData (void *d) |
| Set common data passed to external function. | |
| -void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| -void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| -void * | data () const |
| Returns common data passed to external function. | |
| -PIThread::Priority | priority () const |
| Return priority of thread. | |
| -bool | isRunning () const |
Return true if thread is running. | |
| -void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| -PIMutex & | mutex () |
| Returns internal mutex. | |
| -llong | tid () const |
| Returns thread ID. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| -void | lock () |
| Lock internal mutex. | |
| -void | unlock () |
| Unlock internal mutex. | |
| -void | started () |
| Raise on thread start. | |
| -void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Static Public Member Functions | |
| -static PIVector< int > | availableSpeeds () |
| Returns all available speeds for serial devices. | |
| -static PIStringList | availableDevices (bool test=false) |
| Returns all available system devices. If "test" each device will be tried to open. | |
Static Public Member Functions inherited from PIIODevice | |
| static PIIODevice * | createFromFullPath (const PIString &full_path) |
| Try to determine suitable device, create new one, configure it with configureFromFullPath() and returns it. More... | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
-Protected Member Functions | |
| -PIString | fullPathPrefix () const |
| Reimplement to construct full unambiguous string prefix. Creating devices by unambiguous string. | |
| -PIString | constructFullPathDevice () const |
| Reimplement to construct full unambiguous string, describes this device. Default implementation returns path() | |
| -void | configureFromFullPathDevice (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -bool | configureDevice (const void *e_main, const void *e_parent=0) |
| Reimplement to configure device from entries "e_main" and "e_parent", cast arguments to PIConfig::Entry*. | |
| -void | optionsChanged () |
| Reimplement to apply new device options. | |
| -void | threadedReadBufferSizeChanged () |
| Reimplement to apply new threadedReadBufferSize() | |
| int | readDevice (void *read_to, int max_size) |
| Basic read function. More... | |
| -int | writeDevice (const void *data, int max_size) |
| Reimplement this function to write to your device. | |
| -DeviceInfoFlags | deviceInfoFlags () const |
| Reimplement to return correct DeviceInfoFlags. Default implementation returns 0. | |
| -virtual void | received (const void *data, int size) |
| Executes when any read function was successful. Default implementation does nothing. | |
| -bool | openDevice () |
| Reimplement to open device, return value will be set to "opened_" variable; don't call this function in subclass, use open() | |
| -bool | closeDevice () |
| Reimplement to close device, inverse return value will be set to "opened_" variable. | |
Protected Member Functions inherited from PIIODevice | |
| -virtual bool | init () |
| Function executed before first openDevice() or from constructor. | |
| -virtual bool | threadedRead (uchar *readed, int size) |
| Function executed when thread read some data, default implementation execute external slot "ret_func_". | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
-Configurable parameters | |
| -string | device |
| device, default "" | |
| -int | speed |
| input/output speed, default 115200 | |
| -int | dataBitsCount |
| dataBitsCount, default 8 | |
| -bool | parityControl |
| parityControl, default false | |
| -bool | parityOdd |
| parityOdd, default false | |
| -bool | twoStopBits |
| twoStopBits, default false | |
-Additional Inherited Members | |
Public Attributes inherited from PIIODevice | |
| -bool | reopenEnabled |
| setReopenEnabled, default "true" | |
| -int | reopenTimeout |
| setReopenTimeout in ms, default 1000 | |
| -int | threadedReadBufferSize |
| setThreadedReadBufferSize in bytes, default 4096 | |
Related Functions inherited from PIIODevice | |
| template<typename T > | |
| T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) |
| Service function. useful for configuring devices. More... | |
| -#define | REGISTER_DEVICE(class) |
| Use this macro to enable automatic creation instances of your class with createFromFullPath() function. | |
| -#define | PIIODEVICE(class) |
| Use this macro instead of PIOBJECT when describe your own PIIODevice. | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Serial device.
-This class provide access to serial device, e.g. COM port. It can read, write, wait for write. There are several read and write functions.
-| enum PISerial::Parameters | -
Parameters of PISerial.
-| Enumerator | |
|---|---|
| ParityControl | Enable parity check and generate - |
| ParityOdd | Parity is odd instead of even - |
| TwoStopBits | Two stop bits instead of one - |
| enum PISerial::Speed | -
Speed of PISerial.
-| bool PISerial::read | -( | -void * | -data, | -
| - | - | int | -size, | -
| - | - | double | -timeout_ms | -
| - | ) | -- |
Advanced read function.
-Read to pointer "read_to" no more than "max_size" and no longer than "timeout_ms" milliseconds. If "timeout_ms" < 0 function will be wait forever until "max_size" will be readed. If size <= 0 function immediate returns false. For read data with unknown size use function readData().
| PIString PISerial::read | -( | -int | -size = -1, |
-
| - | - | double | -timeout_ms = 1000. |
-
| - | ) | -- |
Advanced read function.
-Read all or no more than "size" and no longer than "timeout_ms" milliseconds. If "timeout_ms" < 0 function will be wait forever until "size" will be readed. If "size" <= 0 function will be read all until "timeout_ms" elaped.
- If size <= 0 and "timeout_ms" <= 0 function immediate returns empty string.
- This function similar to readData() but returns data as string.
| PIByteArray PISerial::readData | -( | -int | -size = -1, |
-
| - | - | double | -timeout_ms = 1000. |
-
| - | ) | -- |
Advanced read function.
-Read all or no more than "size" and no longer than "timeout_ms" milliseconds. If "timeout_ms" < 0 function will be wait forever until "size" will be readed. If "size" <= 0 function will be read all until "timeout_ms" elaped.
- If size <= 0 and "timeout_ms" <= 0 function immediate returns empty byte array.
- This function similar to read() but returns data as byte array.
-
|
- -inline | -
Write to device data "data" with maximum size "size" and wait for data written if "wait" is true.
-
-
|
- -inline | -
Write to device byte array "data" and wait for data written if "wait" is true.
-
-
|
- -protectedvirtual | -
Basic read function.
-Read to pointer "read_to" no more than "max_size". If read is set to blocking this function will be wait at least one byte.
Reimplemented from PIIODevice.
- -|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PISet< T >, including all inherited members.
-| intersect(const PISet< T > &v) | PISet< T > | inline |
| operator &(const PISet< T > &v0, const PISet< T > &v1) | PISet< T > | related |
| operator&=(const PISet< T > &v) | PISet< T > | inline |
| operator+(const PISet< T > &v0, const PISet< T > &v1) | PISet< T > | related |
| operator+=(const PISet< T > &v) | PISet< T > | inline |
| operator-(const PISet< T > &v0, const PISet< T > &v1) | PISet< T > | related |
| operator-=(const PISet< T > &v) | PISet< T > | inline |
| operator[](const T &t) const | PISet< T > | inline |
| operator|(const PISet< T > &v0, const PISet< T > &v1) | PISet< T > | related |
| operator|=(const PISet< T > &v) | PISet< T > | inline |
| PISet() | PISet< T > | inline |
| PISet(const T &value) | PISet< T > | inline |
| PISet(const T &v0, const T &v1) | PISet< T > | inline |
| PISet(const T &v0, const T &v1, const T &v2) | PISet< T > | inline |
| PISet(const T &v0, const T &v1, const T &v2, const T &v3) | PISet< T > | inline |
| PISet(const PIVector< T > &values) | PISet< T > | inline |
| PISet(const PIDeque< T > &values) | PISet< T > | inline |
| remove(const T &t) | PISet< T > | inline |
| subtract(const PISet< T > &v) | PISet< T > | inline |
| toDeque() const | PISet< T > | inline |
| toVector() const | PISet< T > | inline |
| unite(const PISet< T > &v) | PISet< T > | inline |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Set of any type. - More...
- -Inherits PIMap< Key, T >.
--Public Member Functions | |
| - | PISet () |
| Contructs an empty set. | |
| - | PISet (const T &value) |
| Contructs set with one element "value". | |
| - | PISet (const T &v0, const T &v1) |
| Contructs set with elements "v0" and "v1". | |
| - | PISet (const T &v0, const T &v1, const T &v2) |
| Contructs set with elements "v0", "v1" and "v2". | |
| - | PISet (const T &v0, const T &v1, const T &v2, const T &v3) |
| Contructs set with elements "v0", "v1", "v2" and "v3". | |
| - | PISet (const PIVector< T > &values) |
| Contructs set from vector of elements. | |
| - | PISet (const PIDeque< T > &values) |
| Contructs set from deque of elements. | |
| -bool | operator[] (const T &t) const |
| Returns if element "t" exists in this set. | |
| -PISet< T > & | remove (const T &t) |
| Returns if element "t" exists in this set. | |
| -PISet< T > & | unite (const PISet< T > &v) |
| Unite set with "v". | |
| -PISet< T > & | subtract (const PISet< T > &v) |
| Subtract set with "v". | |
| -PISet< T > & | intersect (const PISet< T > &v) |
| Intersect set with "v". | |
| -PISet< T > & | operator+= (const PISet< T > &v) |
| Unite set with "v". | |
| -PISet< T > & | operator|= (const PISet< T > &v) |
| Unite set with "v". | |
| -PISet< T > & | operator-= (const PISet< T > &v) |
| Subtract set with "v". | |
| -PISet< T > & | operator&= (const PISet< T > &v) |
| Intersect set with "v". | |
| -PIVector< T > | toVector () const |
| Returns content of set as PIVector. | |
| -PIDeque< T > | toDeque () const |
| Returns content of set as PIDeque. | |
-Related Functions | |
(Note that these are not member functions.) - | |
| -template<typename T > | |
| PISet< T > | operator+ (const PISet< T > &v0, const PISet< T > &v1) |
| Returns unite of two sets. | |
| -template<typename T > | |
| PISet< T > | operator- (const PISet< T > &v0, const PISet< T > &v1) |
| Returns subtraction of two sets. | |
| -template<typename T > | |
| PISet< T > | operator| (const PISet< T > &v0, const PISet< T > &v1) |
| Returns unite of two sets. | |
| -template<typename T > | |
| PISet< T > | operator & (const PISet< T > &v0, const PISet< T > &v1) |
| Returns intersetion of two sets. | |
Set of any type.
-This class used to store collection of unique elements of any type. You can only add values to set with operator<< or with function insert(). You can discover if value already in set with operator[] or with function find(). These function has logarithmic complexity.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PISharedMemory, including all inherited members.
-| BlockingRead enum value | PIIODevice | |
| BlockingWrite enum value | PIIODevice | |
| canRead() const | PIIODevice | inlinevirtual |
| canWrite() const | PIIODevice | inlinevirtual |
| className() const | PIObject | inlinevirtual |
| clearThreadedWriteQueue() | PIIODevice | inline |
| close() | PIIODevice | inline |
| closed() | PIIODevice | |
| closeDevice() | PISharedMemory | protectedvirtual |
| configure(const PIString &config_file, const PIString §ion, bool parent_section=false) | PIIODevice | |
| configureDevice(const void *e_main, const void *e_parent=0) | PIIODevice | inlineprotectedvirtual |
| configureFromFullPath(const PIString &full_path) | PIIODevice | |
| configureFromFullPathDevice(const PIString &full_path) | PISharedMemory | protectedvirtual |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| CONNECTU_QUEUED | PIObject | related |
| constructFullPath() const | PIIODevice | |
| constructFullPathDevice() const | PISharedMemory | protectedvirtual |
| createFromFullPath(const PIString &full_path) | PIIODevice | static |
| data() const | PIThread | inline |
| debug() const | PIObject | inline |
| deleted() | PIObject | protected |
| DeviceInfoFlag enum name | PIIODevice | |
| deviceInfoFlags() const | PISharedMemory | inlineprotectedvirtual |
| DeviceMode enum name | PIIODevice | |
| DeviceOption enum name | PIIODevice | |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlinestatic |
| flush() | PIIODevice | inlinevirtual |
| fullPathPrefix() const | PISharedMemory | inlineprotectedvirtual |
| HANDLER | PIObject | related |
| infoFlags() const | PIIODevice | inline |
| init() | PIIODevice | inlineprotectedvirtual |
| isClosed() const | PIIODevice | inline |
| isEmpty() const | PISharedMemory | inline |
| isOpened() const | PIIODevice | inline |
| isOptionSet(DeviceOption o) const | PIIODevice | inline |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isReadable() const | PIIODevice | inline |
| isReopenEnabled() const | PIIODevice | inline |
| isRunning() const | PIThread | inline |
| isThreadedRead() const | PIIODevice | inline |
| isThreadedWrite() const | PIIODevice | inline |
| isWriteable() const | PIIODevice | inline |
| lock() | PIThread | inline |
| mode() const | PIIODevice | inline |
| mutex() | PIThread | inline |
| name() const | PIObject | inline |
| needLockRun(bool need) | PIThread | inline |
| open() | PIIODevice | inline |
| open(const PIString &_path) | PIIODevice | inline |
| openDevice() | PISharedMemory | protectedvirtual |
| opened() | PIIODevice | |
| options() const | PIIODevice | inline |
| optionsChanged() | PIIODevice | inlineprotectedvirtual |
| parentClassName() const | PIObject | inlinevirtual |
| path() const | PIIODevice | inline |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| piHigh enum value | PIThread | |
| piHighest enum value | PIThread | |
| PIIODevice() | PIIODevice | explicit |
| PIIODevice(const PIString &path, DeviceMode mode=ReadWrite) | PIIODevice | explicit |
| PIIODEVICE | PIIODevice | related |
| piLow enum value | PIThread | |
| piLowerst enum value | PIThread | |
| piNormal enum value | PIThread | |
| PIObject(const PIString &name=PIString()) | PIObject | explicit |
| PIOBJECT | PIObject | related |
| PIOBJECT_SUBCLASS | PIObject | related |
| PISharedMemory(const PIString &shm_name, int size, DeviceMode mode=ReadWrite) | PISharedMemory | explicit |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | |
| priority() const | PIThread | inline |
| Priority enum name | PIThread | |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| read(void *read_to, int max_size) | PISharedMemory | |
| read(void *read_to, int max_size, int offset) | PISharedMemory | |
| PIIODevice::read(int max_size) | PIIODevice | inline |
| readAll() | PISharedMemory | |
| readDevice(void *read_to, int max_size) | PISharedMemory | inlineprotectedvirtual |
| readDeviceSetting(const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) | PIIODevice | related |
| readForTime(double timeout_ms) | PIIODevice | |
| ReadOnly enum value | PIIODevice | |
| ReadWrite enum value | PIIODevice | |
| REGISTER_DEVICE | PIIODevice | related |
| Reliable enum value | PIIODevice | |
| reopenEnabled | PIIODevice | |
| reopenTimeout | PIIODevice | |
| reopenTimeout() | PIIODevice | inline |
| Sequential enum value | PIIODevice | |
| setData(void *d) | PIThread | inline |
| setDebug(bool debug) | PIObject | inline |
| setMode(DeviceMode m) | PIIODevice | inline |
| setName(const PIString &name) | PIObject | inline |
| setOption(DeviceOption o, bool yes=true) | PIIODevice | |
| setOptions(DeviceOptions o) | PIIODevice | |
| setPath(const PIString &path) | PIIODevice | inline |
| setPriority(PIThread::Priority prior) | PIThread | |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setReopenEnabled(bool yes=true) | PIIODevice | inline |
| setReopenTimeout(int msecs) | PIIODevice | inline |
| setSize(llong s) | PISharedMemory | |
| setSlot(ThreadFunc func) | PIThread | inline |
| setThreadedReadBufferSize(int new_size) | PIIODevice | inline |
| setThreadedReadData(void *d) | PIIODevice | inline |
| setThreadedReadSlot(ReadRetFunc func) | PIIODevice | inline |
| size() const | PISharedMemory | |
| start() | PIIODevice | inline |
| PIThread::start(int timer_delay) | PIThread | |
| started() | PIThread | |
| startOnce() | PIThread | |
| startOnce(ThreadFunc func) | PIThread | inline |
| startThreadedRead() | PIIODevice | inline |
| startThreadedRead(ReadRetFunc func) | PIIODevice | inline |
| startThreadedWrite() | PIIODevice | inline |
| stop(bool wait=false) | PIIODevice | inline |
| stopped() | PIThread | |
| stopThreadedRead() | PIIODevice | inline |
| stopThreadedWrite() | PIIODevice | inline |
| threadedRead(uchar *readed, int size) | PIIODevice | protectedvirtual |
| threadedReadBuffer() const | PIIODevice | inline |
| threadedReadBufferSize | PIIODevice | |
| threadedReadBufferSize() const | PIIODevice | inline |
| threadedReadBufferSizeChanged() | PIIODevice | inlineprotectedvirtual |
| threadedReadData() const | PIIODevice | inline |
| threadedReadEvent(uchar *readed, int size) | PIIODevice | |
| threadedWriteEvent(ullong id, int written_size) | PIIODevice | |
| tid() const | PIThread | inline |
| unlock() | PIThread | inline |
| waitForFinish(int timeout_msecs) | PIThread | |
| waitForStart(int timeout_msecs) | PIThread | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
| write(const void *data, int max_size) | PISharedMemory | |
| write(const void *data, int max_size, int offset) | PISharedMemory | |
| write(const PIByteArray &data) | PISharedMemory | inline |
| write(const PIByteArray &data, int offset) | PISharedMemory | inline |
| PIIODevice::write(PIByteArray data) | PIIODevice | inline |
| writeDevice(const void *data, int max_size) | PISharedMemory | inlineprotectedvirtual |
| WriteOnly enum value | PIIODevice | |
| writeThreaded(const void *data, int max_size) | PIIODevice | inline |
| writeThreaded(const PIByteArray &data) | PIIODevice |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Shared memory. - More...
-
-Public Member Functions | |
| - | PISharedMemory (const PIString &shm_name, int size, DeviceMode mode=ReadWrite) |
| Constructs a shared memory object with name "shm_name", size "size" and open mode "mode". | |
| -PIByteArray | readAll () |
| Read all shared memory object content to byte array and return it. | |
| -llong | size () const |
| Returns shared memory object size. | |
| -void | setSize (llong s) |
| Set shared memory object size. | |
| -bool | isEmpty () const |
| Returns if shared memory object is empty. | |
| -int | read (void *read_to, int max_size) |
| Read from shared memory object to "read_to" no more than "max_size" and return readed bytes count. | |
| -int | read (void *read_to, int max_size, int offset) |
| Read from shared memory object to "read_to" no more than "max_size" and return readed bytes count. | |
| -int | write (const void *data, int max_size) |
| Write to shared memory object "data" with size "max_size" and return written bytes count. | |
| -int | write (const void *data, int max_size, int offset) |
| Write to shared memory object "data" with size "max_size" and return written bytes count. | |
| -int | write (const PIByteArray &data) |
| Write "data" to shared memory object. | |
| -int | write (const PIByteArray &data, int offset) |
| Write "data" to shared memory object. | |
Public Member Functions inherited from PIIODevice | |
| - | PIIODevice () |
| Constructs a empty PIIODevice. | |
| PIIODevice (const PIString &path, DeviceMode mode=ReadWrite) | |
| Constructs a PIIODevice with path and mode. More... | |
| -DeviceMode | mode () const |
| Current open mode of device. | |
| -void | setMode (DeviceMode m) |
| Set open mode of device. | |
| -DeviceOptions | options () const |
| Current device options. | |
| -bool | isOptionSet (DeviceOption o) const |
| Current device option "o" state. | |
| -void | setOptions (DeviceOptions o) |
| Set device options. | |
| -bool | setOption (DeviceOption o, bool yes=true) |
| Set device option "o" to "yes" and return previous state. | |
| -DeviceInfoFlags | infoFlags () const |
| Returns device characteristic flags. | |
| -PIString | path () const |
| Current path of device. | |
| -void | setPath (const PIString &path) |
| Set path of device. | |
| -bool | isReadable () const |
| Return true if mode is ReadOnly or ReadWrite. | |
| -bool | isWriteable () const |
| Return true if mode is WriteOnly or ReadWrite. | |
| -bool | isOpened () const |
| Return true if device is successfully opened. | |
| -bool | isClosed () const |
| Return true if device is closed. | |
| -virtual bool | canRead () const |
| Return true if device can read now. | |
| -virtual bool | canWrite () const |
| Return true if device can write now. | |
| -void | setReopenEnabled (bool yes=true) |
| Set execution of open enabled while threaded read on closed device. | |
| -void | setReopenTimeout (int msecs) |
| Set timeout in milliseconds between open tryings if reopen is enabled. | |
| -bool | isReopenEnabled () const |
| Return reopen enable. | |
| -int | reopenTimeout () |
| Return reopen timeout. | |
| void | setThreadedReadSlot (ReadRetFunc func) |
| Set "threaded read slot". More... | |
| -void | setThreadedReadData (void *d) |
| Set custom data that will be passed to "threaded read slot". | |
| void | setThreadedReadBufferSize (int new_size) |
| Set size of threaded read buffer. More... | |
| -int | threadedReadBufferSize () const |
| Return size of threaded read buffer. | |
| -const uchar * | threadedReadBuffer () const |
| Return content of threaded read buffer. | |
| -void * | threadedReadData () const |
| Return custom data that will be passed to "threaded read slot". | |
| -bool | isThreadedRead () const |
| Return true if threaded read is started. | |
| -void | startThreadedRead () |
| Start threaded read. | |
| -void | startThreadedRead (ReadRetFunc func) |
| Start threaded read and assign "threaded read slot" to "func". | |
| -void | stopThreadedRead () |
| Stop threaded read. | |
| -bool | isThreadedWrite () const |
| Return true if threaded write is started. | |
| -void | startThreadedWrite () |
| Start threaded write. | |
| -void | stopThreadedWrite () |
| Stop threaded write. | |
| -void | clearThreadedWriteQueue () |
| Clear threaded write task queue. | |
| -void | start () |
| Start both threaded read and threaded write. | |
| -void | stop (bool wait=false) |
| Stop both threaded read and threaded write and if "wait" block until both threads are stop. | |
| -int | read (void *read_to, int max_size) |
| Read from device maximum "max_size" bytes to "read_to". | |
| -PIByteArray | read (int max_size) |
| Read from device maximum "max_size" bytes and return them as PIByteArray. | |
| -int | write (const void *data, int max_size) |
| Write maximum "max_size" bytes of "data" to device. | |
| -PIByteArray | readForTime (double timeout_ms) |
| Read from device for "timeout_ms" milliseconds and return readed data as PIByteArray. Timeout should to be greater than 0. | |
| -ullong | writeThreaded (const void *data, int max_size) |
| Add task to threaded write queue and return task ID. | |
| -ullong | writeThreaded (const PIByteArray &data) |
| Add task to threaded write queue and return task ID. | |
| -bool | configure (const PIString &config_file, const PIString §ion, bool parent_section=false) |
| Configure device from section "section" of file "config_file", if "parent_section" parent section also will be read. | |
| -PIString | constructFullPath () const |
| Reimplement to construct full unambiguous string, describes this device, default returns fullPathPrefix() + "://" + path() | |
| -void | configureFromFullPath (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -bool | open () |
| Open device. | |
| -bool | open (const PIString &_path) |
| Open device with path "path". | |
| -bool | close () |
| Close device. | |
| -int | write (PIByteArray data) |
| Write "data" to device. | |
| -virtual void | flush () |
| Immediate write all buffers. | |
| -void | opened () |
| Raise if succesfull open. | |
| -void | closed () |
| Raise if succesfull close. | |
| -void | threadedReadEvent (uchar *readed, int size) |
| Raise if read thread succesfull read some data. | |
| -void | threadedWriteEvent (ullong id, int written_size) |
| Raise if write thread successfull write some data of task with ID "id". | |
Public Member Functions inherited from PIThread | |
| - | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| - | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| -void | setData (void *d) |
| Set common data passed to external function. | |
| -void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| -void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| -void * | data () const |
| Returns common data passed to external function. | |
| -PIThread::Priority | priority () const |
| Return priority of thread. | |
| -bool | isRunning () const |
Return true if thread is running. | |
| -void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| -PIMutex & | mutex () |
| Returns internal mutex. | |
| -llong | tid () const |
| Returns thread ID. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| -void | lock () |
| Lock internal mutex. | |
| -void | unlock () |
| Unlock internal mutex. | |
| -void | started () |
| Raise on thread start. | |
| -void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Protected Member Functions | |
| -bool | openDevice () |
| Reimplement to open device, return value will be set to "opened_" variable; don't call this function in subclass, use open() | |
| -bool | closeDevice () |
| Reimplement to close device, inverse return value will be set to "opened_" variable. | |
| -PIString | fullPathPrefix () const |
| Reimplement to construct full unambiguous string prefix. Creating devices by unambiguous string. | |
| -PIString | constructFullPathDevice () const |
| Reimplement to construct full unambiguous string, describes this device. Default implementation returns path() | |
| -void | configureFromFullPathDevice (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -int | readDevice (void *read_to, int max_size) |
| Reimplement this function to read from your device. | |
| -int | writeDevice (const void *data, int max_size) |
| Reimplement this function to write to your device. | |
| -DeviceInfoFlags | deviceInfoFlags () const |
| Reimplement to return correct DeviceInfoFlags. Default implementation returns 0. | |
Protected Member Functions inherited from PIIODevice | |
| -virtual bool | init () |
| Function executed before first openDevice() or from constructor. | |
| -virtual bool | configureDevice (const void *e_main, const void *e_parent=0) |
| Reimplement to configure device from entries "e_main" and "e_parent", cast arguments to PIConfig::Entry*. | |
| -virtual bool | threadedRead (uchar *readed, int size) |
| Function executed when thread read some data, default implementation execute external slot "ret_func_". | |
| -virtual void | optionsChanged () |
| Reimplement to apply new device options. | |
| -virtual void | threadedReadBufferSizeChanged () |
| Reimplement to apply new threadedReadBufferSize() | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
-Additional Inherited Members | |
Public Types inherited from PIIODevice | |
| enum | DeviceMode { ReadOnly = 0x01, -WriteOnly = 0x02, -ReadWrite = 0x03 - } |
| Open modes for PIIODevice. More... | |
| enum | DeviceOption { BlockingRead = 0x01, -BlockingWrite = 0x02 - } |
| Options for PIIODevice, works with some devices. More... | |
| enum | DeviceInfoFlag { Sequential = 0x01, -Reliable = 0x02 - } |
| Characteristics of PIIODevice subclass. More... | |
Public Types inherited from PIThread | |
| enum | Priority { - piLowerst, -piLow, -piNormal, -piHigh, - - piHighest - - } |
| Priority of thread. More... | |
Static Public Member Functions inherited from PIIODevice | |
| static PIIODevice * | createFromFullPath (const PIString &full_path) |
| Try to determine suitable device, create new one, configure it with configureFromFullPath() and returns it. More... | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Public Attributes inherited from PIIODevice | |
| -bool | reopenEnabled |
| setReopenEnabled, default "true" | |
| -int | reopenTimeout |
| setReopenTimeout in ms, default 1000 | |
| -int | threadedReadBufferSize |
| setThreadedReadBufferSize in bytes, default 4096 | |
Related Functions inherited from PIIODevice | |
| template<typename T > | |
| T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) |
| Service function. useful for configuring devices. More... | |
| -#define | REGISTER_DEVICE(class) |
| Use this macro to enable automatic creation instances of your class with createFromFullPath() function. | |
| -#define | PIIODEVICE(class) |
| Use this macro instead of PIOBJECT when describe your own PIIODevice. | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Shared memory.
-This class provide access to local file. You can manipulate binary content or use this class as text stream. To binary access there are function read(), write(), and many writeBinary() functions. For write variables to file in their text representation threr are many "<<" operators.
-Each opened file has a read/write position - logical position in the file content you read from or you write to. You can find out current position with function pos(). Function seek(llong position) move position to position "position", seekToBegin() move position to the begin of file, seekToEnd() move position to the end of file.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIStateMachine< Type >, including all inherited members.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Base class for custom state machine. - More...
-
-Classes | |
| struct | Rule |
| Rule of transition between states of machine More... | |
| struct | State |
| State of machine More... | |
-Public Types | |
| -typedef PIPair< PIString, int > | Condition |
| Condition is a pair (string, number) | |
-Public Member Functions | |
| - | PIStateMachine (void *_parent=0) |
| Constructs an empty state machine. | |
| -void | addState (Type value, const PIString &name="", Handler handler=0) |
| Add state of machine. | |
| -int | statesCount () const |
| States count. | |
| -void | clearStates () |
| Remove all states. | |
| -void | addRule (Type from, Type to, const PIString &condition, Handler handler=0, bool autoTransition=false, bool resetAllConditions=false) |
| Add rule of transition. | |
| -void | addRule (Type from, Type to, Handler handler, bool autoTransition=false, bool resetAllConditions=false) |
| Add rule of transition. | |
| -void | addRule (Type from, Type to, const PIStringList &conditions=PIStringList(), Handler handler=0, bool autoTransition=false, bool resetAllConditions=false) |
| Add rule of transition. | |
| -void | addRule (const Rule &rule) |
| Add rule of transition. | |
| -int | rulesCount () const |
| Rules count. | |
| -void | clearRules () |
| Remove all rules. | |
| -void | setInitialState (Type value) |
| Setup initial state. reset() will set machine state to "value". | |
| bool | switchToState (Type to) |
| Try to switch machine state to state "to". More... | |
| -void | reset () |
| Reset machine state to initial and clear all conditions. | |
| -const State & | currentState () const |
| Returns current state of machine. | |
| -void | resetConditions () |
| Reset all performed conditions. | |
| -void | resetCondition (const PIString &name) |
| Reset performed condition with name "name". | |
| -void | performCondition (const PIString &name, int times=1) |
| Perform condition with name "name" "times" times. | |
| -void | performConditions (const PIStringList &names) |
| Perform every condition with name from "names" one time. | |
| -const PIVector< Condition > & | currentConditions () const |
| Returns all current performed conditions. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Protected Member Functions | |
| -virtual void | execution (const State &state) |
| Reimplement this function to process current state of machine. | |
| -virtual void | transition (const State &from, const State &to) |
| Reimplement this function to process switching current state of machine. | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
-Handlers | |
| -void | tick () |
| Main function of machine. Execute execution() and check if need to switch state. | |
| -void | tick (void *data, int delim) |
| Main function of machine. Execute execution() and check if need to switch state. | |
-Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Base class for custom state machine.
-This class provide functionality of state machine. You should inherit from this class, implement execution() and transition() functions, set rules and periodically call tick() function to proper work of machine.
-State machine operates with "state", "rule" and "condition".
int), associated name and optional "handler" - pointer to function executed on every tick();First of all you should define states of your machine by function addState(). Then you should define transition rules for machine by function addRule(). Finally you can set initial state by function setInitialState() and provide periodically execution of function tick().
-At any time the state machine is in some state. You can ask machine to enter in new state by function switchToState(). If all conditions done machine switch it state immediately, else machine remember request and will be try switch to the new state every tick. Successfull state switching execute function transition(), every tick execute function execution() with current state. On successfull transition if rule "handler" is not null it execute. Every tick() if current state "handler" is not null it execute.
-Each rule has transition condition. Condition is array of pairs (string, number). It means that every condition by name "string" should be performed as least "number" times. Empty condition always permits transition.
-State machine have current performed conditions. You can read this conditions by function currentConditions() and perform new conditions by functions performCondition() and performConditions(). Currend conditions can de erased by function resetConditions().
-This is simple example demonstrates all features:
-
|
- -inline | -
Try to switch machine state to state "to".
-If there is rule of transition exists and this rule conditions is performed then machine switched to new state immediately. Otherwise machine will be try to enter to new state every tick().
true if state switched immediately, otherwise false |
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIStreamPacker, including all inherited members.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Simple packet wrap aroud any PIIODevice. - More...
-
-Public Member Functions | |
| - | PIStreamPacker (PIIODevice *dev=0) |
| Contructs packer and try to assign "dev". | |
| -void | setMaxPacketSize (int max_size) |
| Set maximum size of single packet. | |
| -int | maxPacketSize () |
| Returns maximum size of single packet, default 1400 bytes. | |
| -void | setPacketSign (ushort sign_) |
| Set packet sinature. | |
| -ushort | packetSign () |
| Returns packet sinature, default 0xAFBE. | |
| -void | send (const PIByteArray &data) |
| Prepare data for send and raise sendRequest() events. | |
| -void | received (const PIByteArray &data) |
| Receive data part. If packet is ready, raise received() event. | |
| void | assignDevice (PIIODevice *dev) |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
Public Member Functions inherited from PIEthUtilBase | |
| -void | setCryptEnabled (bool on) |
| Set crypt layer enabled. | |
| -void | cryptEnable () |
| Enable crypt layer. | |
| -void | cryptDisable () |
| Disable crypt layer. | |
| -bool | isCryptEnabled () const |
| Returns if crypt layer enabled. | |
| -void | setCryptKey (const PIByteArray &k) |
| Set crypt layer key to "k". | |
| void | createCryptKey (const PIString &k) |
| -PIByteArray | cryptKey () const |
| Returns crypt layer key. | |
-Handlers | |
| -void | received (uchar *readed, int size) |
| Handler to receive data. PIIODevice::threadedReadEvent() can be connected to this handler. | |
-Events | |
| -void | packetReceiveEvent (PIByteArray data) |
| Raise on packet successfully received. | |
| -void | sendRequest (PIByteArray data) |
| Raise from send() function. This data should be directly sended to your device. You can connect this event to PIIODevice::write() handler. | |
-Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
Protected Member Functions inherited from PIEthUtilBase | |
| -PIByteArray | cryptData (const PIByteArray &data) |
| Returns encrypted data if layer enabled, otherwise returns unchanged "data". | |
| -PIByteArray | decryptData (const PIByteArray &data) |
| Returns decrypted data if layer enabled, otherwise returns unchanged "data". If decryption was unsuccessfull returns empty PIByteArray. | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Simple packet wrap aroud any PIIODevice.
-PIStreamPacker provides simple pack/unpack logic for any data packets.
-When you call send() function data splited into several parts, packetSign() prepended to first part and sendRequest() event raised several times.
-When your device receive some data, call received() function. packetReceiveEvent() event will be raised when packet will be collected.
-Use assignDevice() to connect device to this PIStreamPacker.
-| void PIStreamPacker::assignDevice | -( | -PIIODevice * | -dev | ) | -- |
Connect "dev" PIIODevice::threadedReadEvent() event to received() handler and sendRequest() event to "dev" PIIODevice::write() handler
- -|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIString, including all inherited members.
-| append(const PIString &str) | PIString | inline |
| contains(const char str) const | PIString | inline |
| contains(const PIChar str) const | PIString | inline |
| contains(const char *str) const | PIString | inline |
| contains(const PIString &str) const | PIString | inline |
| cutLeft(const int len) | PIString | inline |
| cutMid(const int start, const int len) | PIString | |
| cutRight(const int len) | PIString | inline |
| data() const | PIString | inline |
| dataAscii() const | PIString | |
| dataConsole() const | PIString | |
| dataUTF8() const | PIString | |
| endsWith(const PIString &str) const | PIString | |
| expandLeftTo(const int len, const PIChar &c) | PIString | inline |
| expandRightTo(const int len, const PIChar &c) | PIString | inline |
| find(const char str, const int start=0) const | PIString | |
| find(const PIString &str, const int start=0) const | PIString | |
| find(const char *str, const int start=0) const | PIString | inline |
| findCWord(const PIString &word, const int start=0) const | PIString | |
| findLast(const char str, const int start=0) const | PIString | |
| findLast(const PIString &str, const int start=0) const | PIString | |
| findLast(const char *str, const int start=0) const | PIString | inline |
| findRange(const PIChar &start, const PIChar &end, const PIChar &shield='\\', const int start_index=0, int *len=0) const | PIString | |
| findWord(const PIString &word, const int start=0) const | PIString | |
| fromAscii(const char *s) | PIString | static |
| fromBool(const bool value) | PIString | inlinestatic |
| fromCodepage(const char *s, const char *c) | PIString | static |
| fromConsole(const char *s) | PIString | static |
| fromNumber(const short value, int base=10, bool *ok=0) | PIString | inlinestatic |
| fromNumber(const ushort value, int base=10, bool *ok=0) | PIString | inlinestatic |
| fromNumber(const int value, int base=10, bool *ok=0) | PIString | inlinestatic |
| fromNumber(const uint value, int base=10, bool *ok=0) | PIString | inlinestatic |
| fromNumber(const long value, int base=10, bool *ok=0) | PIString | inlinestatic |
| fromNumber(const ulong value, int base=10, bool *ok=0) | PIString | inlinestatic |
| fromNumber(const llong &value, int base=10, bool *ok=0) | PIString | inlinestatic |
| fromNumber(const ullong &value, int base=10, bool *ok=0) | PIString | inlinestatic |
| fromNumber(const float value, char format='f', int precision=8) | PIString | inlinestatic |
| fromNumber(const double &value, char format='f', int precision=8) | PIString | inlinestatic |
| fromNumber(const ldouble &value, char format='f', int precision=8) | PIString | inlinestatic |
| fromSystem(const char *s) | PIString | static |
| fromUTF8(const char *s) | PIString | static |
| fromUTF8(const PIByteArray &ba) | PIString | static |
| inBrackets(const PIChar &start, const PIChar &end) const | PIString | |
| insert(const int index, const PIChar &c) | PIString | inline |
| insert(const int index, const char &c) | PIString | inline |
| insert(const int index, const PIString &str) | PIString | |
| insert(const int index, const char *c) | PIString | inline |
| isEmpty() const | PIString | inline |
| left(const int len) const | PIString | inline |
| length() const | PIString | inline |
| lengthAscii() const | PIString | inline |
| mid(const int start, const int len=-1) const | PIString | |
| operator const char *() | PIString | inline |
| operator!=(const PIString &str) const | PIString | |
| operator!=(const PIChar c) const | PIString | inline |
| operator!=(const char *str) const | PIString | inline |
| operator+(const PIString &str, const PIString &f) | PIString | related |
| operator+(const PIString &f, const char *str) | PIString | related |
| operator+(const char *str, const PIString &f) | PIString | related |
| operator+(const PIString &f, const std::string &str) | PIString | related |
| operator+(const std::string &str, const PIString &f) | PIString | related |
| operator<(const PIString &str) const | PIString | |
| operator<(const PIChar c) const | PIString | inline |
| operator<(const char *str) const | PIString | inline |
| operator<<(const PIString &str) | PIString | inline |
| operator<<(const PIChar &c) | PIString | inline |
| operator<<(const char *str) | PIString | inline |
| operator<<(const wchar_t *str) | PIString | inline |
| operator<<(const int &num) | PIString | inline |
| operator<<(const short &num) | PIString | inline |
| operator<<(const long &num) | PIString | inline |
| operator<<(const float &num) | PIString | inline |
| operator<<(const double &num) | PIString | inline |
| operator<<(std::ostream &s, const PIString &v) | PIString | related |
| operator<=(const PIString &str) const | PIString | inline |
| operator<=(const PIChar c) const | PIString | inline |
| operator<=(const char *str) const | PIString | inline |
| operator==(const PIString &str) const | PIString | |
| operator==(const PIChar c) const | PIString | inline |
| operator==(const char *str) const | PIString | inline |
| operator>(const PIString &str) const | PIString | |
| operator>(const PIChar c) const | PIString | inline |
| operator>(const char *str) const | PIString | inline |
| operator>=(const PIString &str) const | PIString | inline |
| operator>=(const PIChar c) const | PIString | inline |
| operator>=(const char *str) const | PIString | inline |
| operator>>(PIByteArray &s, PIString &v) | PIString | friend |
| operator>>(std::istream &s, PIString &v) | PIString | related |
| operator[](const int pos) const | PIString | inline |
| operator[](const int pos) | PIString | inline |
| PIString() | PIString | inline |
| PIString(const PIChar &c) | PIString | inline |
| PIString(const char *str) | PIString | inline |
| PIString(const wchar_t *str) | PIString | inline |
| PIString(const PIByteArray &ba) | PIString | inline |
| PIString(const PIChar *str, const int len) | PIString | inline |
| PIString(const char *str, const int len) | PIString | inline |
| PIString(const int len, const char c) | PIString | inline |
| PIString(const int len, const PIChar &c) | PIString | inline |
| prepend(const PIString &str) | PIString | inline |
| quote(PIChar c=PIChar('"')) | PIString | inline |
| quoted(PIChar c=PIChar('"')) | PIString | inline |
| readableSize(llong bytes) | PIString | static |
| repeat(int times) | PIString | inline |
| repeated(int times) const | PIString | inline |
| replace(const int from, const int count, const PIString &with) | PIString | |
| replace(const PIString &what, const PIString &with, bool *ok=0) | PIString | |
| replaceAll(const PIString &what, const PIString &with) | PIString | |
| replaced(const int from, const int count, const PIString &with) const | PIString | inline |
| replaced(const PIString &what, const PIString &with, bool *ok=0) const | PIString | inline |
| reverse() | PIString | inline |
| reversed() const | PIString | inline |
| right(const int len) const | PIString | inline |
| setNumber(const short value, int base=10, bool *ok=0) | PIString | inline |
| setNumber(const ushort value, int base=10, bool *ok=0) | PIString | inline |
| setNumber(const int value, int base=10, bool *ok=0) | PIString | inline |
| setNumber(const uint value, int base=10, bool *ok=0) | PIString | inline |
| setNumber(const long value, int base=10, bool *ok=0) | PIString | inline |
| setNumber(const ulong value, int base=10, bool *ok=0) | PIString | inline |
| setNumber(const llong &value, int base=10, bool *ok=0) | PIString | inline |
| setNumber(const ullong &value, int base=10, bool *ok=0) | PIString | inline |
| setNumber(const float value, char format='f', int precision=8) | PIString | inline |
| setNumber(const double &value, char format='f', int precision=8) | PIString | inline |
| setNumber(const ldouble &value, char format='f', int precision=8) | PIString | inline |
| setReadableSize(llong bytes) | PIString | |
| split(const PIString &delim) const | PIString | |
| startsWith(const PIString &str) const | PIString | |
| takeCWord() | PIString | |
| takeLeft(const int len) | PIString | inline |
| takeLine() | PIString | |
| takeMid(const int start, const int len=-1) | PIString | inline |
| takeNumber() | PIString | |
| takeRange(const PIChar &start, const PIChar &end, const PIChar &shield='\\') | PIString | |
| takeRight(const int len) | PIString | inline |
| takeSymbol() | PIString | |
| takeWord() | PIString | |
| toBool() const | PIString | |
| toByteArray() const | PIString | inline |
| toChar() const | PIString | |
| toCharset(const char *c) const | PIString | |
| toDouble() const | PIString | |
| toFloat() const | PIString | |
| toInt(int base=-1, bool *ok=0) const | PIString | inline |
| toLDouble() const | PIString | |
| toLLong(int base=-1, bool *ok=0) const | PIString | inline |
| toLong(int base=-1, bool *ok=0) const | PIString | inline |
| toLowerCase() const | PIString | |
| toShort(int base=-1, bool *ok=0) const | PIString | inline |
| toUInt(int base=-1, bool *ok=0) const | PIString | inline |
| toULLong(int base=-1, bool *ok=0) const | PIString | inline |
| toULong(int base=-1, bool *ok=0) const | PIString | inline |
| toUpperCase() const | PIString | |
| toUShort(int base=-1, bool *ok=0) const | PIString | inline |
| toUTF8() const | PIString | |
| trim() | PIString | |
| trimmed() const | PIString |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
String class. - More...
- -Inherits PIDeque< T >.
--Public Member Functions | |
| - | PIString () |
| Contructs an empty string. | |
| - | PIString (const PIChar &c) |
| Contructs string with single symbol "c". | |
| PIString (const char *str) | |
| Contructs string from c-string "str". More... | |
| PIString (const wchar_t *str) | |
Contructs string from wchar_t c-string "str". More... | |
| - | PIString (const PIByteArray &ba) |
| Contructs string from byte array "ba". | |
| - | PIString (const PIChar *str, const int len) |
| Contructs string from "len" characters of buffer "str". | |
| PIString (const char *str, const int len) | |
| Contructs string from "len" characters of buffer "str". More... | |
| PIString (const int len, const char c) | |
| Contructs string as sequence of characters "c" of buffer with length "len". More... | |
| PIString (const int len, const PIChar &c) | |
| Contructs string as sequence of symbols "c" of buffer with length "len". More... | |
| operator const char * () | |
| Return c-string representation of string. More... | |
| -PIChar | operator[] (const int pos) const |
| Return symbol at index "pos". | |
| -PIChar & | operator[] (const int pos) |
| Return reference to symbol at index "pos". | |
| -bool | operator== (const PIString &str) const |
| Compare operator. | |
| -bool | operator== (const PIChar c) const |
| Compare operator. | |
| -bool | operator== (const char *str) const |
| Compare operator. | |
| -bool | operator!= (const PIString &str) const |
| Compare operator. | |
| -bool | operator!= (const PIChar c) const |
| Compare operator. | |
| -bool | operator!= (const char *str) const |
| Compare operator. | |
| -bool | operator< (const PIString &str) const |
| Compare operator. | |
| -bool | operator< (const PIChar c) const |
| Compare operator. | |
| -bool | operator< (const char *str) const |
| Compare operator. | |
| -bool | operator> (const PIString &str) const |
| Compare operator. | |
| -bool | operator> (const PIChar c) const |
| Compare operator. | |
| -bool | operator> (const char *str) const |
| Compare operator. | |
| -bool | operator<= (const PIString &str) const |
| Compare operator. | |
| -bool | operator<= (const PIChar c) const |
| Compare operator. | |
| -bool | operator<= (const char *str) const |
| Compare operator. | |
| -bool | operator>= (const PIString &str) const |
| Compare operator. | |
| -bool | operator>= (const PIChar c) const |
| Compare operator. | |
| -bool | operator>= (const char *str) const |
| Compare operator. | |
| PIString & | operator<< (const PIString &str) |
| Append string "str" at the end of string. More... | |
| PIString & | operator<< (const PIChar &c) |
| Append symbol "c" at the end of string. More... | |
| PIString & | operator<< (const char *str) |
| Append c-string "str" at the end of string. More... | |
| PIString & | operator<< (const wchar_t *str) |
Append wchar_t c-string "str" at the end of string. More... | |
| PIString & | operator<< (const int &num) |
| Append string representation of "num" at the end of string. More... | |
| PIString & | operator<< (const short &num) |
| Append string representation of "num" at the end of string. More... | |
| PIString & | operator<< (const long &num) |
| Append string representation of "num" at the end of string. More... | |
| PIString & | operator<< (const float &num) |
| Append string representation of "num" at the end of string. More... | |
| PIString & | operator<< (const double &num) |
| Append string representation of "num" at the end of string. More... | |
| -PIString & | prepend (const PIString &str) |
| Insert string "str" at the begin of string. | |
| -PIString & | append (const PIString &str) |
| Insert string "str" at the end of string. | |
| PIString | mid (const int start, const int len=-1) const |
| Return part of string from symbol at index "start" and maximum length "len". More... | |
| PIString | left (const int len) const |
| Return part of string from left and maximum length "len". More... | |
| PIString | right (const int len) const |
| Return part of string from right and maximum length "len". More... | |
| PIString & | cutMid (const int start, const int len) |
| Remove part of string from symbol as index "start" and maximum length "len" and return this string. More... | |
| PIString & | cutLeft (const int len) |
| Remove part of string from left and maximum length "len" and return this string. More... | |
| PIString & | cutRight (const int len) |
| Remove part of string from right and maximum length "len" and return this string. More... | |
| PIString & | trim () |
| Remove spaces at the start and at the end of string and return this string. More... | |
| PIString | trimmed () const |
| Return copy of this string without spaces at the start and at the end. More... | |
| PIString & | replace (const int from, const int count, const PIString &with) |
| Replace part of string from index "from" and maximum length "len" with string "with" and return this string. More... | |
| PIString | replaced (const int from, const int count, const PIString &with) const |
| Replace part copy of this string from index "from" and maximum length "len" with string "with" and return copied string. More... | |
| PIString & | replace (const PIString &what, const PIString &with, bool *ok=0) |
| Replace first founded substring "what" with string "with" and return this string. More... | |
| PIString | replaced (const PIString &what, const PIString &with, bool *ok=0) const |
| Replace first founded substring "what" with string "with" and return copied string. More... | |
| PIString & | replaceAll (const PIString &what, const PIString &with) |
| Replace all founded substrings "what" with strings "with" and return this string. More... | |
| PIString & | repeat (int times) |
| Repeat content of string "times" times and return this string. More... | |
| PIString | repeated (int times) const |
| Returns repeated "times" times string. More... | |
| PIString & | insert (const int index, const PIChar &c) |
| Insert symbol "c" after index "index" and return this string. More... | |
| PIString & | insert (const int index, const char &c) |
| Insert symbol "c" after index "index" and return this string. More... | |
| PIString & | insert (const int index, const PIString &str) |
| Insert string "str" after index "index" and return this string. More... | |
| PIString & | insert (const int index, const char *c) |
| Insert string "str" after index "index" and return this string. More... | |
| PIString & | expandRightTo (const int len, const PIChar &c) |
| Enlarge string to length "len" by addition sequence of symbols "c" at the end of string, and return this string. More... | |
| PIString & | expandLeftTo (const int len, const PIChar &c) |
| Enlarge string to length "len" by addition sequence of symbols "c" at the beginning of string, and return this string. More... | |
| PIString & | quote (PIChar c=PIChar('"')) |
| Add "c" symbols at the beginning and end of the string, and return this string. More... | |
| PIString | quoted (PIChar c=PIChar('"')) |
| Return quoted copy of this string. More... | |
| PIString & | reverse () |
| Reverse string and return this string. More... | |
| PIString | reversed () const |
| Reverse copy of this string and return it. More... | |
| PIString | takeMid (const int start, const int len=-1) |
| Take a part of string from symbol at index "start" and maximum length "len" and return it. More... | |
| PIString | takeLeft (const int len) |
| Take a part from the begin of string with maximum length "len" and return it. More... | |
| PIString | takeRight (const int len) |
| Take a part from the end of string with maximum length "len" and return it. More... | |
| PIString | takeSymbol () |
| Take a symbol from the begin of this string and return it. More... | |
| PIString | takeWord () |
| Take a word from the begin of this string and return it. More... | |
| PIString | takeCWord () |
| Take a word with letters, numbers and '_' symbols from the begin of this string and return it. More... | |
| PIString | takeLine () |
| Take a line from the begin of this string and return it. More... | |
| PIString | takeNumber () |
| Take a number with C-format from the begin of this string and return it. More... | |
| PIString | takeRange (const PIChar &start, const PIChar &end, const PIChar &shield='\\') |
| Take a range between "start" and "end" symbols from the begin of this string and return it. More... | |
| PIString | inBrackets (const PIChar &start, const PIChar &end) const |
| Return a string in brackets "start" and "end" symbols from the begin of this string and return it. More... | |
| int | lengthAscii () const |
| Return real bytes count of this string. More... | |
| const char * | data () const |
Return char * representation of this string in system codepage. More... | |
| const char * | dataConsole () const |
Return char * representation of this string in terminal codepage. More... | |
| const char * | dataUTF8 () const |
Return char * representation of this string in UTF-8. More... | |
| const char * | dataAscii () const |
Return char * representation of this string in ASCII. More... | |
| -PIByteArray | toByteArray () const |
| Return PIByteArray contains data() of this string without terminating null-char. | |
| -PIByteArray | toUTF8 () const |
| Return PIByteArray contains UTF-8 data() of this string without terminating null-char. | |
| -PIByteArray | toCharset (const char *c) const |
| Return PIByteArray contains custom charset representation of this string without terminating null-char. | |
| PIStringList | split (const PIString &delim) const |
| Split string with delimiter "delim" to PIStringList and return it. More... | |
| -PIString | toUpperCase () const |
| Convert each symbol in copyed string to upper case and return it. | |
| -PIString | toLowerCase () const |
| Convert each symbol in copyed string to lower case and return it. | |
| -bool | contains (const char str) const |
| Returns if string contains "str". | |
| -bool | contains (const PIChar str) const |
| Returns if string contains "str". | |
| -bool | contains (const char *str) const |
| Returns if string contains "str". | |
| -bool | contains (const PIString &str) const |
| Returns if string contains "str". | |
| int | find (const char str, const int start=0) const |
| Search substring "str" from symbol at index "start" and return first occur position. More... | |
| int | find (const PIString &str, const int start=0) const |
| Search substring "str" from symbol at index "start" and return first occur position. More... | |
| int | find (const char *str, const int start=0) const |
| Search substring "str" from symbol at index "start" and return first occur position. More... | |
| int | findLast (const char str, const int start=0) const |
| Search substring "str" from symbol at index "start" and return last occur position. More... | |
| int | findLast (const PIString &str, const int start=0) const |
| Search substring "str" from symbol at index "start" and return last occur position. More... | |
| int | findLast (const char *str, const int start=0) const |
| Search substring "str" from symbol at index "start" and return last occur position. More... | |
| int | findWord (const PIString &word, const int start=0) const |
| Search word "word" from symbol at index "start" and return first occur position. More... | |
| int | findCWord (const PIString &word, const int start=0) const |
| Search C-style word "word" from symbol at index "start" and return first occur position. More... | |
| int | findRange (const PIChar &start, const PIChar &end, const PIChar &shield='\\', const int start_index=0, int *len=0) const |
| Search range between "start" and "end" symbols at index "start_index" and return first occur position. More... | |
| -bool | startsWith (const PIString &str) const |
| Return if string starts with "str". | |
| -bool | endsWith (const PIString &str) const |
| Return if string ends with "str". | |
| -int | length () const |
| Return symbols length of string. | |
| -bool | isEmpty () const |
Return true if string is empty, i.e. length = 0. | |
| -bool | toBool () const |
Return true if string equal "true", "yes", "on" or positive not null numeric value. | |
| -char | toChar () const |
Return char numeric value of string. | |
| short | toShort (int base=-1, bool *ok=0) const |
Return short numeric value of string in base "base". More... | |
| ushort | toUShort (int base=-1, bool *ok=0) const |
Return ushort numeric value of string in base "base". More... | |
| int | toInt (int base=-1, bool *ok=0) const |
Return int numeric value of string in base "base". More... | |
| uint | toUInt (int base=-1, bool *ok=0) const |
Return uint numeric value of string in base "base". More... | |
| long | toLong (int base=-1, bool *ok=0) const |
Return long numeric value of string in base "base". More... | |
| ulong | toULong (int base=-1, bool *ok=0) const |
Return ulong numeric value of string in base "base". More... | |
| llong | toLLong (int base=-1, bool *ok=0) const |
Return llong numeric value of string in base "base". More... | |
| ullong | toULLong (int base=-1, bool *ok=0) const |
Return ullong numeric value of string in base "base". More... | |
| float | toFloat () const |
Return float numeric value of string. More... | |
| double | toDouble () const |
Return double numeric value of string. More... | |
| ldouble | toLDouble () const |
Return ldouble numeric value of string. More... | |
| PIString & | setNumber (const short value, int base=10, bool *ok=0) |
| Set string content to numeric representation of "value" in base "base". More... | |
| PIString & | setNumber (const ushort value, int base=10, bool *ok=0) |
| Set string content to numeric representation of "value" in base "base". More... | |
| PIString & | setNumber (const int value, int base=10, bool *ok=0) |
| Set string content to numeric representation of "value" in base "base". More... | |
| PIString & | setNumber (const uint value, int base=10, bool *ok=0) |
| Set string content to numeric representation of "value" in base "base". More... | |
| PIString & | setNumber (const long value, int base=10, bool *ok=0) |
| Set string content to numeric representation of "value" in base "base". More... | |
| PIString & | setNumber (const ulong value, int base=10, bool *ok=0) |
| Set string content to numeric representation of "value" in base "base". More... | |
| PIString & | setNumber (const llong &value, int base=10, bool *ok=0) |
| Set string content to numeric representation of "value" in base "base". More... | |
| PIString & | setNumber (const ullong &value, int base=10, bool *ok=0) |
| Set string content to numeric representation of "value" in base "base". More... | |
| PIString & | setNumber (const float value, char format='f', int precision=8) |
| Set string content to numeric representation of "value". More... | |
| PIString & | setNumber (const double &value, char format='f', int precision=8) |
| Set string content to numeric representation of "value". More... | |
| PIString & | setNumber (const ldouble &value, char format='f', int precision=8) |
| Set string content to numeric representation of "value". More... | |
| PIString & | setReadableSize (llong bytes) |
| Set string content to human readable size in B/kB/MB/GB/TB. More... | |
-Static Public Member Functions | |
| static PIString | fromNumber (const short value, int base=10, bool *ok=0) |
| Return string contains numeric representation of "value" in base "base". More... | |
| static PIString | fromNumber (const ushort value, int base=10, bool *ok=0) |
| Return string contains numeric representation of "value" in base "base". More... | |
| static PIString | fromNumber (const int value, int base=10, bool *ok=0) |
| Return string contains numeric representation of "value" in base "base". More... | |
| static PIString | fromNumber (const uint value, int base=10, bool *ok=0) |
| Return string contains numeric representation of "value" in base "base". More... | |
| static PIString | fromNumber (const long value, int base=10, bool *ok=0) |
| Return string contains numeric representation of "value" in base "base". More... | |
| static PIString | fromNumber (const ulong value, int base=10, bool *ok=0) |
| Return string contains numeric representation of "value" in base "base". More... | |
| static PIString | fromNumber (const llong &value, int base=10, bool *ok=0) |
| Return string contains numeric representation of "value" in base "base". More... | |
| static PIString | fromNumber (const ullong &value, int base=10, bool *ok=0) |
| Return string contains numeric representation of "value" in base "base". More... | |
| static PIString | fromNumber (const float value, char format='f', int precision=8) |
| Return string contains numeric representation of "value". More... | |
| static PIString | fromNumber (const double &value, char format='f', int precision=8) |
| Return string contains numeric representation of "value". More... | |
| static PIString | fromNumber (const ldouble &value, char format='f', int precision=8) |
| Return string contains numeric representation of "value". More... | |
| -static PIString | fromBool (const bool value) |
| Return "true" or "false". | |
| -static PIString | fromConsole (const char *s) |
| Return string constructed from terminal codepage. | |
| -static PIString | fromSystem (const char *s) |
| Return string constructed from system codepage. | |
| -static PIString | fromUTF8 (const char *s) |
| Return string constructed from UTF-8. | |
| -static PIString | fromUTF8 (const PIByteArray &ba) |
| Return string constructed from UTF-8. | |
| -static PIString | fromAscii (const char *s) |
| Return string constructed from ASCII. | |
| -static PIString | fromCodepage (const char *s, const char *c) |
| Return string constructed from "c" codepage. | |
| static PIString | readableSize (llong bytes) |
| Return string contains human readable size in B/kB/MB/GB/TB. More... | |
-Friends | |
| -PIByteArray & | operator>> (PIByteArray &s, PIString &v) |
| Input operator from PIByteArray. | |
-Related Functions | |
(Note that these are not member functions.) - | |
| -PIString | operator+ (const PIString &str, const PIString &f) |
| Return concatenated string. | |
| -PIString | operator+ (const PIString &f, const char *str) |
| Return concatenated string. | |
| -PIString | operator+ (const char *str, const PIString &f) |
| Return concatenated string. | |
| -PIString | operator+ (const PIString &f, const std::string &str) |
| Return concatenated string. | |
| -PIString | operator+ (const std::string &str, const PIString &f) |
| Return concatenated string. | |
| -std::ostream & | operator<< (std::ostream &s, const PIString &v) |
| Output operator to std::ostream (cout) | |
| -std::istream & | operator>> (std::istream &s, PIString &v) |
| Input operator from std::istream (cin) | |
String class.
-PIP use this class for use string information.
-This class based on PIVector to store information. String is a sequence of PIChar and can contain multibyte symbols. Therefore real memory size of string is symbols count * 4. String can be constucted from many types of data and can be converted to many types. There are man operators and handly functions to use string as you wish.
-Most common constructor is PIString(const char * str), where "str" is null-terminated string, e.g. "string". This is 7 chars with last char = 0. Also you can constructs PIString from single PIChar, PIByteArray, other PIString or sequency of the same characters with custom length.
-
-This class has implicit conversions to const char * and std::string. Also there are functions to make same convertions:
const char * ,std::string,You can get symbolic representation of any numeric value with function setNumber(any integer value, int base = 10, bool * ok = 0). Default arguments are set for decimal base system, but you can choose any system from 2 to 40. There are the same static functions fromNumber(), that returns PIString.
-Also there is function setReadableSize() which is set human-readable size in bytes, Kb, Mb, Gb or Pb. Static analog is readableSize().
-
|
- -inline | -
Contructs string from c-string "str".
-"str" should be null-terminated
-Example:
-
|
- -inline | -
Contructs string from wchar_t c-string "str".
"str" should be null-terminated
-Example:
-
|
- -inline | -
Contructs string from "len" characters of buffer "str".
-Example:
-
|
- -inline | -
Contructs string as sequence of characters "c" of buffer with length "len".
-Example:
-
|
- -inline | -
Contructs string as sequence of symbols "c" of buffer with length "len".
-Example:
-
|
- -inline | -
Return c-string representation of string.
-Converts content of string to c-string and return pointer to first char. This buffer is valid until new convertion or execution data() or toByteArray().
-Example:
Append string "str" at the end of string.
-Example:
-
|
- -inline | -
Append c-string "str" at the end of string.
-Example:
-
|
- -inline | -
Append wchar_t c-string "str" at the end of string.
Example:
-
|
- -inline | -
Append string representation of "num" at the end of string.
-Example:
-
|
- -inline | -
Append string representation of "num" at the end of string.
-Example:
-
|
- -inline | -
Append string representation of "num" at the end of string.
-Example:
-
|
- -inline | -
Append string representation of "num" at the end of string.
-Example:
-
|
- -inline | -
Append string representation of "num" at the end of string.
-Example:
| PIString PIString::mid | -( | -const int | -start, | -
| - | - | const int | -len = -1 |
-
| - | ) | -const | -
Return part of string from symbol at index "start" and maximum length "len".
-All variants demonstrated in example:
-
|
- -inline | -
-
|
- -inline | -
| PIString & PIString::cutMid | -( | -const int | -start, | -
| - | - | const int | -len | -
| - | ) | -- |
Remove part of string from symbol as index "start" and maximum length "len" and return this string.
-All variants demonstrated in example:
-
|
- -inline | -
-
|
- -inline | -
| PIString & PIString::trim | -( | -) | -- |
| PIString PIString::trimmed | -( | -) | -const | -
| PIString & PIString::replace | -( | -const int | -from, | -
| - | - | const int | -count, | -
| - | - | const PIString & | -with | -
| - | ) | -- |
Replace part of string from index "from" and maximum length "len" with string "with" and return this string.
-Example:
-
|
- -inline | -
Replace part copy of this string from index "from" and maximum length "len" with string "with" and return copied string.
-Example:
| PIString & PIString::replace | -( | -const PIString & | -what, | -
| - | - | const PIString & | -with, | -
| - | - | bool * | -ok = 0 |
-
| - | ) | -- |
Replace first founded substring "what" with string "with" and return this string.
-If "ok" is not null, it set to "true" if something was replaced
-Example:
-
|
- -inline | -
Replace first founded substring "what" with string "with" and return copied string.
-If "ok" is not null, it set to "true" if something was replaced
-Example:
| PIString & PIString::replaceAll | -( | -const PIString & | -what, | -
| - | - | const PIString & | -with | -
| - | ) | -- |
Replace all founded substrings "what" with strings "with" and return this string.
-Example:
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
Enlarge string to length "len" by addition sequence of symbols "c" at the end of string, and return this string.
-Example:
-
|
- -inline | -
Enlarge string to length "len" by addition sequence of symbols "c" at the beginning of string, and return this string.
-Example:
Add "c" symbols at the beginning and end of the string, and return this string.
-Return quoted copy of this string.
-
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
Take a part of string from symbol at index "start" and maximum length "len" and return it.
-Example:
-
|
- -inline | -
Take a part from the begin of string with maximum length "len" and return it.
-Example:
-
|
- -inline | -
Take a part from the end of string with maximum length "len" and return it.
-Example:
| PIString PIString::takeSymbol | -( | -) | -- |
Take a symbol from the begin of this string and return it.
-Example:
| PIString PIString::takeWord | -( | -) | -- |
Take a word from the begin of this string and return it.
-Example:
| PIString PIString::takeCWord | -( | -) | -- |
Take a word with letters, numbers and '_' symbols from the begin of this string and return it.
-Example:
| PIString PIString::takeLine | -( | -) | -- |
Take a line from the begin of this string and return it.
-Example:
| PIString PIString::takeNumber | -( | -) | -- |
Take a number with C-format from the begin of this string and return it.
-Example:
| PIString PIString::takeRange | -( | -const PIChar & | -start, | -
| - | - | const PIChar & | -end, | -
| - | - | const PIChar & | -shield = '\\' |
-
| - | ) | -- |
Take a range between "start" and "end" symbols from the begin of this string and return it.
-"Shield" symbol prevent analysis of the next symbol. Example:
| PIString PIString::inBrackets | -( | -const PIChar & | -start, | -
| - | - | const PIChar & | -end | -
| - | ) | -const | -
Return a string in brackets "start" and "end" symbols from the begin of this string and return it.
-Example: string = "a(b(c)d)e"; inBrackets('(', ')') = "b(c)d";
- -
-
|
- -inline | -
-
|
- -inline | -
Return char * representation of this string in system codepage.
This function fill buffer by sequence of chars. Minimum length of this buffer is count of symbols. Returned char * is valid until next execution of this function.
-Example:
| const char * PIString::dataConsole | -( | -) | -const | -
Return char * representation of this string in terminal codepage.
This function fill buffer by sequence of chars. Minimum length of this buffer is count of symbols. Returned char * is valid until next execution of this function.
-
| const char * PIString::dataUTF8 | -( | -) | -const | -
Return char * representation of this string in UTF-8.
This function fill buffer by sequence of chars. Minimum length of this buffer is count of symbols. Returned char * is valid until next execution of this function.
-
| const char * PIString::dataAscii | -( | -) | -const | -
Return char * representation of this string in ASCII.
This function fill buffer by sequence of chars. Minimum length of this buffer is count of symbols. Returned char * is valid until next execution of this function.
-
| PIStringList PIString::split | -( | -const PIString & | -delim | ) | -const | -
Split string with delimiter "delim" to PIStringList and return it.
-Example:
-| int PIString::find | -( | -const char | -str, | -
| - | - | const int | -start = 0 |
-
| - | ) | -const | -
| int PIString::find | -( | -const PIString & | -str, | -
| - | - | const int | -start = 0 |
-
| - | ) | -const | -
-
|
- -inline | -
| int PIString::findLast | -( | -const char | -str, | -
| - | - | const int | -start = 0 |
-
| - | ) | -const | -
| int PIString::findLast | -( | -const PIString & | -str, | -
| - | - | const int | -start = 0 |
-
| - | ) | -const | -
-
|
- -inline | -
| int PIString::findWord | -( | -const PIString & | -word, | -
| - | - | const int | -start = 0 |
-
| - | ) | -const | -
| int PIString::findCWord | -( | -const PIString & | -word, | -
| - | - | const int | -start = 0 |
-
| - | ) | -const | -
| int PIString::findRange | -( | -const PIChar & | -start, | -
| - | - | const PIChar & | -end, | -
| - | - | const PIChar & | -shield = '\\', |
-
| - | - | const int | -start_index = 0, |
-
| - | - | int * | -len = 0 |
-
| - | ) | -const | -
Search range between "start" and "end" symbols at index "start_index" and return first occur position.
-Example:
-
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
| float PIString::toFloat | -( | -) | -const | -
| double PIString::toDouble | -( | -) | -const | -
| ldouble PIString::toLDouble | -( | -) | -const | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
| PIString & PIString::setReadableSize | -( | -llong | -bytes | ) | -- |
Set string content to human readable size in B/kB/MB/GB/TB.
-Example:
-
|
- -inlinestatic | -
Return string contains numeric representation of "value" in base "base".
-Example:
-
|
- -inlinestatic | -
Return string contains numeric representation of "value" in base "base".
-Example:
-
|
- -inlinestatic | -
Return string contains numeric representation of "value" in base "base".
-Example:
-
|
- -inlinestatic | -
Return string contains numeric representation of "value" in base "base".
-Example:
-
|
- -inlinestatic | -
Return string contains numeric representation of "value" in base "base".
-Example:
-
|
- -inlinestatic | -
Return string contains numeric representation of "value" in base "base".
-Example:
-
|
- -inlinestatic | -
Return string contains numeric representation of "value" in base "base".
-Example:
-
|
- -inlinestatic | -
Return string contains numeric representation of "value" in base "base".
-Example:
-
|
- -inlinestatic | -
Return string contains numeric representation of "value".
-Example:
-
|
- -inlinestatic | -
Return string contains numeric representation of "value".
-Example:
-
|
- -inlinestatic | -
Return string contains numeric representation of "value".
-Example:
-
|
- -static | -
Return string contains human readable size in B/kB/MB/GB/TB.
-Example:
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIStringList, including all inherited members.
-| contentSize() | PIStringList | inline |
| join(const PIString &delim) const | PIStringList | inline |
| operator!=(const PIStringList &o) const | PIStringList | inline |
| operator<<(std::ostream &s, const PIStringList &v) | PIStringList | related |
| operator==(const PIStringList &o) const | PIStringList | inline |
| PIStringList() | PIStringList | inline |
| PIStringList(const PIString &str) | PIStringList | inline |
| PIStringList(const PIString &s0, const PIString &s1) | PIStringList | inline |
| PIStringList(const PIString &s0, const PIString &s1, const PIString &s2) | PIStringList | inline |
| PIStringList(const PIString &s0, const PIString &s1, const PIString &s2, const PIString &s3) | PIStringList | inline |
| removeDuplicates() | PIStringList | |
| removeStrings(const PIString &value) | PIStringList | inline |
| trim() | PIStringList | inline |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Strings array class. - More...
- -Inherits PIDeque< T >.
--Public Member Functions | |
| - | PIStringList () |
| Contructs empty strings list. | |
| - | PIStringList (const PIString &str) |
| Contructs strings list with one string "str". | |
| - | PIStringList (const PIString &s0, const PIString &s1) |
| Contructs empty strings list with strings "s0" and "s1". | |
| - | PIStringList (const PIString &s0, const PIString &s1, const PIString &s2) |
| Contructs empty strings list with strings "s0", "s1" and "s2". | |
| - | PIStringList (const PIString &s0, const PIString &s1, const PIString &s2, const PIString &s3) |
| Contructs empty strings list with strings "s0", "s1", "s2" and "s3". | |
| PIString | join (const PIString &delim) const |
| Join all strings in one with delimiter "delim" and return it. More... | |
| PIStringList & | removeStrings (const PIString &value) |
| Remove all strings equal "value" and return this. More... | |
| PIStringList & | removeDuplicates () |
| Remove duplicated strings and return this. More... | |
| PIStringList & | trim () |
| Trim all strings. More... | |
| -uint | contentSize () |
| Return sum of lengths of all strings. | |
| -bool | operator== (const PIStringList &o) const |
| Compare operator. | |
| -bool | operator!= (const PIStringList &o) const |
| Compare operator. | |
-Related Functions | |
(Note that these are not member functions.) - | |
| -std::ostream & | operator<< (std::ostream &s, const PIStringList &v) |
| Output operator to std::ostream (cout) | |
Strings array class.
-This class is based on PIDeque<PIString> and expand it functionality.
-
-
|
- -inline | -
Join all strings in one with delimiter "delim" and return it.
-Example:
-
-
|
- -inline | -
Remove all strings equal "value" and return this.
-Example:
| PIStringList & PIStringList::removeDuplicates | -( | -) | -- |
-
|
- -inline | -
Trim all strings.
-Example:
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PISystemTime, including all inherited members.
-| abs() const | PISystemTime | |
| addMicroseconds(double v) | PISystemTime | inline |
| addMilliseconds(double v) | PISystemTime | inline |
| addNanoseconds(double v) | PISystemTime | inline |
| addSeconds(double v) | PISystemTime | inline |
| current(bool precise_but_not_system=false) | PISystemTime | static |
| fromMicroseconds(double v) | PISystemTime | inlinestatic |
| fromMilliseconds(double v) | PISystemTime | inlinestatic |
| fromNanoseconds(double v) | PISystemTime | inlinestatic |
| fromSeconds(double v) | PISystemTime | inlinestatic |
| nanoseconds | PISystemTime | |
| operator!=(const PISystemTime &t) const | PISystemTime | inline |
| operator*(const double &v) const | PISystemTime | inline |
| operator*=(const double &v) | PISystemTime | inline |
| operator+(const PISystemTime &t) const | PISystemTime | inline |
| operator+=(const PISystemTime &t) | PISystemTime | inline |
| operator-(const PISystemTime &t) const | PISystemTime | inline |
| operator-=(const PISystemTime &t) | PISystemTime | inline |
| operator/(const double &v) const | PISystemTime | inline |
| operator/=(const double &v) | PISystemTime | inline |
| operator<(const PISystemTime &t) const | PISystemTime | inline |
| operator<=(const PISystemTime &t) const | PISystemTime | inline |
| operator==(const PISystemTime &t) const | PISystemTime | inline |
| operator>(const PISystemTime &t) const | PISystemTime | inline |
| operator>=(const PISystemTime &t) const | PISystemTime | inline |
| PISystemTime() | PISystemTime | inline |
| PISystemTime(int s, int ns) | PISystemTime | inline |
| PISystemTime(const PISystemTime &t) | PISystemTime | inline |
| seconds | PISystemTime | |
| sleep() | PISystemTime | inline |
| toMicroseconds() const | PISystemTime | inline |
| toMilliseconds() const | PISystemTime | inline |
| toNanoseconds() const | PISystemTime | inline |
| toSeconds() const | PISystemTime | inline |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
System time. - More...
--Public Member Functions | |
| - | PISystemTime () |
| Contructs system time with s = ns = 0. | |
| - | PISystemTime (int s, int ns) |
| Contructs system time with s = "s" and ns = "ns". | |
| - | PISystemTime (const PISystemTime &t) |
| Contructs system time from another. | |
| -double | toSeconds () const |
| Returns stored system time value in seconds. | |
| -double | toMilliseconds () const |
| Returns stored system time value in milliseconds. | |
| -double | toMicroseconds () const |
| Returns stored system time value in microseconds. | |
| -double | toNanoseconds () const |
| Returns stored system time value in nanoseconds. | |
| -PISystemTime & | addSeconds (double v) |
| Add to stored system time "v" seconds. | |
| -PISystemTime & | addMilliseconds (double v) |
| Add to stored system time "v" milliseconds. | |
| -PISystemTime & | addMicroseconds (double v) |
| Add to stored system time "v" microseconds. | |
| -PISystemTime & | addNanoseconds (double v) |
| Add to stored system time "v" nanoseconds. | |
| void | sleep () |
| -PISystemTime | abs () const |
| Returns copy of this system time with absolutely values of s and ns. | |
| -PISystemTime | operator+ (const PISystemTime &t) const |
| Returns sum of this system time with "t". | |
| -PISystemTime | operator- (const PISystemTime &t) const |
| Returns difference between this system time and "t". | |
| -PISystemTime | operator* (const double &v) const |
| Returns multiplication between this system time and "t". | |
| -PISystemTime | operator/ (const double &v) const |
| Returns division between this system time and "t". | |
| -PISystemTime & | operator+= (const PISystemTime &t) |
| Add to stored value system time "t". | |
| -PISystemTime & | operator-= (const PISystemTime &t) |
| Subtract from stored value system time "t". | |
| -PISystemTime & | operator*= (const double &v) |
| Multiply stored value system time by "v". | |
| -PISystemTime & | operator/= (const double &v) |
| Divide stored value system time by "v". | |
| -bool | operator== (const PISystemTime &t) const |
| Compare system times. | |
| -bool | operator!= (const PISystemTime &t) const |
| Compare system times. | |
| -bool | operator> (const PISystemTime &t) const |
| Compare system times. | |
| -bool | operator< (const PISystemTime &t) const |
| Compare system times. | |
| -bool | operator>= (const PISystemTime &t) const |
| Compare system times. | |
| -bool | operator<= (const PISystemTime &t) const |
| Compare system times. | |
-Static Public Member Functions | |
| -static PISystemTime | fromSeconds (double v) |
| Contructs system time from seconds "v". | |
| -static PISystemTime | fromMilliseconds (double v) |
| Contructs system time from milliseconds "v". | |
| -static PISystemTime | fromMicroseconds (double v) |
| Contructs system time from microseconds "v". | |
| -static PISystemTime | fromNanoseconds (double v) |
| Contructs system time from nanoseconds "v". | |
| -static PISystemTime | current (bool precise_but_not_system=false) |
| Returns current system time. | |
-Public Attributes | |
| -int | seconds |
| Seconds of stored system time. | |
| -int | nanoseconds |
| Nanoseconds of stored system time. | |
System time.
-This class provide arithmetic functions for POSIX system time. This time represents as seconds and nanosecons in integer formats. You can take current system time with function PISystemTime::current(), compare times, sum or subtract two times, convert time to/from seconds, milliseconds, microseconds or nanoseconds.
-
-
|
- -inline | -
Sleep for stored value.
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIThread, including all inherited members.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Thread class. - More...
-
-Public Types | |
| enum | Priority { - piLowerst, -piLow, -piNormal, -piHigh, - - piHighest - - } |
| Priority of thread. More... | |
-Public Member Functions | |
| - | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| - | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| -void | setData (void *d) |
| Set common data passed to external function. | |
| -void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| -void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| -void * | data () const |
| Returns common data passed to external function. | |
| -PIThread::Priority | priority () const |
| Return priority of thread. | |
| -bool | isRunning () const |
Return true if thread is running. | |
| -void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| -PIMutex & | mutex () |
| Returns internal mutex. | |
| -llong | tid () const |
| Returns thread ID. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Protected Member Functions | |
| -virtual void | begin () |
| Function executed once at the start of thread. | |
| -virtual void | run () |
| Function executed at every "timer_delay" msecs until thread was stopped. | |
| -virtual void | end () |
| Function executed once at the end of thread. | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
-Handlers | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| -void | lock () |
| Lock internal mutex. | |
| -void | unlock () |
| Unlock internal mutex. | |
-Events | |
| -void | started () |
| Raise on thread start. | |
| -void | stopped () |
| Raise on thread stop. | |
-Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Thread class.
-This class allow you exec your code in separate thread.
-Multithreading allow you to write program which will be executed in several threads simultaneously. This trend allow you to use all cores of modern processors, but there are many dangers.
-This class provide virtual functions begin(), run() and end(), which describes start, execution and finish work of some process. These functions executes in separate thread. When you execute start(), PIThread create separate system thread and sequentially executes function begin(), run() and end(). You can reimplement each function and write your own code to execute. Scheme of functions executing:
Unlike from directly using "pthread" or some similar you doesn`t need to write your own main thread cycle and sleep at every cycle end. PIThread make it for you, and your job is to set sleep value from contructor or when starting thread, and reimplement begin(), run() and end() functions.
-You can use PIThread without subclassing by using "ThreadFunc" pointer that can be set from constructor or by overloaded function start(ThreadFunc func, int timer_delay). If "func" if not null this function will be executed as run(). ThreadFunc is any static function with format void func(void * data). "Data" is custom data set from constructor or with function setData().
- Also you can connect to event started(), but in this case you should to white your thread main cycle, because this event raised only one time.
PIThread has inrternal mutex that can be locked and unlocked every run() if you set this flag with function needLockRun(bool). Also you can access to this mutex by functions lock(), unlock() and mutex(). Using this functions together with needLockRun(true) can guarantee one-thread access to some data.
-| enum PIThread::Priority | -
| bool PIThread::start | -( | -int | -timer_delay = -1 | ) | -- |
| bool PIThread::startOnce | -( | -) | -- |
-
|
- -inline | -
Start thread without internal loop.
-Overloaded function. Set external function "func" before start
-false if thread already started or can`t start thread
-
|
- -inline | -
Stop thread.
-Stop execution of thread and wait for it finish if "wait" is true. This function can block for infinite time if "wait" is true and any of thread function is busy forever
| void PIThread::terminate | -( | -) | -- |
Strongly stop thread.
-Stop execution of thread immediately
- -| bool PIThread::waitForStart | -( | -int | -timeout_msecs = -1 | ) | -- |
Wait for thread start.
-This function block until thread finish for "timeout_msecs" or forever if "timeout_msecs" < 0
-false if timeout is exceeded | bool PIThread::waitForFinish | -( | -int | -timeout_msecs = -1 | ) | -- |
Wait for thread finish.
-This function block until thread start for "timeout_msecs" or forever if "timeout_msecs" < 0
-false if timeout is exceeded |
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PITimeMeasurer, including all inherited members.
-| elapsed() const | PITimeMeasurer | |
| elapsed_m() const | PITimeMeasurer | |
| elapsed_n() const | PITimeMeasurer | |
| elapsed_s() const | PITimeMeasurer | |
| elapsed_system() | PITimeMeasurer | inlinestatic |
| elapsed_system_m() | PITimeMeasurer | inlinestatic |
| elapsed_system_n() | PITimeMeasurer | inlinestatic |
| elapsed_system_s() | PITimeMeasurer | inlinestatic |
| elapsed_system_u() | PITimeMeasurer | inlinestatic |
| elapsed_u() const | PITimeMeasurer | |
| reset() | PITimeMeasurer | inline |
| reset_time() | PITimeMeasurer | inline |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Time measurements. - More...
--Public Member Functions | |
| void | reset () |
| Set internal time mark to current system time. More... | |
| -double | elapsed_n () const |
| Returns nanoseconds elapsed from last reset() execution or from timer measurer creation. | |
| -double | elapsed_u () const |
| Returns microseconds elapsed from last reset() execution or from timer measurer creation. | |
| -double | elapsed_m () const |
| Returns milliseconds elapsed from last reset() execution or from timer measurer creation. | |
| -double | elapsed_s () const |
| Returns seconds elapsed from last reset() execution or from timer measurer creation. | |
| -PISystemTime | elapsed () const |
| Returns PISystemTime elapsed from last reset() execution or from timer measurer creation. | |
| -PISystemTime | reset_time () |
| Returns time mark of last reset() execution or timer measurer creation. | |
-Static Public Member Functions | |
| -static double | elapsed_system_n () |
| Returns nanoseconds representation of current system time. | |
| -static double | elapsed_system_u () |
| Returns microseconds representation of current system time. | |
| -static double | elapsed_system_m () |
| Returns milliseconds representation of current system time. | |
| -static double | elapsed_system_s () |
| Returns seconds representation of current system time. | |
| -static PISystemTime | elapsed_system () |
| Returns time mark of current system time. | |
Time measurements.
-Function reset() set time mark to current system time, then functions double elapsed_*() returns time elapsed from this mark. These functions can returns nano-, micro-, milli- and seconds with suffixes "n", "u", "m" and "s"
-
-
|
- -inline | -
Set internal time mark to current system time.
-This function used for set start time mark. Later you can find out elapsed time from this time mark to any moment of time with elapsed_s(), elapsed_m(), elapsed_u() or elapsed_n() functions.
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PITimer, including all inherited members.
-| addDelimiter(int delim, TimerEvent slot=0) | PITimer | inline |
| className() const | PIObject | inlinevirtual |
| clearDelimiters() | PITimer | inline |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| CONNECTU_QUEUED | PIObject | related |
| data() const | PITimer | inline |
| debug() const | PIObject | inline |
| deleted() | PIObject | protected |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlinestatic |
| HANDLER | PIObject | related |
| implementation() const | PITimer | inline |
| interval() const | PITimer | inline |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isRunning() const | PITimer | inline |
| isStopped() const | PITimer | inline |
| name() const | PIObject | inline |
| parentClassName() const | PIObject | inlinevirtual |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| PIObject(const PIString &name=PIString()) | PIObject | explicit |
| PIOBJECT | PIObject | related |
| PIOBJECT_SUBCLASS | PIObject | related |
| PITimer() | PITimer | explicit |
| PITimer(TimerImplementation ti) | PITimer | explicit |
| PITimer(TimerEvent slot, void *data=0, TimerImplementation ti=Thread) | PITimer | explicit |
| Pool enum value | PITimer | |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| removeDelimiter(int delim) | PITimer | inline |
| removeDelimiter(TimerEvent slot) | PITimer | inline |
| removeDelimiter(int delim, TimerEvent slot) | PITimer | inline |
| restart() | PITimer | inline |
| setData(void *data_) | PITimer | inline |
| setDebug(bool debug) | PIObject | inline |
| setInterval(double ms) | PITimer | inline |
| setName(const PIString &name) | PIObject | inline |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setSlot(TimerEvent slot) | PITimer | inline |
| start() | PITimer | inline |
| start(double interval_ms_d) | PITimer | inline |
| startDeferred(double delay_ms) | PITimer | inline |
| startDeferred(double interval_ms, double delay_ms) | PITimer | inline |
| startDeferred(PIDateTime start_datetime) | PITimer | inline |
| startDeferred(double interval_ms, PIDateTime start_datetime) | PITimer | inline |
| stop(bool wait) | PITimer | inline |
| Thread enum value | PITimer | |
| ThreadRT enum value | PITimer | |
| tick(void *data_, int delimiter) | PITimer | inlineprotectedvirtual |
| tickEvent(void *data_, int delimiter) | PITimer | |
| TimerImplementation enum name | PITimer | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Timer. - More...
-
-Public Types | |
| enum | TimerImplementation { Thread = 0x01, -ThreadRT = 0x02, -Pool = 0x04 - } |
| Timer implementations. More... | |
-Public Member Functions | |
| - | PITimer () |
| Constructs timer with PITimer::Thread implementation. | |
| - | PITimer (TimerImplementation ti) |
| Constructs timer with "ti" implementation. | |
| - | PITimer (TimerEvent slot, void *data=0, TimerImplementation ti=Thread) |
| Constructs timer with "slot" slot, "data" data and "ti" implementation. | |
| -PITimer::TimerImplementation | implementation () const |
| Returns timer implementation. | |
| -double | interval () const |
| Returns timer loop delay in milliseconds. | |
| -void | setInterval (double ms) |
| Set timer loop delay in milliseconds. | |
| -bool | isRunning () const |
| Returns if timer is started. | |
| -bool | isStopped () const |
| Returns if timer is not started. | |
| void | startDeferred (double delay_ms) |
| Start timer with interval() loop delay after delay_msecs delay. More... | |
| void | startDeferred (double interval_ms, double delay_ms) |
| Start timer with interval_msecs loop delay after delay_msecs delay. More... | |
| void | startDeferred (PIDateTime start_datetime) |
| Start timer with interval() loop delay after start_datetime date and time. More... | |
| void | startDeferred (double interval_ms, PIDateTime start_datetime) |
| Start timer with interval_msecs loop delay after start_datetime date and time. More... | |
| -void | setData (void *data_) |
| Set custom data. | |
| -void | setSlot (TimerEvent slot) |
| Set timer tick function. | |
| -void * | data () const |
| Returns common data passed to tick functions. | |
| -void | addDelimiter (int delim, TimerEvent slot=0) |
| Add frequency delimiter delim with optional delimiter slot slot. | |
| -void | removeDelimiter (int delim) |
| Remove all frequency delimiters delim. | |
| -void | removeDelimiter (TimerEvent slot) |
| Remove all frequency delimiters with slot slot. | |
| -void | removeDelimiter (int delim, TimerEvent slot) |
| Remove all frequency delimiters delim with slot slot. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Protected Member Functions | |
| virtual void | tick (void *data_, int delimiter) |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
-Handlers | |
| bool | start () |
| Start timer with interval() loop delay. More... | |
| bool | start (double interval_ms_d) |
| Start timer with msecs loop delay. More... | |
| -bool | restart () |
| Stop and start timer with interval() loop delay. | |
| -bool | stop (bool wait) |
| Stop timer and wait for it finish if "wait". | |
| -void | clearDelimiters () |
| Remove all frequency delimiters. | |
-Events | |
| void | tickEvent (void *data_, int delimiter) |
| Raise on timer tick. More... | |
-Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Timer.
-This class implements timer function. PIP timers supports 3 way to tick notify, frequency delimiters and time measurements.
-Notify variants:
All these variants are equivalent, use most applicable.
-Frequency delimiter is an integer number and "slot" function. If "slot" function is null timer main "slot" will be used. Each delimiter numbers tick timer will be execute delimiters or timer main "slot" function with delimiter value = delimiter number. Example:
PITimer can be used as time measurer. Function reset() set time mark to current system time, then functions double elapsed_*() returns time elapsed from this mark. These functions can returns nano-, micro-, milli- and seconds with suffixes "n", "u", "m" and "s" Example:
| enum PITimer::TimerImplementation | -
Timer implementations.
-
-
|
- -inline | -
Start timer with interval() loop delay.
-Start execution of timer functions with frequency = 1 / msecs Hz.
- -
-
|
- -inline | -
Start timer with msecs loop delay.
-Start execution of timer functions with frequency = 1. / msecs Hz. Instead of start(int msecs) function this variant allow start timer with frequencies more than 1 kHz
- -
-
|
- -inline | -
Start timer with interval() loop delay after delay_msecs delay.
-Timer wait delay_msecs milliseconds and then normally starts with interval() loop delay.
- -
-
|
- -inline | -
Start timer with interval_msecs loop delay after delay_msecs delay.
-Timer wait delay_msecs milliseconds and then normally starts with interval_msecs loop delay.
- -
-
|
- -inline | -
Start timer with interval() loop delay after start_datetime date and time.
-Timer wait until start_datetime and then normally starts with interval() loop delay.
- -
-
|
- -inline | -
Start timer with interval_msecs loop delay after start_datetime date and time.
-Timer wait until start_datetime and then normally starts with interval_msecs loop delay.
- -| void PITimer::tickEvent | -( | -void * | -data, | -
| - | - | int | -delimiter | -
| - | ) | -- |
Raise on timer tick.
-Data can be set with function setData(void * data) or from constructor. Delimiter is frequency delimiter, 1 for main loop.
- -
-
|
- -inlineprotectedvirtual | -
Virtual timer execution function, similar to "slot" or event void timeout(void * data, int delimiter). By default is empty.
- -|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PITransparentDevice, including all inherited members.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
PIIODevice that pass write to read. - More...
-
-Public Member Functions | |
| - | PITransparentDevice () |
| Contructs empty PITransparentDevice. | |
Public Member Functions inherited from PIIODevice | |
| - | PIIODevice () |
| Constructs a empty PIIODevice. | |
| PIIODevice (const PIString &path, DeviceMode mode=ReadWrite) | |
| Constructs a PIIODevice with path and mode. More... | |
| -DeviceMode | mode () const |
| Current open mode of device. | |
| -void | setMode (DeviceMode m) |
| Set open mode of device. | |
| -DeviceOptions | options () const |
| Current device options. | |
| -bool | isOptionSet (DeviceOption o) const |
| Current device option "o" state. | |
| -void | setOptions (DeviceOptions o) |
| Set device options. | |
| -bool | setOption (DeviceOption o, bool yes=true) |
| Set device option "o" to "yes" and return previous state. | |
| -DeviceInfoFlags | infoFlags () const |
| Returns device characteristic flags. | |
| -PIString | path () const |
| Current path of device. | |
| -void | setPath (const PIString &path) |
| Set path of device. | |
| -bool | isReadable () const |
| Return true if mode is ReadOnly or ReadWrite. | |
| -bool | isWriteable () const |
| Return true if mode is WriteOnly or ReadWrite. | |
| -bool | isOpened () const |
| Return true if device is successfully opened. | |
| -bool | isClosed () const |
| Return true if device is closed. | |
| -virtual bool | canRead () const |
| Return true if device can read now. | |
| -virtual bool | canWrite () const |
| Return true if device can write now. | |
| -void | setReopenEnabled (bool yes=true) |
| Set execution of open enabled while threaded read on closed device. | |
| -void | setReopenTimeout (int msecs) |
| Set timeout in milliseconds between open tryings if reopen is enabled. | |
| -bool | isReopenEnabled () const |
| Return reopen enable. | |
| -int | reopenTimeout () |
| Return reopen timeout. | |
| void | setThreadedReadSlot (ReadRetFunc func) |
| Set "threaded read slot". More... | |
| -void | setThreadedReadData (void *d) |
| Set custom data that will be passed to "threaded read slot". | |
| void | setThreadedReadBufferSize (int new_size) |
| Set size of threaded read buffer. More... | |
| -int | threadedReadBufferSize () const |
| Return size of threaded read buffer. | |
| -const uchar * | threadedReadBuffer () const |
| Return content of threaded read buffer. | |
| -void * | threadedReadData () const |
| Return custom data that will be passed to "threaded read slot". | |
| -bool | isThreadedRead () const |
| Return true if threaded read is started. | |
| -void | startThreadedRead () |
| Start threaded read. | |
| -void | startThreadedRead (ReadRetFunc func) |
| Start threaded read and assign "threaded read slot" to "func". | |
| -void | stopThreadedRead () |
| Stop threaded read. | |
| -bool | isThreadedWrite () const |
| Return true if threaded write is started. | |
| -void | startThreadedWrite () |
| Start threaded write. | |
| -void | stopThreadedWrite () |
| Stop threaded write. | |
| -void | clearThreadedWriteQueue () |
| Clear threaded write task queue. | |
| -void | start () |
| Start both threaded read and threaded write. | |
| -void | stop (bool wait=false) |
| Stop both threaded read and threaded write and if "wait" block until both threads are stop. | |
| -int | read (void *read_to, int max_size) |
| Read from device maximum "max_size" bytes to "read_to". | |
| -PIByteArray | read (int max_size) |
| Read from device maximum "max_size" bytes and return them as PIByteArray. | |
| -int | write (const void *data, int max_size) |
| Write maximum "max_size" bytes of "data" to device. | |
| -PIByteArray | readForTime (double timeout_ms) |
| Read from device for "timeout_ms" milliseconds and return readed data as PIByteArray. Timeout should to be greater than 0. | |
| -ullong | writeThreaded (const void *data, int max_size) |
| Add task to threaded write queue and return task ID. | |
| -ullong | writeThreaded (const PIByteArray &data) |
| Add task to threaded write queue and return task ID. | |
| -bool | configure (const PIString &config_file, const PIString §ion, bool parent_section=false) |
| Configure device from section "section" of file "config_file", if "parent_section" parent section also will be read. | |
| -PIString | constructFullPath () const |
| Reimplement to construct full unambiguous string, describes this device, default returns fullPathPrefix() + "://" + path() | |
| -void | configureFromFullPath (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -bool | open () |
| Open device. | |
| -bool | open (const PIString &_path) |
| Open device with path "path". | |
| -bool | close () |
| Close device. | |
| -int | write (PIByteArray data) |
| Write "data" to device. | |
| -virtual void | flush () |
| Immediate write all buffers. | |
| -void | opened () |
| Raise if succesfull open. | |
| -void | closed () |
| Raise if succesfull close. | |
| -void | threadedReadEvent (uchar *readed, int size) |
| Raise if read thread succesfull read some data. | |
| -void | threadedWriteEvent (ullong id, int written_size) |
| Raise if write thread successfull write some data of task with ID "id". | |
Public Member Functions inherited from PIThread | |
| - | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| - | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| -void | setData (void *d) |
| Set common data passed to external function. | |
| -void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| -void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| -void * | data () const |
| Returns common data passed to external function. | |
| -PIThread::Priority | priority () const |
| Return priority of thread. | |
| -bool | isRunning () const |
Return true if thread is running. | |
| -void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| -PIMutex & | mutex () |
| Returns internal mutex. | |
| -llong | tid () const |
| Returns thread ID. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| -void | lock () |
| Lock internal mutex. | |
| -void | unlock () |
| Unlock internal mutex. | |
| -void | started () |
| Raise on thread start. | |
| -void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| - | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| -PIString | name () const |
| Returns object name. | |
| -virtual const char * | className () const |
| Returns object class name. | |
| -virtual const char * | parentClassName () const |
| Returns parent object class name. | |
| -bool | debug () const |
| Return if debug of this object is active. | |
| -void | setName (const PIString &name) |
| Set object name. | |
| -void | setDebug (bool debug) |
| Set object debug active. | |
| -const PIMap< PIString, PIVariant > & | properties () const |
| Returns properties of the object. | |
| -int | propertiesCount () const |
| Returns properties count of the object. | |
| -PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| -void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| -bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
-Protected Member Functions | |
| -bool | openDevice () |
| Reimplement to open device, return value will be set to "opened_" variable; don't call this function in subclass, use open() | |
| -bool | closeDevice () |
| Reimplement to close device, inverse return value will be set to "opened_" variable. | |
| -int | readDevice (void *read_to, int max_size) |
| Reimplement this function to read from your device. | |
| -int | writeDevice (const void *data, int max_size) |
| Reimplement this function to write to your device. | |
| -PIString | fullPathPrefix () const |
| Reimplement to construct full unambiguous string prefix. Creating devices by unambiguous string. | |
| -DeviceInfoFlags | deviceInfoFlags () const |
| Reimplement to return correct DeviceInfoFlags. Default implementation returns 0. | |
Protected Member Functions inherited from PIIODevice | |
| -virtual bool | init () |
| Function executed before first openDevice() or from constructor. | |
| -virtual bool | configureDevice (const void *e_main, const void *e_parent=0) |
| Reimplement to configure device from entries "e_main" and "e_parent", cast arguments to PIConfig::Entry*. | |
| -virtual bool | threadedRead (uchar *readed, int size) |
| Function executed when thread read some data, default implementation execute external slot "ret_func_". | |
| -virtual PIString | constructFullPathDevice () const |
| Reimplement to construct full unambiguous string, describes this device. Default implementation returns path() | |
| -virtual void | configureFromFullPathDevice (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| -virtual void | optionsChanged () |
| Reimplement to apply new device options. | |
| -virtual void | threadedReadBufferSizeChanged () |
| Reimplement to apply new threadedReadBufferSize() | |
Protected Member Functions inherited from PIObject | |
| -PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| -virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| void | deleted () |
| Raise before object delete. More... | |
-Additional Inherited Members | |
Public Types inherited from PIIODevice | |
| enum | DeviceMode { ReadOnly = 0x01, -WriteOnly = 0x02, -ReadWrite = 0x03 - } |
| Open modes for PIIODevice. More... | |
| enum | DeviceOption { BlockingRead = 0x01, -BlockingWrite = 0x02 - } |
| Options for PIIODevice, works with some devices. More... | |
| enum | DeviceInfoFlag { Sequential = 0x01, -Reliable = 0x02 - } |
| Characteristics of PIIODevice subclass. More... | |
Public Types inherited from PIThread | |
| enum | Priority { - piLowerst, -piLow, -piNormal, -piHigh, - - piHighest - - } |
| Priority of thread. More... | |
Static Public Member Functions inherited from PIIODevice | |
| static PIIODevice * | createFromFullPath (const PIString &full_path) |
| Try to determine suitable device, create new one, configure it with configureFromFullPath() and returns it. More... | |
Static Public Member Functions inherited from PIObject | |
| -static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| -static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| -static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Public Attributes inherited from PIIODevice | |
| -bool | reopenEnabled |
| setReopenEnabled, default "true" | |
| -int | reopenTimeout |
| setReopenTimeout in ms, default 1000 | |
| -int | threadedReadBufferSize |
| setThreadedReadBufferSize in bytes, default 4096 | |
Related Functions inherited from PIIODevice | |
| template<typename T > | |
| T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) |
| Service function. useful for configuring devices. More... | |
| -#define | REGISTER_DEVICE(class) |
| Use this macro to enable automatic creation instances of your class with createFromFullPath() function. | |
| -#define | PIIODEVICE(class) |
| Use this macro instead of PIOBJECT when describe your own PIIODevice. | |
Related Functions inherited from PIObject | |
| -#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| -#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| -#define | PIOBJECT_SUBCLASS(name, parent) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class, and scopeList() | |
| -#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| -#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| -#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| -#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| -#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| -#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| -#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| -#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| -#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| -#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| -#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| -#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| -#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| -#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| -#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| -#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| -#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECTU_QUEUED(src, event, dest, handler, performer) |
| connect event "event" from object "src" to event handler "handler". Event handler will be executed by "performer". "Event" and "handler" must has equal argument lists. | |
| -#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| -#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| -#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| -#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| -#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| -#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| -#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
PIIODevice that pass write to read.
-This class pass all data from write() function to read(). PITransparentDevice contains internal queue and works in packets mode. If you write 3 different packets into this device, read will return this 3 packets.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIVariant, including all inherited members.
-| fromValue(const T &v) | PIVariant | inlinestatic |
| isValid() const | PIVariant | inline |
| operator!=(const PIVariant &v) const | PIVariant | inline |
| operator=(const PIVariant &v) | PIVariant | |
| operator=(const char *v) | PIVariant | inline |
| operator=(const bool v) | PIVariant | inline |
| operator=(const char v) | PIVariant | inline |
| operator=(const uchar v) | PIVariant | inline |
| operator=(const short v) | PIVariant | inline |
| operator=(const ushort v) | PIVariant | inline |
| operator=(const int &v) | PIVariant | inline |
| operator=(const uint &v) | PIVariant | inline |
| operator=(const llong &v) | PIVariant | inline |
| operator=(const ullong &v) | PIVariant | inline |
| operator=(const float &v) | PIVariant | inline |
| operator=(const double &v) | PIVariant | inline |
| operator=(const ldouble &v) | PIVariant | inline |
| operator=(const PIBitArray &v) | PIVariant | inline |
| operator=(const PIByteArray &v) | PIVariant | inline |
| operator=(const PIString &v) | PIVariant | inline |
| operator=(const PIStringList &v) | PIVariant | inline |
| operator=(const PITime &v) | PIVariant | inline |
| operator=(const PIDate &v) | PIVariant | inline |
| operator=(const PIDateTime &v) | PIVariant | inline |
| operator=(const PISystemTime &v) | PIVariant | inline |
| operator=(const PIVariantTypes::Enum &v) | PIVariant | inline |
| operator=(const PIVariantTypes::File &v) | PIVariant | inline |
| operator=(const PIVariantTypes::Dir &v) | PIVariant | inline |
| operator=(const PIVariantTypes::Color &v) | PIVariant | inline |
| operator=(const PIPointd &v) | PIVariant | inline |
| operator=(const PIRectd &v) | PIVariant | inline |
| operator==(const PIVariant &v) const | PIVariant | |
| PIVariant() | PIVariant | |
| PIVariant(const char *v) | PIVariant | inline |
| PIVariant(const bool v) | PIVariant | inline |
| PIVariant(const char v) | PIVariant | inline |
| PIVariant(const uchar v) | PIVariant | inline |
| PIVariant(const short v) | PIVariant | inline |
| PIVariant(const ushort v) | PIVariant | inline |
| PIVariant(const int &v) | PIVariant | inline |
| PIVariant(const uint &v) | PIVariant | inline |
| PIVariant(const llong &v) | PIVariant | inline |
| PIVariant(const ullong &v) | PIVariant | inline |
| PIVariant(const float &v) | PIVariant | inline |
| PIVariant(const double &v) | PIVariant | inline |
| PIVariant(const ldouble &v) | PIVariant | inline |
| PIVariant(const PIBitArray &v) | PIVariant | inline |
| PIVariant(const PIByteArray &v) | PIVariant | inline |
| PIVariant(const PIString &v) | PIVariant | inline |
| PIVariant(const PIStringList &v) | PIVariant | inline |
| PIVariant(const PITime &v) | PIVariant | inline |
| PIVariant(const PIDate &v) | PIVariant | inline |
| PIVariant(const PIDateTime &v) | PIVariant | inline |
| PIVariant(const PISystemTime &v) | PIVariant | inline |
| PIVariant(const PIVariantTypes::Enum &v) | PIVariant | inline |
| PIVariant(const PIVariantTypes::File &v) | PIVariant | inline |
| PIVariant(const PIVariantTypes::Dir &v) | PIVariant | inline |
| PIVariant(const PIVariantTypes::Color &v) | PIVariant | inline |
| PIVariant(const PIPointd &v) | PIVariant | inline |
| PIVariant(const PIRectd &v) | PIVariant | inline |
| pivBitArray enum value | PIVariant | |
| pivBool enum value | PIVariant | |
| pivByteArray enum value | PIVariant | |
| pivChar enum value | PIVariant | |
| pivColor enum value | PIVariant | |
| pivComplexd enum value | PIVariant | |
| pivComplexld enum value | PIVariant | |
| pivCustom enum value | PIVariant | |
| pivDate enum value | PIVariant | |
| pivDateTime enum value | PIVariant | |
| pivDir enum value | PIVariant | |
| pivDouble enum value | PIVariant | |
| pivEnum enum value | PIVariant | |
| pivFile enum value | PIVariant | |
| pivFloat enum value | PIVariant | |
| pivInt enum value | PIVariant | |
| pivInvalid enum value | PIVariant | |
| pivLDouble enum value | PIVariant | |
| pivLLong enum value | PIVariant | |
| pivPoint enum value | PIVariant | |
| pivRect enum value | PIVariant | |
| pivShort enum value | PIVariant | |
| pivString enum value | PIVariant | |
| pivStringList enum value | PIVariant | |
| pivSystemTime enum value | PIVariant | |
| pivTime enum value | PIVariant | |
| pivUChar enum value | PIVariant | |
| pivUInt enum value | PIVariant | |
| pivULLong enum value | PIVariant | |
| pivUShort enum value | PIVariant | |
| setValue(const char *v) | PIVariant | inline |
| setValue(const bool v) | PIVariant | inline |
| setValue(const char v) | PIVariant | inline |
| setValue(const uchar v) | PIVariant | inline |
| setValue(const short v) | PIVariant | inline |
| setValue(const ushort v) | PIVariant | inline |
| setValue(const int &v) | PIVariant | inline |
| setValue(const uint &v) | PIVariant | inline |
| setValue(const llong &v) | PIVariant | inline |
| setValue(const ullong &v) | PIVariant | inline |
| setValue(const float &v) | PIVariant | inline |
| setValue(const double &v) | PIVariant | inline |
| setValue(const ldouble &v) | PIVariant | inline |
| setValue(const PIBitArray &v) | PIVariant | inline |
| setValue(const PIByteArray &v) | PIVariant | inline |
| setValue(const PIString &v) | PIVariant | inline |
| setValue(const PIStringList &v) | PIVariant | inline |
| setValue(const PITime &v) | PIVariant | inline |
| setValue(const PIDate &v) | PIVariant | inline |
| setValue(const PIDateTime &v) | PIVariant | inline |
| setValue(const PISystemTime &v) | PIVariant | inline |
| setValue(const PIVariantTypes::Enum &v) | PIVariant | inline |
| setValue(const PIVariantTypes::File &v) | PIVariant | inline |
| setValue(const PIVariantTypes::Dir &v) | PIVariant | inline |
| setValue(const PIVariantTypes::Color &v) | PIVariant | inline |
| setValue(const PIPointd &v) | PIVariant | inline |
| setValue(const PIRectd &v) | PIVariant | inline |
| toBitArray() const | PIVariant | |
| toBool() const | PIVariant | |
| toByteArray() const | PIVariant | |
| toColor() const | PIVariant | |
| toDate() const | PIVariant | |
| toDateTime() const | PIVariant | |
| toDir() const | PIVariant | |
| toDouble() const | PIVariant | |
| toEnum() const | PIVariant | |
| toFile() const | PIVariant | |
| toFloat() const | PIVariant | |
| toInt() const | PIVariant | |
| toLDouble() const | PIVariant | |
| toLLong() const | PIVariant | |
| toPoint() const | PIVariant | |
| toRect() const | PIVariant | |
| toString() const | PIVariant | |
| toStringList() const | PIVariant | |
| toSystemTime() const | PIVariant | |
| toTime() const | PIVariant | |
| type() const | PIVariant | inline |
| Type enum name | PIVariant | |
| Type enum name | PIVariant | |
| typeFromName(const PIString &tname) | PIVariant | static |
| typeName() const | PIVariant | |
| typeName(PIVariant::Type type) | PIVariant | static |
| value() const | PIVariant | inline |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Variant type. - More...
--Public Types | |
| enum | Type { , - pivInvalid = 0, -pivBool, -pivChar, -pivUChar, - - pivShort, -pivUShort, -pivInt, -pivUInt, - - pivLLong, -pivULLong, -pivFloat, -pivDouble, - - pivLDouble, -pivComplexd, -pivComplexld, -pivBitArray, - - pivByteArray, -pivString, -pivStringList, -pivTime, - - pivDate, -pivDateTime, -pivSystemTime, -pivEnum, - - pivFile, -pivDir, -pivColor, -pivPoint, - - pivRect, -pivCustom = 0xFF - - } |
| enum | Type { , - pivInvalid = 0, -pivBool, -pivChar, -pivUChar, - - pivShort, -pivUShort, -pivInt, -pivUInt, - - pivLLong, -pivULLong, -pivFloat, -pivDouble, - - pivLDouble, -pivComplexd, -pivComplexld, -pivBitArray, - - pivByteArray, -pivString, -pivStringList, -pivTime, - - pivDate, -pivDateTime, -pivSystemTime, -pivEnum, - - pivFile, -pivDir, -pivColor, -pivPoint, - - pivRect, -pivCustom = 0xFF - - } |
| Type of PIVariant content. More... | |
-Public Member Functions | |
| - | PIVariant () |
| Empty constructor, type() will be set to Invalid. | |
| - | PIVariant (const char *v) |
| Constructs variant from string. | |
| - | PIVariant (const bool v) |
| Constructs variant from boolean. | |
| - | PIVariant (const char v) |
| Constructs variant from char. | |
| - | PIVariant (const uchar v) |
| Constructs variant from integer. | |
| - | PIVariant (const short v) |
| Constructs variant from integer. | |
| - | PIVariant (const ushort v) |
| Constructs variant from integer. | |
| - | PIVariant (const int &v) |
| Constructs variant from integer. | |
| - | PIVariant (const uint &v) |
| Constructs variant from integer. | |
| - | PIVariant (const llong &v) |
| Constructs variant from integer. | |
| - | PIVariant (const ullong &v) |
| Constructs variant from integer. | |
| - | PIVariant (const float &v) |
| Constructs variant from float. | |
| - | PIVariant (const double &v) |
| Constructs variant from double. | |
| - | PIVariant (const ldouble &v) |
| Constructs variant from long double. | |
| - | PIVariant (const PIBitArray &v) |
| Constructs variant from bit array. | |
| - | PIVariant (const PIByteArray &v) |
| Constructs variant from byte array. | |
| - | PIVariant (const PIString &v) |
| Constructs variant from string. | |
| - | PIVariant (const PIStringList &v) |
| Constructs variant from strings list. | |
| - | PIVariant (const PITime &v) |
| Constructs variant from time. | |
| - | PIVariant (const PIDate &v) |
| Constructs variant from date. | |
| - | PIVariant (const PIDateTime &v) |
| Constructs variant from date and time. | |
| - | PIVariant (const PISystemTime &v) |
| Constructs variant from system time. | |
| - | PIVariant (const PIVariantTypes::Enum &v) |
| Constructs variant from enum. | |
| - | PIVariant (const PIVariantTypes::File &v) |
| Constructs variant from file. | |
| - | PIVariant (const PIVariantTypes::Dir &v) |
| Constructs variant from dir. | |
| - | PIVariant (const PIVariantTypes::Color &v) |
| Constructs variant from color. | |
| - | PIVariant (const PIPointd &v) |
| Constructs variant from point. | |
| - | PIVariant (const PIRectd &v) |
| Constructs variant from rect. | |
| -void | setValue (const char *v) |
| Set variant content and type to string. | |
| -void | setValue (const bool v) |
| Set variant content and type to boolean. | |
| -void | setValue (const char v) |
| Set variant content and type to char. | |
| -void | setValue (const uchar v) |
| Set variant content and type to integer. | |
| -void | setValue (const short v) |
| Set variant content and type to integer. | |
| -void | setValue (const ushort v) |
| Set variant content and type to integer. | |
| -void | setValue (const int &v) |
| Set variant content and type to integer. | |
| -void | setValue (const uint &v) |
| Set variant content and type to integer. | |
| -void | setValue (const llong &v) |
| Set variant content and type to integer. | |
| -void | setValue (const ullong &v) |
| Set variant content and type to integer. | |
| -void | setValue (const float &v) |
| Set variant content and type to float. | |
| -void | setValue (const double &v) |
| Set variant content and type to double. | |
| -void | setValue (const ldouble &v) |
| Set variant content and type to long double. | |
| -void | setValue (const PIBitArray &v) |
| Set variant content and type to bit array. | |
| -void | setValue (const PIByteArray &v) |
| Set variant content and type to byte array. | |
| -void | setValue (const PIString &v) |
| Set variant content and type to string. | |
| -void | setValue (const PIStringList &v) |
| Set variant content and type to strings list. | |
| -void | setValue (const PITime &v) |
| Set variant content and type to time. | |
| -void | setValue (const PIDate &v) |
| Set variant content and type to date. | |
| -void | setValue (const PIDateTime &v) |
| Set variant content and type to date and time. | |
| -void | setValue (const PISystemTime &v) |
| Set variant content and type to system time. | |
| -void | setValue (const PIVariantTypes::Enum &v) |
| Set variant content and type to enum. | |
| -void | setValue (const PIVariantTypes::File &v) |
| Set variant content and type to file. | |
| -void | setValue (const PIVariantTypes::Dir &v) |
| Set variant content and type to dir. | |
| -void | setValue (const PIVariantTypes::Color &v) |
| Set variant content and type to color. | |
| -void | setValue (const PIPointd &v) |
| Set variant content and type to point. | |
| -void | setValue (const PIRectd &v) |
| Set variant content and type to rect. | |
| bool | toBool () const |
| Returns variant content as boolean. More... | |
| int | toInt () const |
| Returns variant content as int. More... | |
| llong | toLLong () const |
| Returns variant content as long long. More... | |
| float | toFloat () const |
| Returns variant content as float. More... | |
| double | toDouble () const |
| Returns variant content as double. More... | |
| ldouble | toLDouble () const |
| Returns variant content as long double. More... | |
| PITime | toTime () const |
| Returns variant content as time. More... | |
| PIDate | toDate () const |
| Returns variant content as date. More... | |
| PIDateTime | toDateTime () const |
| Returns variant content as date and time. More... | |
| PISystemTime | toSystemTime () const |
| Returns variant content as system time. More... | |
| PIString | toString () const |
| Returns variant content as string. More... | |
| PIStringList | toStringList () const |
| Returns variant content as strings list. More... | |
| PIBitArray | toBitArray () const |
| Returns variant content as bit array. More... | |
| PIByteArray | toByteArray () const |
| Returns variant content as byte array. More... | |
| PIVariantTypes::Enum | toEnum () const |
| Returns variant content as enum. More... | |
| PIVariantTypes::File | toFile () const |
| Returns variant content as file. More... | |
| PIVariantTypes::Dir | toDir () const |
| Returns variant content as dir. More... | |
| PIVariantTypes::Color | toColor () const |
| Returns variant content as color. More... | |
| PIPointd | toPoint () const |
| Returns variant content as point. More... | |
| PIRectd | toRect () const |
| Returns variant content as rect. More... | |
| template<typename T > | |
| T | value () const |
| Returns variant content as custom type. More... | |
| -PIVariant & | operator= (const PIVariant &v) |
| Assign operator. | |
| -PIVariant & | operator= (const char *v) |
| Assign operator. | |
| -PIVariant & | operator= (const bool v) |
| Assign operator. | |
| -PIVariant & | operator= (const char v) |
| Assign operator. | |
| -PIVariant & | operator= (const uchar v) |
| Assign operator. | |
| -PIVariant & | operator= (const short v) |
| Assign operator. | |
| -PIVariant & | operator= (const ushort v) |
| Assign operator. | |
| -PIVariant & | operator= (const int &v) |
| Assign operator. | |
| -PIVariant & | operator= (const uint &v) |
| Assign operator. | |
| -PIVariant & | operator= (const llong &v) |
| Assign operator. | |
| -PIVariant & | operator= (const ullong &v) |
| Assign operator. | |
| -PIVariant & | operator= (const float &v) |
| Assign operator. | |
| -PIVariant & | operator= (const double &v) |
| Assign operator. | |
| -PIVariant & | operator= (const ldouble &v) |
| Assign operator. | |
| -PIVariant & | operator= (const PIBitArray &v) |
| Assign operator. | |
| -PIVariant & | operator= (const PIByteArray &v) |
| Assign operator. | |
| -PIVariant & | operator= (const PIString &v) |
| Assign operator. | |
| -PIVariant & | operator= (const PIStringList &v) |
| Assign operator. | |
| -PIVariant & | operator= (const PITime &v) |
| Assign operator. | |
| -PIVariant & | operator= (const PIDate &v) |
| Assign operator. | |
| -PIVariant & | operator= (const PIDateTime &v) |
| Assign operator. | |
| -PIVariant & | operator= (const PISystemTime &v) |
| Assign operator. | |
| -PIVariant & | operator= (const PIVariantTypes::Enum &v) |
| Assign operator. | |
| -PIVariant & | operator= (const PIVariantTypes::File &v) |
| Assign operator. | |
| -PIVariant & | operator= (const PIVariantTypes::Dir &v) |
| Assign operator. | |
| -PIVariant & | operator= (const PIVariantTypes::Color &v) |
| Assign operator. | |
| -PIVariant & | operator= (const PIPointd &v) |
| Assign operator. | |
| -PIVariant & | operator= (const PIRectd &v) |
| Assign operator. | |
| -bool | operator== (const PIVariant &v) const |
| Compare operator. | |
| -bool | operator!= (const PIVariant &v) const |
| Compare operator. | |
| -PIVariant::Type | type () const |
| Returns type of variant content. | |
| -PIString | typeName () const |
| Returns type name of variant content. | |
| -bool | isValid () const |
| Returns true if type is not Invalid. | |
-Static Public Member Functions | |
| template<typename T > | |
| static PIVariant | fromValue (const T &v) |
| Returns new variant from custom type. More... | |
| -static PIVariant::Type | typeFromName (const PIString &tname) |
| Returns type from name. | |
| -static PIString | typeName (PIVariant::Type type) |
| Returns type name. | |
Variant type.
-This class provides general type that can contains all standard types, some PIP types or custom type. In case of standard types this class also provides convertions between them.
-PIVariant useful if you want pass many variables with different types in single array, e.g.:
Result:
| enum PIVariant::Type | -
| enum PIVariant::Type | -
Type of PIVariant content.
-| bool PIVariant::toBool | -( | -) | -const | -
Returns variant content as boolean.
-In case of numeric types returns true if value != 0.
-In case of String type returns PIString::toBool().
-In case of StringList type returns false if string list is empty, otherwise returns PIString::toBool() of first string.
-In case of other types returns false.
| int PIVariant::toInt | -( | -) | -const | -
Returns variant content as int.
-In case of numeric types returns integer value.
-In case of String type returns PIString::toInt().
-In case of StringList type returns 0 if string list is empty, otherwise returns PIString::toInt() of first string.
-In case of other types returns 0.
| llong PIVariant::toLLong | -( | -) | -const | -
Returns variant content as long long.
-In case of numeric types returns integer value.
-In case of String type returns PIString::toLLong().
-In case of StringList type returns 0L if string list is empty, otherwise returns PIString::toLLong() of first string.
-In case of other types returns 0L.
| float PIVariant::toFloat | -( | -) | -const | -
Returns variant content as float.
-In case of numeric types returns float value.
-In case of String type returns PIString::toFloat().
-In case of StringList type returns 0.f if string list is empty, otherwise returns PIString::toFloat() of first string.
-In case of other types returns 0.f.
| double PIVariant::toDouble | -( | -) | -const | -
Returns variant content as double.
-In case of numeric types returns double value.
-In case of String type returns PIString::toDouble().
-In case of StringList type returns 0. if string list is empty, otherwise returns PIString::toDouble() of first string.
-In case of other types returns 0..
| ldouble PIVariant::toLDouble | -( | -) | -const | -
Returns variant content as long double.
-In case of numeric types returns long double value.
-In case of String type returns PIString::toLDouble().
-In case of StringList type returns 0. if string list is empty, otherwise returns PIString::toLDouble() of first string.
-In case of other types returns 0..
| PITime PIVariant::toTime | -( | -) | -const | -
Returns variant content as time.
-In case of Time type returns time value.
-In case of DateTime type returns time part of value.
-In case of other types returns PITime().
| PIDate PIVariant::toDate | -( | -) | -const | -
Returns variant content as date.
-In case of Date type returns date value.
-In case of DateTime type returns date part of value.
-In case of other types returns PIDate().
| PIDateTime PIVariant::toDateTime | -( | -) | -const | -
Returns variant content as date and time.
-In case of Time type returns time value with null date.
-In case of Date type returns date value with null time.
-In case of DateTime type returns date and time.
-In case of other types returns PIDateTime().
| PISystemTime PIVariant::toSystemTime | -( | -) | -const | -
Returns variant content as system time.
-In case of SystemTime type returns system time.
-In case of other types returns PISystemTime::fromSeconds() from double value of variant content.
| PIString PIVariant::toString | -( | -) | -const | -
Returns variant content as string.
-In case of numeric types returns PIString::fromNumber().
-In case of String type returns string value.
-In case of StringList type returns joined string ("(" + PIStringList::join("; ") + ")").
-In case of BitArray or ByteArray types returns number of bits/bytes.
-In case of Time, Date or DateTime types returns toString() of this values.
-In case of SystemTime types returns second and nanoseconds of time ("(PISystemTime::seconds s, PISystemTime::nanoseconds ns)").
-In case of other types returns "".
| PIStringList PIVariant::toStringList | -( | -) | -const | -
Returns variant content as strings list.
-In case of StringList type returns strings list value.
-In case of other types returns PIStringList with one string value of variant content.
| PIBitArray PIVariant::toBitArray | -( | -) | -const | -
Returns variant content as bit array.
-In case of BitArray type returns bit array value.
-In case of other types returns PIBitArray from toLLong() value.
| PIByteArray PIVariant::toByteArray | -( | -) | -const | -
Returns variant content as byte array.
-In case of ByteArray type returns byte array value.
-In case of other types returns empty PIByteArray.
| PIVariantTypes::Enum PIVariant::toEnum | -( | -) | -const | -
Returns variant content as enum.
-In case of Enum type returns enum value.
-In case of String returns Enum with one member.
-In case of StringList returns Enum with corresponding members.
-In case of other types returns empty Enum.
| PIVariantTypes::File PIVariant::toFile | -( | -) | -const | -
Returns variant content as file.
-In case of File type returns file value.
-In case of String returns File with string value path.
-In case of other types returns empty File.
| PIVariantTypes::Dir PIVariant::toDir | -( | -) | -const | -
Returns variant content as dir.
-In case of Dir type returns dir value.
-In case of String returns Dir with string value path.
-In case of other types returns empty Dir.
| PIVariantTypes::Color PIVariant::toColor | -( | -) | -const | -
Returns variant content as color.
-In case of Color type returns color value.
-In case of int returns color with int value.
-In case of other types returns empty Color.
| PIPointd PIVariant::toPoint | -( | -) | -const | -
Returns variant content as point.
-In case of PIPointd type returns point value.
-In case of other types returns empty PIPointd.
| PIRectd PIVariant::toRect | -( | -) | -const | -
Returns variant content as rect.
-In case of PIRectd type returns rect value.
-In case of other types returns empty PIRectd.
-
|
- -inline | -
Returns variant content as custom type.
-In case of known types this function equivalent to<Type> function.
-Otherwise returns content as type T.
-
|
- -inlinestatic | -
Returns new variant from custom type.
-In case of known types this function equivalent PIVariant(T) constructors.
-Otherwise returns variant with content v and type Custom.
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIVector< T >, including all inherited members.
-| back() | PIVector< T > | inline |
| back() const | PIVector< T > | inline |
| clear() | PIVector< T > | inline |
| compare_func(const T *t0, const T *t1) | PIVector< T > | inlinestatic |
| contains(const T &v) const | PIVector< T > | inline |
| enlarge(llong piv_size) | PIVector< T > | inline |
| etries(const T &v) const | PIVector< T > | inline |
| fill(const T &f=T()) | PIVector< T > | inline |
| front() | PIVector< T > | inline |
| front() const | PIVector< T > | inline |
| isEmpty() const | PIVector< T > | inline |
| operator!=(const PIVector< T > &t) const | PIVector< T > | inline |
| operator<<(const PIVector< T > &other) | PIVector< T > | inline |
| operator==(const PIVector< T > &t) const | PIVector< T > | inline |
| PIVector() | PIVector< T > | inline |
| pop_back() | PIVector< T > | inline |
| pop_front() | PIVector< T > | inline |
| push_back(const T &v) | PIVector< T > | inline |
| push_front(const T &v) | PIVector< T > | inline |
| remove(size_t index, size_t count=1) | PIVector< T > | inline |
| removeAll(const T &v) | PIVector< T > | inline |
| removeOne(const T &v) | PIVector< T > | inline |
| resize(size_t new_size, const T &f=T()) | PIVector< T > | inline |
| size() const | PIVector< T > | inline |
| size_s() const | PIVector< T > | inline |
| sort(CompareFunc compare=compare_func) | PIVector< T > | inline |
| take_back() | PIVector< T > | inline |
| take_front() | PIVector< T > | inline |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
Dynamic array of any type. - More...
- -Inherited by PIStack< T >.
--Public Member Functions | |
| PIVector () | |
| -size_t | size () const |
| Elements count. | |
| -ssize_t | size_s () const |
| Elements count. | |
| -bool | isEmpty () const |
Return "true" if vector is empty, i.e. size = 0. | |
| -T & | back () |
| Last element of the vector. | |
| -const T & | back () const |
| Last element of the vector. | |
| -T & | front () |
| First element of the vector. | |
| -const T & | front () const |
| First element of the vector. | |
| -bool | operator== (const PIVector< T > &t) const |
| Compare with vector "t". | |
| -bool | operator!= (const PIVector< T > &t) const |
| Compare with vector "t". | |
| -bool | contains (const T &v) const |
Return "true" if vector has at least one element equal "t". | |
| -int | etries (const T &v) const |
| Return how many times element "t" appears in vector. | |
| -PIVector< T > & | clear () |
Clear vector. Equivalent to call "resize(0)" | |
| PIVector< T > & | fill (const T &f=T()) |
| Fill vector with elements "t" leave size is unchanged and return reference to vector. More... | |
| PIVector< T > & | resize (size_t new_size, const T &f=T()) |
| Resize vector to size "size". More... | |
| PIVector< T > & | remove (size_t index, size_t count=1) |
| Remove one element by index "index" and return reference to vector. More... | |
| PIVector< T > & | sort (CompareFunc compare=compare_func) |
| Sort vector using quick sort algorithm and standard compare function. More... | |
| -PIVector< T > & | enlarge (llong piv_size) |
| Increase vector size with "size" elements. | |
| PIVector< T > & | removeOne (const T &v) |
| Remove no more than one element equal "v" and return reference to vector. More... | |
| PIVector< T > & | removeAll (const T &v) |
| Remove all elements equal "v" and return reference to vector. More... | |
| -PIVector< T > & | push_back (const T &v) |
| Add new element "t" at the end of vector and return reference to vector. | |
| -PIVector< T > & | operator<< (const PIVector< T > &other) |
| Add vector "t" at the end of vector and return reference to vector. | |
| -PIVector< T > & | push_front (const T &v) |
| Add new element "t" at the beginning of vector and return reference to vector. | |
| -PIVector< T > & | pop_back () |
| Remove one element from the end of vector and return reference to vector. | |
| -PIVector< T > & | pop_front () |
| Remove one element from the beginning of vector and return reference to vector. | |
| -T | take_back () |
| Remove one element from the end of vector and return it. | |
| -T | take_front () |
| Remove one element from the beginning of vector and return it. | |
-Static Public Member Functions | |
| -static int | compare_func (const T *t0, const T *t1) |
| Standard compare function for type "Type". Return 0 if t0 = t1, -1 if t0 < t1 and 1 if t0 > t1. | |
Dynamic array of any type.
-This class used to store dynamic array of any type of data. In memory data stored linear. You can insert item in any place of remove some items from any place. For quick add elements this is stream operator <<.
-Contructs an empty vector
- -
-
|
- -inline | -
Fill vector with elements "t" leave size is unchanged and return reference to vector.
-Example:
-
|
- -inline | -
Resize vector to size "size".
-Elements removed from end of vector if new size < old size, or added new elements = "new_type" if new size > old size.
-Example:
-
|
- -inline | -
Remove one element by index "index" and return reference to vector.
-Remove "count" elements by first index "index" and return reference to vector.
-Example:
Example:
-
|
- -inline | -
Sort vector using quick sort algorithm and standard compare function.
-Example:
With custom compare function:
-
|
- -inline | -
Remove no more than one element equal "v" and return reference to vector.
-Example:
-
|
- -inline | -
Remove all elements equal "v" and return reference to vector.
-Example:
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for PIVector2D< T >, including all inherited members.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
2D array, - More...
-2D array,
-This class used to store 2D array of any type elements as plain vector. You can read/write any element via operators [][], first dimension - row, second - column. The first dimension is Row, and you can operate with Row as PIVector<T>: modify any element, assign to another Row and etc. You can't add values to array, but you can modify any elements or create another PIVector2D. PIVector2D has constructors from PIVector<T> and PIVector<PIVector<T> >
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This is the complete list of members for TileVars, including all inherited members.
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/_unsused | Includes file in src/io |
|---|---|
| pivariable.h | piconfig.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/_unsused | Includes file in src/io |
|---|---|
| pivariable.h | piconfig.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/_unsused | Includes file in src/math |
|---|---|
| pigeometry.h | pimath.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.7.1
-
- Platform-Independent Primitives
- |
-
| File in src_main/auxiliary | Includes file in src_main/console |
|---|---|
| piterminal / main.cpp | piscreentypes.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/code | Includes file in src/io |
|---|---|
| picodeparser.h | pifile.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/code | Includes file in src/io |
|---|---|
| picodeparser.h | pifile.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/code | Includes file in src/math |
|---|---|
| picodeparser.h | pievaluator.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_io_utils | Includes file in src_main |
|---|---|
| pibroadcast.cpp | io_utils / pibroadcast.h |
| piethutilbase.cpp | io_utils / piethutilbase.h |
| pistreampacker.cpp | io_devices / piiodevice.h |
| pistreampacker.cpp | io_utils / pistreampacker.h |
|
- PIP
- 1.7.1
-
- Platform-Independent Primitives
- |
-
| File in src_main/auxiliary/piterminal | Includes file in src_main/console |
|---|---|
| main.cpp | piscreentypes.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/console | Includes file in src/io |
|---|---|
| piconsole.cpp | pidiagnostics.h |
| piconsole.cpp | pipeer.h |
| piconsole.cpp | piprotocol.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/console | Includes file in src/io |
|---|---|
| piconsole.cpp | pidiagnostics.h |
| piconsole.cpp | pipeer.h |
| piconsole.cpp | piprotocol.h |
|
- PIP
- 1.4.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/auxiliary/piterminal | Includes file in src_main/io |
|---|---|
| main.cpp | pifile.h |
| main.cpp | pisharedmemory.h |
|
- PIP
- 1.7.1
-
- Platform-Independent Primitives
- |
-
| File in src_main/auxiliary/piterminal | Includes file in src_main/io |
|---|---|
| main.cpp | pifile.h |
| main.cpp | pisharedmemory.h |
|
- PIP
- 0.5.0_prealpha
-
- Platform-Independent Primitives
- |
-
| File in src/core | Includes file in src/containers |
|---|---|
| pibitarray.h | picontainers.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/containers | Includes file in src/core |
|---|---|
| picontainers.h | picout.h |
|
- PIP
- 0.5.0_prealpha
-
- Platform-Independent Primitives
- |
-
| File in src/core | Includes file in src/math |
|---|---|
| pivariant.h | pimath.h |
|
- PIP
- 1.7.1
-
- Platform-Independent Primitives
- |
-
| File in src_main/code | Includes file in src_main/core |
|---|---|
| picodeinfo.h | pistring.h |
|
- PIP
- 0.5.0_prealpha
-
- Platform-Independent Primitives
- |
-
| File in src/core | Includes file in src/thread |
|---|---|
| piobject.h | pimutex.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/math | Includes file in src_main/containers |
|---|---|
| pimathbase.h | pipair.h |
| pimathbase.h | pivector.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/math | Includes file in src_main/core |
|---|---|
| picompress.h | pibytearray.h |
| picrc.h | pistring.h |
| pievaluator.h | pistring.h |
| pifixedpoint.h | picout.h |
| pimathbase.cpp | pitime.h |
| pimathbase.h | piinit.h |
| pimathcomplex.h | pibytearray.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_io_utils | Includes file in src_main |
|---|---|
| pibroadcast.cpp | io_utils / pibroadcast.h |
| piethutilbase.cpp | io_utils / piethutilbase.h |
| pistreampacker.cpp | io_devices / piiodevice.h |
| pistreampacker.cpp | io_utils / pistreampacker.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/core | Includes file in src/containers |
|---|---|
| pibitarray.h | picontainers.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.7.1
-
- Platform-Independent Primitives
- |
-
| File in src_main/console | Includes file in src_main/core |
|---|---|
| piscreendrawer.h | pistring.h |
| piscreentypes.h | pivariant.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/core | Includes file in src/math |
|---|---|
| pivariant.h | pimathbase.h |
|
- PIP
- 1.4.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/console | Includes file in src_main/io |
|---|---|
| piconsole.cpp | pidiagnostics.h |
| piconsole.cpp | pipeer.h |
| piconsole.cpp | piprotocol.h |
| piterminal.cpp | pisharedmemory.h |
|
- PIP
- 1.7.1
-
- Platform-Independent Primitives
- |
-
| File in src_main/console | Includes file in src_main/io |
|---|---|
| piconsole.cpp | pidiagnostics.h |
| piconsole.cpp | pipeer.h |
| piconsole.cpp | piprotocol.h |
| piterminal.cpp | pisharedmemory.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/_unsused | Includes file in src_main/io_devices |
|---|---|
| pivariable.h | piconfig.h |
|
- PIP
- 0.5.0_prealpha
-
- Platform-Independent Primitives
- |
-
| File in src/math | Includes file in src/core |
|---|---|
| picrc.h | pistring.h |
| pievaluator.h | pistring.h |
| pimathbase.h | pibytearray.h |
| pimathbase.h | piinit.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/io | Includes file in src/core |
|---|---|
| piiodevice.h | picollection.h |
| piiodevice.h | piinit.h |
| piiodevice.h | pivariant.h |
|
- PIP
- 1.7.1
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/geo | Includes file in src/math |
|---|---|
| piellipsoidmodel.h | pimathbase.h |
| pigeoposition.h | pimathvector.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/auxiliary | Includes file in src_main/console |
|---|---|
| piterminal / main.cpp | piscreentypes.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/auxiliary | Includes file in src_main/io_devices |
|---|---|
| piterminal / main.cpp | pisharedmemory.h |
| piterminal / main.cpp | pifile.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/_unsused | Includes file in src_main/io_devices |
|---|---|
| pivariable.h | piconfig.h |
|
- PIP
- 0.5.0_prealpha
-
- Platform-Independent Primitives
- |
-
| File in src/system | Includes file in src/containers |
|---|---|
| pisignals.h | picontainers.h |
|
- PIP
- 1.7.1
-
- Platform-Independent Primitives
- |
-
| File in src_main/core | Includes file in src_main/console |
|---|---|
| picout.cpp | piconsole.h |
| piincludes.cpp | piconsole.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/io | Includes file in src/math |
|---|---|
| pibasetransfer.h | picrc.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/auxiliary/piterminal | Includes file in src_main/console |
|---|---|
| main.cpp | piscreentypes.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/auxiliary | Includes file in src_main/console |
|---|---|
| piterminal / main.cpp | piscreentypes.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/auxiliary/piterminal | Includes file in src_main/io_devices |
|---|---|
| main.cpp | pifile.h |
| main.cpp | pisharedmemory.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/auxiliary | Includes file in src_main/io_devices |
|---|---|
| piterminal / main.cpp | pisharedmemory.h |
| piterminal / main.cpp | pifile.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/system | Includes file in src/containers |
|---|---|
| pisignals.h | picontainers.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/math | Includes file in src/core |
|---|---|
| picrc.h | pistring.h |
| picrypt.h | pistring.h |
| pievaluator.h | pistring.h |
| pifixedpoint.h | picout.h |
| pimathbase.cpp | pitime.h |
| pimathbase.h | pibytearray.h |
| pimathbase.h | piinit.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/system | Includes file in src/io |
|---|---|
| piprocess.h | pifile.h |
| pisysteminfo.cpp | pidir.h |
| pisystemtests.h | piconfig.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/system | Includes file in src/thread |
|---|---|
| piprocess.h | pithread.h |
| pisystemmonitor.h | pithread.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/auxiliary/piterminal | Includes file in src_main/console |
|---|---|
| main.cpp | piscreentypes.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/code | Includes file in src_main/core |
|---|---|
| picodeinfo.h | pistring.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/code | Includes file in src_main/io_devices |
|---|---|
| picodeparser.h | pifile.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/auxiliary/piterminal | Includes file in src_main/io_devices |
|---|---|
| main.cpp | pifile.h |
| main.cpp | pisharedmemory.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/code | Includes file in src_main/math |
|---|---|
| picodeparser.h | pievaluator.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/code | Includes file in src_main/math |
|---|---|
| picodeparser.h | pievaluator.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/system | Includes file in src/core |
|---|---|
| pilibrary.h | pistring.h |
| pisysteminfo.cpp | pitime.h |
| pisysteminfo.h | pitime.h |
|
- PIP
- 1.4.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/io | Includes file in src_main/core |
|---|---|
| pifile.cpp | pitime_win.h |
| piiodevice.h | picollection.h |
| piiodevice.h | piinit.h |
|
- PIP
- 1.4.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/io | Includes file in src_main/math |
|---|---|
| pibasetransfer.h | picrc.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/console | Includes file in src_main/core |
|---|---|
| piscreendrawer.h | pistring.h |
| piscreentypes.h | pivariant.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/code | Includes file in src_main/core |
|---|---|
| picodeinfo.h | pistring.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/console | Includes file in src_main/io_devices |
|---|---|
| piconsole.cpp | pipeer.h |
| piterminal.cpp | pisharedmemory.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/console | Includes file in src_main/io_utils |
|---|---|
| piconsole.cpp | pidiagnostics.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/console | Includes file in src_main/thread |
|---|---|
| pikbdlistener.h | pithread.h |
|
- PIP
- 0.5.0_alpha
-
- Platform-Independent Primitives
- |
-
| File in src/thread | Includes file in src/core |
|---|---|
| pimutex.h | piinit.h |
| pithread.h | piinit.h |
| pithread.h | piobject.h |
| pitimer.h | pitime.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/console | Includes file in src_main/core |
|---|---|
| piscreendrawer.h | pistring.h |
| piscreentypes.h | pivariant.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/console | Includes file in src_main/io_devices |
|---|---|
| piconsole.cpp | pipeer.h |
| piterminal.cpp | pisharedmemory.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/console | Includes file in src_main/io_utils |
|---|---|
| piconsole.cpp | pidiagnostics.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/console | Includes file in src_main/thread |
|---|---|
| pikbdlistener.h | pithread.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/core | Includes file in src_main/console |
|---|---|
| picout.cpp | piconsole.h |
| piincludes.cpp | piconsole.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/core | Includes file in src_main/containers |
|---|---|
| pibitarray.h | pivector.h |
| pibytearray.h | pimap.h |
| picout.cpp | pistack.h |
| piobject.h | piset.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/core | Includes file in src_main/math |
|---|---|
| pivariant.h | pigeometry.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/core | Includes file in src_main/system |
|---|---|
| piinit.cpp | piprocess.h |
| piinit.cpp | pisignals.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/core | Includes file in src_main/thread |
|---|---|
| piobject.h | pimutex.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/core | Includes file in src_main/math |
|---|---|
| pivariant.h | pigeometry.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/core | Includes file in src_main/console |
|---|---|
| picout.cpp | piconsole.h |
| piincludes.cpp | piconsole.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/crypt | Includes file in src_main/core |
|---|---|
| piauth.h | piobject.h |
| picrypt.h | pistring.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/core | Includes file in src_main/system |
|---|---|
| piinit.cpp | piprocess.h |
| piinit.cpp | pisignals.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/core | Includes file in src_main/thread |
|---|---|
| piobject.h | pimutex.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/crypt | Includes file in src_main/core |
|---|---|
| piauth.h | piobject.h |
| picrypt.h | pistring.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/geo | Includes file in src_main/math |
|---|---|
| piellipsoidmodel.h | pimathbase.h |
| pigeoposition.h | pimathvector.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/geo | Includes file in src_main/math |
|---|---|
| piellipsoidmodel.h | pimathbase.h |
| pigeoposition.h | pimathvector.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/io_devices | Includes file in src_main/core |
|---|---|
| pifile.cpp | pitime_win.h |
| piiodevice.h | picollection.h |
| piiodevice.h | piinit.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/io_devices | Includes file in src_main/io_utils |
|---|---|
| piiodevice.cpp | piconnection.h |
| pipeer.cpp | pidatatransfer.h |
| pipeer.h | pidiagnostics.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/io_devices | Includes file in src_main/thread |
|---|---|
| piethernet.h | pitimer.h |
| piiodevice.h | pitimer.h |
| piserial.h | pitimer.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/io_utils | Includes file in src_main/core |
|---|---|
| piethutilbase.h | pibytearray.h |
| pistreampacker.h | piobject.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/io_devices | Includes file in src_main/core |
|---|---|
| pifile.cpp | pitime_win.h |
| piiodevice.h | picollection.h |
| piiodevice.h | piinit.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/io_utils | Includes file in src_main/io_devices |
|---|---|
| pibroadcast.h | piethernet.h |
| piconnection.cpp | piconfig.h |
| pifiletransfer.h | pidir.h |
| pipacketextractor.h | piiodevice.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/io_utils | Includes file in src_main/math |
|---|---|
| pibasetransfer.h | picrc.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/io_utils | Includes file in src_main/thread |
|---|---|
| pidiagnostics.h | pitimer.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/io_utils | Includes file in src_main/math |
|---|---|
| pibasetransfer.h | picrc.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/math | Includes file in src_main/containers |
|---|---|
| pimathbase.h | pipair.h |
| pimathbase.h | pivector.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/math | Includes file in src_main/core |
|---|---|
| picompress.h | pibytearray.h |
| picrc.h | pistring.h |
| pievaluator.h | pistring.h |
| pifixedpoint.h | picout.h |
| pimathbase.cpp | pitime.h |
| pimathbase.h | piinit.h |
| pimathcomplex.h | pibytearray.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/io_utils | Includes file in src_main/core |
|---|---|
| piethutilbase.h | pibytearray.h |
| pistreampacker.h | piobject.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/io_utils | Includes file in src_main/io_devices |
|---|---|
| pibroadcast.h | piethernet.h |
| piconnection.cpp | piconfig.h |
| pifiletransfer.h | pidir.h |
| pipacketextractor.h | piiodevice.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/io_utils | Includes file in src_main/thread |
|---|---|
| pidiagnostics.h | pitimer.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/opencl | Includes file in src_main/core |
|---|---|
| piopencl.h | pivariant.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/opencl | Includes file in src_main/core |
|---|---|
| piopencl.h | pivariant.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/resources | Includes file in src_main/core |
|---|---|
| piresources.h | pistring.h |
| piresourcesstorage.cpp | pichunkstream.h |
| piresourcesstorage.h | pistring.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/resources | Includes file in src_main/core |
|---|---|
| piresources.h | pistring.h |
| piresourcesstorage.cpp | pichunkstream.h |
| piresourcesstorage.h | pistring.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/system | Includes file in src_main/core |
|---|---|
| piintrospection_proxy.h | pibase.h |
| pilibrary.h | pistring.h |
| pisignals.h | piflags.h |
| pisysteminfo.h | pitime.h |
| pisystemmonitor.cpp | pitime_win.h |
| pisystemtests.h | pibase.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/system | Includes file in src_main/core |
|---|---|
| piintrospection_proxy.h | pibase.h |
| pilibrary.h | pistring.h |
| pisignals.h | piflags.h |
| pisysteminfo.h | pitime.h |
| pisystemmonitor.cpp | pitime_win.h |
| pisystemtests.h | pibase.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/system | Includes file in src_main/io_devices |
|---|---|
| piintrospection.h | pipeer.h |
| piprocess.h | pifile.h |
| pisingleapplication.cpp | pisharedmemory.h |
| pisystemmonitor.cpp | pidir.h |
| pisystemmonitor.h | pifile.h |
| pisystemtests.cpp | piconfig.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/system | Includes file in src_main/io_devices |
|---|---|
| piintrospection.h | pipeer.h |
| piprocess.h | pifile.h |
| pisingleapplication.cpp | pisharedmemory.h |
| pisystemmonitor.cpp | pidir.h |
| pisystemmonitor.h | pifile.h |
| pisystemtests.cpp | piconfig.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/system | Includes file in src_main/thread |
|---|---|
| piintrospection.h | pimutex.h |
| piprocess.h | pithread.h |
| pisingleapplication.h | pithread.h |
| pisystemmonitor.h | pithread.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/thread | Includes file in src_main/core |
|---|---|
| pimutex.h | piinit.h |
| pithread.h | piinit.h |
| pithread.h | piobject.h |
| pitimer.h | pitime.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/thread | Includes file in src_main/core |
|---|---|
| pimutex.h | piinit.h |
| pithread.h | piinit.h |
| pithread.h | piobject.h |
| pitimer.h | pitime.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/thread | Includes file in src_main/io_utils |
|---|---|
| pigrabberbase.h | pidiagnostics.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_main/thread | Includes file in src_main/io_utils |
|---|---|
| pigrabberbase.h | pidiagnostics.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_usb | Includes file in src_main |
|---|---|
| piusb.cpp | io_devices / piconfig.h |
| piusb.cpp | io_devices / piusb.h |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| File in src_usb | Includes file in src_main |
|---|---|
| piusb.cpp | io_devices / piconfig.h |
| piusb.cpp | io_devices / piusb.h |
|
- PIP
- 0.7.1
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | picontainers.h |
| Generic containers. | |
| file | pideque.h |
| Dynamic array of any type. | |
| file | pimap.h |
| Associative array with custom types of key and value. | |
| file | piset.h |
| Set container. | |
| file | pistack.h |
| Stack container. | |
| file | pivector.h |
| Dynamic array of any type. | |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | picodeinfo.h |
| C++ code info structs. | |
| file | picodeparser.h |
| C++ code parser. | |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | piellipsoidmodel.h |
| Contains geo ellipsoid models. | |
| file | pigeoposition.h |
| Class for geo position storage and conversions. | |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | piresources.h |
| Resources subsystem. | |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | piprocess.h |
| Process. | |
| file | pisignals.h |
| System signals. | |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | piconsole.h |
| Console output class. | |
| file | pikbdlistener.h |
| Keyboard console input listener. | |
| file | piscreen.h |
| Console GUI class. | |
| file | piscreenconsole.h |
| Tile for PIScreen with PIConsole API. | |
| file | piscreendrawer.h |
| Drawer for PIScreen. | |
| file | piscreentile.h |
| Basic PIScreen tile. | |
| file | piscreentiles.h |
| Various tiles for PIScreen. | |
| file | piscreentypes.h |
| Types for PIScreen. | |
| file | piterminal.h |
| Virtual terminal. | |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 0.7.1
-
- Platform-Independent Primitives
- |
-

|
- PIP
- 0.7.1
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | picodeinfo.h |
| C++ code info structs. | |
| file | picodeparser.h |
| C++ code parser. | |
|
- PIP
- 0.7.1
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | piconsole.h |
| Console output class. | |
| file | pikbdlistener.h |
| Keyboard console input listener. | |
| file | piscreen.h |
| Console output class. | |
| file | piscreendrawer.h |
| Drawer for PIScreen. | |
| file | piscreentile.h |
| Basic PIScreen tile. | |
| file | piscreentiles.h |
| Various tiles for PIScreen. | |
| file | piscreentypes.h |
| Types for PIScreen. | |
| file | piterminal.h |
| Virtual terminal. | |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | pibase.h |
| Base types and functions. | |
| file | pibitarray.h |
| Bit array. | |
| file | pibytearray.h |
| Byte array. | |
| file | pichar.h |
| Unicode char. | |
| file | pichunkstream.h |
| Binary markup serializator. | |
| file | picli.h |
| Command-Line parser. | |
| file | picollection.h |
| Custom elements collection. | |
| file | picout.h |
| Universal output to console class. | |
| file | piflags.h |
| General flags class. | |
| file | piinit.h |
| Initialization. | |
| file | piobject.h |
| Base object. | |
| file | pipropertystorage.h |
| Storage of properties for GUI usage. | |
| file | pistatemachine.h |
| Base class for custom state machine. | |
| file | pistring.h |
| String. | |
| file | pitime.h |
| Time structs. | |
| file | pitime_win.h |
| PITime conversions for Windows. | |
| file | pivariant.h |
| Variant type. | |
| file | pivarianttypes.h |
| Variant type. | |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | pigrabberbase.h |
| Abstract class for create grabbers. | |
| file | pimutex.h |
| Mutex. | |
| file | pipipelinethread.h |
| Class for create multihread pipeline. | |
| file | pithread.h |
| Thread. | |
| file | pitimer.h |
| Timer. | |
|
- PIP
- 0.7.1
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | pibasetransfer.h |
| Base class for reliable send and receive data in fixed packets with error correction, pause and resume. | |
| file | pibroadcast.h |
| Broadcast for all interfaces, including loopback. | |
| file | piconnection.h |
| Complex I/O point. | |
| file | pidatatransfer.h |
| Class for send and receive PIByteArray via PIBaseTransfer. | |
| file | pidiagnostics.h |
| Connection quality diagnostics. | |
| file | piethutilbase.h |
| Base class for ethernet utils. | |
| file | pifiletransfer.h |
| Class for send and receive files and directories via PIBaseTransfer. | |
| file | pipacketextractor.h |
| Packets extractor. | |
| file | pistreampacker.h |
| Simple packet wrap aroud any PIIODevice. | |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | pibinarylog.h |
| Binary log. | |
| file | piconfig.h |
| Configuration parser and writer. | |
| file | pidir.h |
| Local directory. | |
| file | piethernet.h |
| Ethernet device. | |
| file | pifile.h |
| Local file. | |
| file | piiobytearray.h |
| PIIODevice wrapper around PIByteArray. | |
| file | piiodevice.h |
| Abstract input/output device. | |
| file | piiostring.h |
| PIIODevice wrapper around PIString. | |
| file | pipeer.h |
| Peering net node. | |
| file | piserial.h |
| Serial device. | |
| file | pisharedmemory.h |
| Shared memory. | |
| file | pitransparentdevice.h |
| PIIODevice that pass write to read. | |
| file | piusb.h |
| USB device. | |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | picrc.h |
| CRC checksum calculator. | |
| file | pievaluator.h |
| Mathematic expressions calculator. | |
| file | pifft.h |
| Class for FFT, IFFT and Hilbert transformations. | |
| file | pifixedpoint.h |
| Class for fixed point numbers. | |
| file | pigeometry.h |
| Geometry base class. | |
| file | pimathbase.h |
| Basic mathematical functions and defines. | |
| file | pimathcomplex.h |
| PIP math complex. | |
| file | pimathmatrix.h |
| PIMathMatrix. | |
| file | pimathsolver.h |
| PIMathSolver. | |
| file | pimathvector.h |
| PIMathVector. | |
| file | piquaternion.h |
| Class for quaternions. | |
| file | pistatistic.h |
| Class for calculating math statistic in values array. | |
|
- PIP
- 0.7.1
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | picrc.h |
| CRC checksum calculator. | |
| file | picrypt.h |
| Cryptographic class using lib Sodium. | |
| file | pievaluator.h |
| Mathematic expressions calculator. | |
| file | pifft.h |
| Class for FFT, IFFT and Hilbert transformations. | |
| file | pifixedpoint.h |
| Class for fixed point numbers. | |
| file | pimath.h |
| Many mathematical functions and classes. | |
| file | pimathbase.h |
| Basic mathematical functions and defines. | |
| file | pimathmatrix.h |
| PIMathMatrix. | |
| file | pimathsolver.h |
| PIMathSolver. | |
| file | pimathvector.h |
| PIMathVector. | |
| file | piquaternion.h |
| Class for quaternions. | |
| file | pistatistic.h |
| Class for calculating math statistic in values array. | |
|
- PIP
- 0.7.1
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | pibase.h |
| Base types and functions. | |
| file | pibytearray.h |
| Byte array. | |
| file | pichar.h |
| Unicode char. | |
| file | pichunkstream.h |
| Binary serializator. | |
| file | picli.h |
| Command-Line parser. | |
| file | picollection.h |
| Custom elements collection. | |
| file | picout.h |
| Universal output to console class. | |
| file | piflags.h |
| General flags class. | |
| file | piinit.h |
| Initialization. | |
| file | piobject.h |
| Base object. | |
| file | pistatemachine.h |
| Base class for custom state machine. | |
| file | pistring.h |
| String. | |
| file | pitime.h |
| Time structs. | |
| file | pivariant.h |
| Variant type. | |
| file | pivarianttypes.h |
| Variant type. | |
|
- PIP
- 0.7.1
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | piellipsoidmodel.h |
| Contains geo ellipsoid models. | |
| file | pigeoposition.h |
| Class for geo position storage and conversions. | |
|
- PIP
- 0.7.1
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | pimutex.h |
| Mutex. | |
| file | pipipelinethread.h |
| Class for create multihread pipeline. | |
| file | pithread.h |
| Thread. | |
| file | pitimer.h |
| Timer. | |
|
- PIP
- 0.7.1
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | pibasetransfer.h |
| Base class for reliable send and receive data in fixed packets with error correction, pause and resume. | |
| file | pibinarylog.h |
| Binary log. | |
| file | piconfig.h |
| Configuration parser and writer. | |
| file | piconnection.h |
| Complex I/O point. | |
| file | pidatatransfer.h |
| Class for send and receive PIByteArray via PIBaseTransfer. | |
| file | pidiagnostics.h |
| Connection quality diagnostics. | |
| file | pidir.h |
| Local directory. | |
| file | piethernet.h |
| Ethernet device. | |
| file | pifile.h |
| Local file. | |
| file | pifiletransfer.h |
| Class for send and receive files and directories via PIBaseTransfer. | |
| file | piiobytearray.h |
| PIIODevice wrapper around PIByteArray. | |
| file | piiodevice.h |
| Abstract input/output device. | |
| file | piiostring.h |
| PIIODevice wrapper around PIString. | |
| file | pipacketextractor.h |
| Packets extractor. | |
| file | pipeer.h |
| Peering net node. | |
| file | piprotocol.h |
| Highly configurable from file I/O channel. | |
| file | piserial.h |
| Serial device. | |
| file | pisharedmemory.h |
| Shared memory. | |
| file | pitransparentdevice.h |
| PIIODevice that pass write to read. | |
| file | piusb.h |
| USB device. | |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 0.7.1
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | piprocess.h |
| Process. | |
| file | pisignals.h |
| System signals. | |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | picontainers.h |
| Base for generic containers. | |
| file | pideque.h |
| Dynamic array of any type. | |
| file | pilist.h |
| Linked list container, wrapper for std::list. | |
| file | pimap.h |
| Associative array with custom types of key and value. | |
| file | pipair.h |
| pair | |
| file | piset.h |
| Set container. | |
| file | pistack.h |
| Stack container. | |
| file | pivector.h |
| Dynamic array of any type. | |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-

-Files | |
| file | pifft_p.h |
| Class for FFT, IFFT and Hilbert transformations. | |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| ▼ src_fftw | |
| pifft_p.h | Class for FFT, IFFT and Hilbert transformations |
| ▼ src_main | |
| ▼ code | |
| picodeinfo.h | C++ code info structs |
| picodeparser.h | C++ code parser |
| ▼ console | |
| piconsole.h | Console output class |
| pikbdlistener.h | Keyboard console input listener |
| piscreen.h | Console GUI class |
| piscreenconsole.h | Tile for PIScreen with PIConsole API |
| piscreendrawer.h | Drawer for PIScreen |
| piscreentile.h | Basic PIScreen tile |
| piscreentiles.h | Various tiles for PIScreen |
| piscreentypes.h | Types for PIScreen |
| piterminal.h | Virtual terminal |
| ▼ containers | |
| picontainers.h | Base for generic containers |
| pideque.h | Dynamic array of any type |
| pilist.h | Linked list container, wrapper for std::list |
| pimap.h | Associative array with custom types of key and value |
| pipair.h | Pair |
| piset.h | Set container |
| pistack.h | Stack container |
| pivector.h | Dynamic array of any type |
| ▼ core | |
| pibase.h | Base types and functions |
| pibitarray.h | Bit array |
| pibytearray.h | Byte array |
| pichar.h | Unicode char |
| pichunkstream.h | Binary markup serializator |
| picli.h | Command-Line parser |
| picollection.h | Custom elements collection |
| picout.h | Universal output to console class |
| piflags.h | General flags class |
| piinit.h | Initialization |
| piobject.h | Base object |
| pipropertystorage.h | Storage of properties for GUI usage |
| pistatemachine.h | Base class for custom state machine |
| pistring.h | String |
| pitime.h | Time structs |
| pitime_win.h | PITime conversions for Windows |
| pivariant.h | Variant type |
| pivarianttypes.h | Variant type |
| ▼ crypt | |
| piauth.h | PIP Authentication API |
| picrypt.h | Cryptographic class using lib Sodium |
| ▼ geo | |
| piellipsoidmodel.h | Contains geo ellipsoid models |
| pigeoposition.h | Class for geo position storage and conversions |
| ▼ io_devices | |
| pibinarylog.h | Binary log |
| piconfig.h | Configuration parser and writer |
| pidir.h | Local directory |
| piethernet.h | Ethernet device |
| pifile.h | Local file |
| piiobytearray.h | PIIODevice wrapper around PIByteArray |
| piiodevice.h | Abstract input/output device |
| piiostring.h | PIIODevice wrapper around PIString |
| pipeer.h | Peering net node |
| piserial.h | Serial device |
| pisharedmemory.h | Shared memory |
| pitransparentdevice.h | PIIODevice that pass write to read |
| piusb.h | USB device |
| ▼ io_utils | |
| pibasetransfer.h | Base class for reliable send and receive data in fixed packets with error correction, pause and resume |
| pibroadcast.h | Broadcast for all interfaces, including loopback |
| piconnection.h | Complex I/O point |
| pidatatransfer.h | Class for send and receive PIByteArray via PIBaseTransfer |
| pidiagnostics.h | Connection quality diagnostics |
| piethutilbase.h | Base class for ethernet utils |
| pifiletransfer.h | Class for send and receive files and directories via PIBaseTransfer |
| pipacketextractor.h | Packets extractor |
| pistreampacker.h | Simple packet wrap aroud any PIIODevice |
| ▼ math | |
| picrc.h | CRC checksum calculator |
| pievaluator.h | Mathematic expressions calculator |
| pifft.h | Class for FFT, IFFT and Hilbert transformations |
| pifixedpoint.h | Class for fixed point numbers |
| pigeometry.h | Geometry base class |
| pimathbase.h | Basic mathematical functions and defines |
| pimathcomplex.h | PIP math complex |
| pimathmatrix.h | PIMathMatrix |
| pimathsolver.h | PIMathSolver |
| pimathvector.h | PIMathVector |
| piquaternion.h | Class for quaternions |
| pistatistic.h | Class for calculating math statistic in values array |
| ▼ resources | |
| piresources.h | Resources subsystem |
| ▼ system | |
| piprocess.h | Process |
| pisignals.h | System signals |
| ▼ thread | |
| pigrabberbase.h | Abstract class for create grabbers |
| pimutex.h | Mutex |
| pipipelinethread.h | Class for create multihread pipeline |
| pithread.h | Thread |
| pitimer.h | Timer |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
This page explains how to interpret the graphs that are generated by doxygen.
-Consider the following example:
This will result in the following graph:
-
-The boxes in the above graph have the following meaning:
-The arrows have the following meaning:
-|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
| CPIEthernet::Address | IPv4 network address, IP and port |
| CPIBinaryLog::BinLogIndex | Struct contains position, ID and timestamp of record in file |
| CPIBinaryLog::BinLogInfo | Struct contains full information about Binary Log file and about all Records using map of BinLogRecordInfo |
| CPIBinaryLog::BinLogRecordInfo | Struct contains information about all records with same ID |
| CPIConfig::Entry | Entry of configuration file |
| CPIEthernet::Interface | Network interface descriptor |
| CPIKbdListener::KeyEvent | This struct contains information about pressed keyboard key |
| ▶CPIKbdListener::MouseEvent | This struct contains information about mouse action |
| CPICout::Notifier | Class for emit notifications of PICout |
| CPIByteArray | Byte array |
| CPIChar | Unicode char |
| CPIChunkStream | Class for binary serialization |
| CPICollection | Interface to discover element groups |
| CPIConfig | Configuration file |
| CPICout | Class for formatted output similar std::cout |
| CPIDir | Local directory |
| ▶CPIEthUtilBase | Base class for ethernet utils |
| CPIEvaluator | This class provide mathematical evaluations of custom expression |
| CPIFlags< Enum > | This class used as container for bit flags |
| CPIFlags< Attribute > | |
| CPIFlags< Channel > | |
| CPIFlags< DeviceOption > | |
| CPIFlags< FileInfo::Flag > | |
| CPIFlags< FocusFlag > | |
| CPIFlags< InterfaceFlag > | |
| CPIFlags< KeyModifier > | |
| CPIFlags< MouseButton > | |
| CPIFlags< PICodeInfo::TypeFlag > | |
| CPIFlags< PIConsole::Format > | |
| CPIFlags< PICoutControl > | |
| CPIMutex | Mutex |
| ▶CPIObject | This is base class for any classes which use events -> handlers mechanism |
| CPISet< T > | Set of any type |
| CPISet< const void * > | |
| CPISet< int > | |
| CPISet< PIObject * > | |
| CPISet< PIString > | |
| CPIString | String class |
| CPIStringList | Strings array class |
| CPISystemTime | System time |
| CPITimeMeasurer | Time measurements |
| CPIVariant | Variant type |
| CPIVector< T > | Dynamic array of any type |
| CPIVector2D< T > | 2D array, |
| CPIVector< __Connection > | |
| CPIVector< __MetaFunc > | |
| CPIVector< __QueuedEvent > | |
| CPIVector< _PITimerImp_Pool * > | |
| CPIVector< Argument > | |
| CPIVector< Button > | |
| CPIVector< CHAR_INFO > | |
| CPIVector< Column > | |
| CPIVector< complex< T > > | |
| CPIVector< complexd > | |
| CPIVector< complexf > | |
| CPIVector< Condition > | |
| CPIVector< const PIObject * > | |
| CPIVector< Define > | |
| CPIVector< Delimiter > | |
| CPIVector< Device > | |
| CPIVector< DeviceData *> | |
| CPIVector< double > | |
| CPIVector< Entity * > | |
| ▶CPIVector< Entry * > | |
| CPIVector< Enum > | |
| CPIVector< Enumerator > | |
| CPIVector< EnumeratorInfo > | |
| CPIVector< Extractor *> | |
| CPIVector< float > | |
| CPIVector< Group > | |
| CPIVector< int > | |
| CPIVector< Kernel * > | |
| CPIVector< KernelArg > | |
| CPIVector< Macro > | |
| CPIVector< Member > | |
| CPIVector< MetaMap > | |
| CPIVector< PacketType > | |
| CPIVector< PeerAddress > | |
| CPIVector< PeerInfo *> | |
| CPIVector< PeerInfo > | |
| CPIVector< PFTFileInfo > | |
| CPIVector< PIBinaryLog::BinLogIndex > | |
| CPIVector< PIBinaryLog::BinLogRecordInfo > | |
| CPIVector< PIByteArray *> | |
| CPIVector< PIByteArray > | |
| CPIVector< PIChar > | |
| CPIVector< PICodeInfo::ClassInfo * > | |
| CPIVector< PICodeInfo::EnumeratorInfo > | |
| CPIVector< PICodeInfo::FunctionInfo > | |
| CPIVector< PICodeInfo::TypeInfo > | |
| CPIVector< PIConfig * > | |
| CPIVector< PIConnection * > | |
| CPIVector< PICoutControls > | |
| CPIVector< PIDiagnostics *> | |
| CPIVector< PIEthernet *> | |
| CPIVector< PIEthernet::Address > | |
| ▶CPIVector< PIEthernet::Interface > | |
| CPIVector< PIEvaluatorTypes::Function > | |
| CPIVector< PIEvaluatorTypes::Instruction > | |
| CPIVector< PIEvaluatorTypes::Variable > | |
| CPIVector< PIIODevice *> | |
| CPIVector< PIIODevice::DeviceMode > | |
| CPIVector< PIMathVectord > | |
| CPIVector< PIPair< int, PISystemTime > > | |
| CPIVector< PIScreenTile * > | |
| CPIVector< PIStateMachine::Rule > | |
| CPIVector< PIStateMachine::State > | |
| CPIVector< PIString > | |
| CPIVector< PIThread * > | |
| CPIVector< PIUSB::Configuration > | |
| CPIVector< PIUSB::Endpoint > | |
| CPIVector< PIUSB::Interface > | |
| CPIVector< PIVariable > | |
| CPIVector< PIVariant > | |
| CPIVector< PIVector< double > > | |
| CPIVector< PIVector< Part > > | |
| CPIVector< PIVector< PeerInfo * > > | |
| CPIVector< PIVector< PIIODevice * > > | |
| CPIVector< PIVector< PIPacketExtractor * > > | |
| CPIVector< PIVector< PIScreenTypes::Cell > > | |
| CPIVector< PIVector< Type > > | |
| CPIVector< Platform > | |
| CPIVector< Program * > | |
| CPIVector< Property > | |
| CPIVector< Rect > | |
| CPIVector< RemoteClient > | |
| CPIVector< Row > | |
| CPIVector< Section *> | |
| CPIVector< Sender *> | |
| CPIVector< Tab > | |
| CPIVector< ThreadInfo > | |
| CPIVector< ThreadStats > | |
| CPIVector< Type > | |
| CPIVector< Typedef > | |
| CPIVector< uchar > | |
| CPIVector< Variable > | |
| CPIByteArray::RawData | Help struct to store/restore custom blocks of data to/from PIByteArray |
| CPIStateMachine< Type >::Rule | Rule of transition between states of machine |
| CPIDiagnostics::State | Information about current diagnostics state |
| CPIStateMachine< Type >::State | State of machine |
| CTileVars | |
| CTransferFunction | Differential evaluations |
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
PIP - Platform-Independent Primitives - is crossplatform library for C++ developers. It is wrap around STL and pure C++. This library can help developers write non-GUI projects much more quickly, efficiently and customizable than on pure C++. Library contains many classes, some of them are pure abstract, some classes can be used as they are, some classes should be inherited to new classes. PIP provide classes:
|
- PIP
- 1.8.0
-
- Platform-Independent Primitives
- |
-
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
| t |