PIP  1.7.1
Platform-Independent Primitives
PIProtocol Class Reference

DEPRECATED. More...

Inheritance diagram for PIProtocol:

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 PIObjectfindByName (const PIString &name)
 Returns PIObject* with name "name" or 0, if there is no object found.
 
- Protected Member Functions inherited from PIObject
PIObjectemitter () 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...
 

Detailed Description

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)

Synopsis

Member Enumeration Documentation

◆ Quality

Connection quality.

Enumerator
Unknown 

Unknown, no one packet received yet

Failure 

No connection, no one correct packet received for last period

Bad 

Bad connection, correct packets received <= 20%

Average 

Average connection, correct packets received > 20% and <= 80%

Good 

Good connection, correct packets received > 80%

Constructor & Destructor Documentation

◆ PIProtocol()

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"