complex macros with ;
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
|
||||
class PIP_CLOUD_EXPORT PICloudClient: public PIIODevice, public PICloudBase
|
||||
{
|
||||
PIIODEVICE(PICloudClient, "")
|
||||
PIIODEVICE(PICloudClient, "");
|
||||
public:
|
||||
explicit PICloudClient(const PIString & path = PIString(), PIIODevice::DeviceMode mode = PIIODevice::ReadWrite);
|
||||
virtual ~PICloudClient();
|
||||
@@ -43,8 +43,8 @@ public:
|
||||
void setKeepConnection(bool on);
|
||||
bool isConnected() const {return is_connected;}
|
||||
|
||||
EVENT(connected)
|
||||
EVENT(disconnected)
|
||||
EVENT(connected);
|
||||
EVENT(disconnected);
|
||||
|
||||
protected:
|
||||
bool openDevice();
|
||||
|
||||
@@ -32,14 +32,14 @@
|
||||
|
||||
class PIP_CLOUD_EXPORT PICloudServer: public PIIODevice, public PICloudBase
|
||||
{
|
||||
PIIODEVICE(PICloudServer, "")
|
||||
PIIODEVICE(PICloudServer, "");
|
||||
public:
|
||||
//! PICloudServer
|
||||
explicit PICloudServer(const PIString & path = PIString(), PIIODevice::DeviceMode mode = PIIODevice::ReadWrite);
|
||||
virtual ~PICloudServer();
|
||||
|
||||
class Client : public PIIODevice {
|
||||
PIIODEVICE(PICloudServer::Client, "")
|
||||
PIIODEVICE(PICloudServer::Client, "");
|
||||
friend class PICloudServer;
|
||||
public:
|
||||
Client(PICloudServer * srv = nullptr, uint id = 0);
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
PIVector<PICloudServer::Client *> clients() const;
|
||||
|
||||
EVENT1(newConnection, PICloudServer::Client * , client)
|
||||
EVENT1(newConnection, PICloudServer::Client * , client);
|
||||
|
||||
protected:
|
||||
bool openDevice();
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
class PIP_EXPORT PIKbdListener: public PIThread
|
||||
{
|
||||
PIOBJECT_SUBCLASS(PIKbdListener, PIThread)
|
||||
PIOBJECT_SUBCLASS(PIKbdListener, PIThread);
|
||||
friend class PIConsole;
|
||||
friend class PITerminal;
|
||||
public:
|
||||
@@ -176,9 +176,9 @@ public:
|
||||
EVENT_HANDLER(void, setActive) {setActive(true);}
|
||||
EVENT_HANDLER1(void, setActive, bool, yes);
|
||||
|
||||
EVENT2(keyPressed, PIKbdListener::KeyEvent, key, void * , data)
|
||||
EVENT2(mouseEvent, PIKbdListener::MouseEvent, mouse, void * , data)
|
||||
EVENT2(wheelEvent, PIKbdListener::WheelEvent, wheel, void * , data)
|
||||
EVENT2(keyPressed, PIKbdListener::KeyEvent, key, void * , data);
|
||||
EVENT2(mouseEvent, PIKbdListener::MouseEvent, mouse, void * , data);
|
||||
EVENT2(wheelEvent, PIKbdListener::WheelEvent, wheel, void * , data);
|
||||
|
||||
//! \handlers
|
||||
//! \{
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
class PIP_CONSOLE_EXPORT PIScreen: public PIThread, public PIScreenTypes::PIScreenBase
|
||||
{
|
||||
PIOBJECT_SUBCLASS(PIScreen, PIThread)
|
||||
PIOBJECT_SUBCLASS(PIScreen, PIThread);
|
||||
class SystemConsole;
|
||||
public:
|
||||
|
||||
@@ -76,8 +76,8 @@ public:
|
||||
EVENT_HANDLER0(void, stop) {stop(false);}
|
||||
EVENT_HANDLER1(void, stop, bool, clear);
|
||||
|
||||
EVENT2(keyPressed, PIKbdListener::KeyEvent, key, void * , data)
|
||||
EVENT2(tileEvent, PIScreenTile * , tile, PIScreenTypes::TileEvent, e)
|
||||
EVENT2(keyPressed, PIKbdListener::KeyEvent, key, void * , data);
|
||||
EVENT2(tileEvent, PIScreenTile * , tile, PIScreenTypes::TileEvent, e);
|
||||
|
||||
//! \handlers
|
||||
//! \{
|
||||
|
||||
@@ -34,7 +34,7 @@ class PIScreenDrawer;
|
||||
|
||||
class PIP_CONSOLE_EXPORT PIScreenTile: public PIObject {
|
||||
friend class PIScreen;
|
||||
PIOBJECT_SUBCLASS(PIScreenTile, PIObject)
|
||||
PIOBJECT_SUBCLASS(PIScreenTile, PIObject);
|
||||
public:
|
||||
PIScreenTile(const PIString & n = PIString(), PIScreenTypes::Direction d = PIScreenTypes::Vertical, PIScreenTypes::SizePolicy p = PIScreenTypes::Preferred);
|
||||
virtual ~PIScreenTile();
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
|
||||
class PIP_CONSOLE_EXPORT TileSimple: public PIScreenTile {
|
||||
PIOBJECT_SUBCLASS(TileSimple, PIScreenTile)
|
||||
PIOBJECT_SUBCLASS(TileSimple, PIScreenTile);
|
||||
public:
|
||||
typedef PIPair<PIString, PIScreenTypes::CellFormat> Row;
|
||||
TileSimple(const PIString & n = PIString());
|
||||
@@ -48,7 +48,7 @@ protected:
|
||||
class TileList;
|
||||
|
||||
class PIP_CONSOLE_EXPORT TileScrollBar: public PIScreenTile {
|
||||
PIOBJECT_SUBCLASS(TileScrollBar, PIScreenTile)
|
||||
PIOBJECT_SUBCLASS(TileScrollBar, PIScreenTile);
|
||||
friend class TileList;
|
||||
public:
|
||||
TileScrollBar(const PIString & n = PIString());
|
||||
@@ -71,7 +71,7 @@ protected:
|
||||
|
||||
|
||||
class PIP_CONSOLE_EXPORT TileList: public PIScreenTile {
|
||||
PIOBJECT_SUBCLASS(TileList, PIScreenTile)
|
||||
PIOBJECT_SUBCLASS(TileList, PIScreenTile);
|
||||
public:
|
||||
enum SelectionMode {
|
||||
NoSelection,
|
||||
@@ -105,7 +105,7 @@ protected:
|
||||
|
||||
|
||||
class PIP_CONSOLE_EXPORT TileButton: public PIScreenTile {
|
||||
PIOBJECT_SUBCLASS(TileButton, PIScreenTile)
|
||||
PIOBJECT_SUBCLASS(TileButton, PIScreenTile);
|
||||
public:
|
||||
TileButton(const PIString & n = PIString());
|
||||
virtual ~TileButton() {}
|
||||
@@ -125,7 +125,7 @@ protected:
|
||||
|
||||
|
||||
class PIP_CONSOLE_EXPORT TileButtons: public PIScreenTile {
|
||||
PIOBJECT_SUBCLASS(TileButtons, PIScreenTile)
|
||||
PIOBJECT_SUBCLASS(TileButtons, PIScreenTile);
|
||||
public:
|
||||
TileButtons(const PIString & n = PIString());
|
||||
virtual ~TileButtons() {}
|
||||
@@ -150,7 +150,7 @@ protected:
|
||||
|
||||
|
||||
class PIP_CONSOLE_EXPORT TileCheck: public PIScreenTile {
|
||||
PIOBJECT_SUBCLASS(TileCheck, PIScreenTile)
|
||||
PIOBJECT_SUBCLASS(TileCheck, PIScreenTile);
|
||||
public:
|
||||
TileCheck(const PIString & n = PIString());
|
||||
virtual ~TileCheck() {}
|
||||
@@ -169,7 +169,7 @@ protected:
|
||||
|
||||
|
||||
class PIP_CONSOLE_EXPORT TileProgress: public PIScreenTile {
|
||||
PIOBJECT_SUBCLASS(TileProgress, PIScreenTile)
|
||||
PIOBJECT_SUBCLASS(TileProgress, PIScreenTile);
|
||||
public:
|
||||
TileProgress(const PIString & n = PIString());
|
||||
virtual ~TileProgress() {}
|
||||
@@ -185,7 +185,7 @@ protected:
|
||||
|
||||
|
||||
class PIP_CONSOLE_EXPORT TilePICout: public TileList {
|
||||
PIOBJECT_SUBCLASS(TilePICout, PIScreenTile)
|
||||
PIOBJECT_SUBCLASS(TilePICout, PIScreenTile);
|
||||
public:
|
||||
TilePICout(const PIString & n = PIString());
|
||||
virtual ~TilePICout() {}
|
||||
@@ -198,7 +198,7 @@ protected:
|
||||
|
||||
|
||||
class PIP_CONSOLE_EXPORT TileInput: public PIScreenTile {
|
||||
PIOBJECT_SUBCLASS(TileInput, PIScreenTile)
|
||||
PIOBJECT_SUBCLASS(TileInput, PIScreenTile);
|
||||
public:
|
||||
TileInput(const PIString & n = PIString());
|
||||
virtual ~TileInput() {}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
class PIP_CONSOLE_EXPORT PITerminal: public PIThread
|
||||
{
|
||||
PIOBJECT_SUBCLASS(PITerminal, PIThread)
|
||||
PIOBJECT_SUBCLASS(PITerminal, PIThread);
|
||||
public:
|
||||
|
||||
//! Constructs %PITerminal
|
||||
|
||||
@@ -108,7 +108,7 @@ class NotifierObject: public PIObject {
|
||||
PIOBJECT(NotifierObject)
|
||||
public:
|
||||
NotifierObject() {}
|
||||
EVENT2(finished, int, id, PIString*, buffer)
|
||||
EVENT2(finished, int, id, PIString*, buffer);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ class PIP_EXPORT PIObject {
|
||||
typedef PIObject __PIObject__;
|
||||
typedef void __Parent__;
|
||||
public:
|
||||
NO_COPY_CLASS(PIObject)
|
||||
NO_COPY_CLASS(PIObject);
|
||||
|
||||
//! \~english Contructs %PIObject with name "name"
|
||||
//! \~russian Создает %PIObject с именем "name"
|
||||
@@ -518,7 +518,7 @@ protected:
|
||||
//! \~russian Виртуальная функция, вызывается после изменения любого свойства.
|
||||
virtual void propertyChanged(const char * name) {}
|
||||
|
||||
EVENT1(deleted, PIObject *, o)
|
||||
EVENT1(deleted, PIObject *, o);
|
||||
|
||||
//! \events
|
||||
//! \{
|
||||
|
||||
@@ -40,7 +40,7 @@ class PIStringList;
|
||||
//! \~russian Класс строки.
|
||||
class PIP_EXPORT PIString
|
||||
{
|
||||
BINARY_STREAM_FRIEND(PIString)
|
||||
BINARY_STREAM_FRIEND(PIString);
|
||||
public:
|
||||
typedef PIDeque<PIChar>::iterator iterator;
|
||||
typedef PIDeque<PIChar>::const_iterator const_iterator;
|
||||
|
||||
@@ -206,7 +206,7 @@ classname_to __PIVariantFunctions__<classname_from>::castVariant<classname_to>(c
|
||||
//! \~english Variant type.
|
||||
class PIP_EXPORT PIVariant {
|
||||
friend PICout operator <<(PICout s, const PIVariant & v);
|
||||
BINARY_STREAM_FRIEND(PIVariant)
|
||||
BINARY_STREAM_FRIEND(PIVariant);
|
||||
public:
|
||||
|
||||
//! Type of %PIVariant content
|
||||
|
||||
@@ -76,19 +76,19 @@ public:
|
||||
|
||||
|
||||
//! Disconneted event
|
||||
EVENT1(disconnected, PIString, reason)
|
||||
EVENT1(disconnected, PIString, reason);
|
||||
|
||||
//! Conneted event
|
||||
EVENT1(connected, PIString, info)
|
||||
EVENT1(connected, PIString, info);
|
||||
|
||||
//! Client event for authorize new server
|
||||
EVENT2(authorize, PIByteArray, info, bool *, ok)
|
||||
EVENT2(authorize, PIByteArray, info, bool *, ok);
|
||||
|
||||
//! Client event for input server password
|
||||
EVENT1(passwordRequest, PIString *, pass)
|
||||
EVENT1(passwordRequest, PIString *, pass);
|
||||
|
||||
//! Server event on check client password
|
||||
EVENT1(passwordCheck, bool, result)
|
||||
EVENT1(passwordCheck, bool, result);
|
||||
|
||||
private:
|
||||
enum Role {Client, Server};
|
||||
|
||||
@@ -46,7 +46,7 @@ class PISystemMonitor;
|
||||
# define PIINTROSPECTION_START(name) PIINTROSPECTION_SERVER->start(#name);
|
||||
|
||||
class PIP_EXPORT PIIntrospectionServer: public PIPeer {
|
||||
PIOBJECT_SUBCLASS(PIIntrospectionServer, PIPeer)
|
||||
PIOBJECT_SUBCLASS(PIIntrospectionServer, PIPeer);
|
||||
public:
|
||||
static PIIntrospectionServer * instance();
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
private:
|
||||
PIIntrospectionServer();
|
||||
~PIIntrospectionServer();
|
||||
NO_COPY_CLASS(PIIntrospectionServer)
|
||||
NO_COPY_CLASS(PIIntrospectionServer);
|
||||
|
||||
PIString genName();
|
||||
virtual void dataReceived(const PIString & from, const PIByteArray & data);
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
//! \~russian Бинарный лог
|
||||
class PIP_EXPORT PIBinaryLog: public PIIODevice
|
||||
{
|
||||
PIIODEVICE(PIBinaryLog, "binlog")
|
||||
PIIODEVICE(PIBinaryLog, "binlog");
|
||||
public:
|
||||
explicit PIBinaryLog();
|
||||
virtual ~PIBinaryLog();
|
||||
@@ -286,10 +286,10 @@ public:
|
||||
//! \}
|
||||
|
||||
EVENT_HANDLER(PIString, createNewFile);
|
||||
EVENT(fileEnd)
|
||||
EVENT(fileError)
|
||||
EVENT1(newFile, const PIString &, filename)
|
||||
EVENT1(posChanged, int, pos)
|
||||
EVENT(fileEnd);
|
||||
EVENT(fileError);
|
||||
EVENT1(newFile, const PIString &, filename);
|
||||
EVENT1(posChanged, int, pos);
|
||||
|
||||
//! Get binlog info and statistic
|
||||
static BinLogInfo getLogInfo(const PIString & path);
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
class PIP_EXPORT PICAN: public PIIODevice
|
||||
{
|
||||
PIIODEVICE(PICAN, "can")
|
||||
PIIODEVICE(PICAN, "can");
|
||||
public:
|
||||
explicit PICAN(const PIString & path = PIString(), PIIODevice::DeviceMode mode = PIIODevice::ReadWrite);
|
||||
virtual ~PICAN();
|
||||
|
||||
@@ -38,7 +38,7 @@ class
|
||||
|
||||
class PIP_EXPORT PIEthernet: public PIIODevice
|
||||
{
|
||||
PIIODEVICE(PIEthernet, "eth")
|
||||
PIIODEVICE(PIEthernet, "eth");
|
||||
friend class PIPeer;
|
||||
public:
|
||||
|
||||
@@ -317,9 +317,9 @@ public:
|
||||
|
||||
int socket() const {return sock;}
|
||||
|
||||
EVENT1(newConnection, PIEthernet * , client)
|
||||
EVENT0(connected)
|
||||
EVENT1(disconnected, bool, withError)
|
||||
EVENT1(newConnection, PIEthernet * , client);
|
||||
EVENT0(connected);
|
||||
EVENT1(disconnected, bool, withError);
|
||||
|
||||
|
||||
//! Flags of network interface
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
//! \~russian Локальный файл.
|
||||
class PIP_EXPORT PIFile: public PIIODevice
|
||||
{
|
||||
PIIODEVICE(PIFile, "file")
|
||||
PIIODEVICE(PIFile, "file");
|
||||
public:
|
||||
|
||||
//! \~english Constructs file with empty path
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
//! \~russian Поддержка GPIO.
|
||||
class PIP_EXPORT PIGPIO: public PIThread
|
||||
{
|
||||
PIOBJECT_SUBCLASS(PIGPIO, PIThread)
|
||||
PIOBJECT_SUBCLASS(PIGPIO, PIThread);
|
||||
public:
|
||||
|
||||
//! \~english Work mode for pin
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
//! \~russian Заканчивает наблюдение за всеми пинами
|
||||
void clearWatch();
|
||||
|
||||
EVENT2(pinChanged, int, gpio_num, bool, new_value)
|
||||
EVENT2(pinChanged, int, gpio_num, bool, new_value);
|
||||
|
||||
//! \events
|
||||
//! \{
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
private:
|
||||
PIGPIO();
|
||||
virtual ~PIGPIO();
|
||||
NO_COPY_CLASS(PIGPIO)
|
||||
NO_COPY_CLASS(PIGPIO);
|
||||
|
||||
struct PIP_EXPORT GPIOData {
|
||||
GPIOData() {dir = PIGPIO::In; num = fd = -1;}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
//! \~russian Обёртка PIIODevice вокруг PIByteArray
|
||||
class PIP_EXPORT PIIOByteArray: public PIIODevice
|
||||
{
|
||||
PIIODEVICE(PIIOByteArray, "")
|
||||
PIIODEVICE(PIIOByteArray, "");
|
||||
public:
|
||||
|
||||
//! \~english Contructs %PIIOByteArray with "buffer" content and "mode" open mode
|
||||
|
||||
@@ -79,10 +79,10 @@ typedef bool (*ReadRetFunc)(void * , uchar * , int );
|
||||
//! \~russian Базовый класс утройств ввода/вывода.
|
||||
class PIP_EXPORT PIIODevice: public PIThread
|
||||
{
|
||||
PIOBJECT_SUBCLASS(PIIODevice, PIThread)
|
||||
PIOBJECT_SUBCLASS(PIIODevice, PIThread);
|
||||
friend void __DevicePool_threadReadDP(void * ddp);
|
||||
public:
|
||||
NO_COPY_CLASS(PIIODevice)
|
||||
NO_COPY_CLASS(PIIODevice);
|
||||
|
||||
//! \~english Constructs a empty %PIIODevice
|
||||
//! \~russian Создает пустой %PIIODevice
|
||||
@@ -367,10 +367,10 @@ public:
|
||||
|
||||
EVENT_VHANDLER(void, flush) {;}
|
||||
|
||||
EVENT(opened)
|
||||
EVENT(closed)
|
||||
EVENT2(threadedReadEvent, uchar * , readed, int, size)
|
||||
EVENT2(threadedWriteEvent, ullong, id, int, written_size)
|
||||
EVENT(opened);
|
||||
EVENT(closed);
|
||||
EVENT2(threadedReadEvent, uchar * , readed, int, size);
|
||||
EVENT2(threadedWriteEvent, ullong, id, int, written_size);
|
||||
|
||||
//! \handlers
|
||||
//! \{
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
//! \~russian Обёртка PIIODevice вокруг PIString.
|
||||
class PIP_EXPORT PIIOString: public PIIODevice
|
||||
{
|
||||
PIIODEVICE(PIIOString, "")
|
||||
PIIODEVICE(PIIOString, "");
|
||||
public:
|
||||
|
||||
//! \~english Contructs %PIIOString with "string" content and "mode" open mode
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#define _PIPEER_PING_TIMEOUT 5.0
|
||||
|
||||
class PIPeer::PeerData: public PIObject {
|
||||
PIOBJECT_SUBCLASS(PeerData, PIObject)
|
||||
PIOBJECT_SUBCLASS(PeerData, PIObject);
|
||||
public:
|
||||
PeerData(const PIString & n);
|
||||
~PeerData();
|
||||
@@ -45,8 +45,8 @@ public:
|
||||
EVENT_HANDLER1(void, dtReceiveFinishedIn, bool, ok) {if (ok) received(name(), dt_in.data());}
|
||||
EVENT_HANDLER1(void, dtReceiveFinishedOut, bool, ok) {if (ok) received(name(), dt_out.data());}
|
||||
EVENT_HANDLER(void, dtThread);
|
||||
EVENT2(received, const PIString &, from, const PIByteArray &, data)
|
||||
EVENT2(sendRequest, const PIString &, to, const PIByteArray &, data)
|
||||
EVENT2(received, const PIString &, from, const PIByteArray &, data);
|
||||
EVENT2(sendRequest, const PIString &, to, const PIByteArray &, data);
|
||||
bool send(const PIByteArray & d);
|
||||
void receivedPacket(uchar type, const PIByteArray & d);
|
||||
void setDist(int dist);
|
||||
@@ -61,11 +61,11 @@ PIPeer::PeerData::PeerData(const PIString & n): PIObject(n) {
|
||||
dt_out.setPacketSize(_PIPEER_MSG_SIZE);
|
||||
dt_in.setCRCEnabled(false);
|
||||
dt_out.setCRCEnabled(false);
|
||||
CONNECTU(&dt_in, sendRequest, this, dtSendRequestIn)
|
||||
CONNECTU(&dt_out, sendRequest, this, dtSendRequestOut)
|
||||
CONNECTU(&dt_in, receiveFinished, this, dtReceiveFinishedIn)
|
||||
CONNECTU(&dt_out, receiveFinished, this, dtReceiveFinishedOut)
|
||||
CONNECTU(&t, started, this, dtThread)
|
||||
CONNECTU(&dt_in, sendRequest, this, dtSendRequestIn);
|
||||
CONNECTU(&dt_out, sendRequest, this, dtSendRequestOut);
|
||||
CONNECTU(&dt_in, receiveFinished, this, dtReceiveFinishedIn);
|
||||
CONNECTU(&dt_out, receiveFinished, this, dtReceiveFinishedOut);
|
||||
CONNECTU(&t, started, this, dtThread);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
class PIP_EXPORT PIPeer: public PIIODevice
|
||||
{
|
||||
PIIODEVICE(PIPeer, "peer")
|
||||
PIIODEVICE(PIPeer, "peer");
|
||||
private:
|
||||
class PeerData;
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
|
||||
class PIP_EXPORT PeerInfo {
|
||||
friend class PIPeer;
|
||||
BINARY_STREAM_FRIEND(PeerInfo)
|
||||
BINARY_STREAM_FRIEND(PIPeer::PeerInfo);
|
||||
public:
|
||||
PeerInfo() {dist = sync = cnt = 0; trace = -1; was_update = false; _data = 0;}
|
||||
~PeerInfo() {}
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
|
||||
};
|
||||
|
||||
BINARY_STREAM_FRIEND(PIPeer::PeerInfo)
|
||||
BINARY_STREAM_FRIEND(PIPeer::PeerInfo);
|
||||
|
||||
bool send(const PIString & to, const PIByteArray & data) {return send(to, data.data(), data.size_s());}
|
||||
bool send(const PIString & to, const PIString & data) {return send(to, data.data(), data.size_s());}
|
||||
@@ -117,9 +117,9 @@ public:
|
||||
void setTcpServerIP(const PIString & ip) {server_ip = ip; tcpClientReconnect();}
|
||||
|
||||
|
||||
EVENT2(dataReceivedEvent, const PIString &, from, const PIByteArray &, data)
|
||||
EVENT1(peerConnectedEvent, const PIString &, name)
|
||||
EVENT1(peerDisconnectedEvent, const PIString &, name)
|
||||
EVENT2(dataReceivedEvent, const PIString &, from, const PIByteArray &, data);
|
||||
EVENT1(peerConnectedEvent, const PIString &, name);
|
||||
EVENT1(peerDisconnectedEvent, const PIString &, name);
|
||||
|
||||
// bool lockedEth() const {return eth_mutex.isLocked();}
|
||||
// bool lockedPeers() const {return peers_mutex.isLocked();}
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
//! \~russian Последовательный порт.
|
||||
class PIP_EXPORT PISerial: public PIIODevice
|
||||
{
|
||||
PIIODEVICE(PISerial, "ser")
|
||||
PIIODEVICE(PISerial, "ser");
|
||||
public:
|
||||
|
||||
//! \~english Contructs an empty %PISerial
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
//! \~russian Разделяемая память.
|
||||
class PIP_EXPORT PISharedMemory: public PIIODevice
|
||||
{
|
||||
PIIODEVICE(PISharedMemory, "shm")
|
||||
PIIODEVICE(PISharedMemory, "shm");
|
||||
public:
|
||||
|
||||
//! \~english Constructs empty %PISharedMemory
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
class PIP_EXPORT PISPI: public PIIODevice
|
||||
{
|
||||
PIIODEVICE(PISPI, "spi")
|
||||
PIIODEVICE(PISPI, "spi");
|
||||
public:
|
||||
explicit PISPI(const PIString & path = PIString(), uint speed_hz = 1000000, PIIODevice::DeviceMode mode = PIIODevice::ReadWrite);
|
||||
virtual ~PISPI();
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
//! \~russian PIIODevice который транслирует запись на чтение.
|
||||
class PIP_EXPORT PITransparentDevice: public PIIODevice
|
||||
{
|
||||
PIIODEVICE(PITransparentDevice, "tr")
|
||||
PIIODEVICE(PITransparentDevice, "tr");
|
||||
public:
|
||||
|
||||
//! \~english Contructs empty %PITransparentDevice
|
||||
|
||||
@@ -63,7 +63,7 @@ struct usb_dev_handle;
|
||||
|
||||
class PIP_EXPORT PIUSB: public PIIODevice
|
||||
{
|
||||
PIIODEVICE(PIUSB, "usb")
|
||||
PIIODEVICE(PIUSB, "usb");
|
||||
public:
|
||||
explicit PIUSB(ushort vid = 0, ushort pid = 0);
|
||||
virtual ~PIUSB();
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
class PIP_EXPORT PIBaseTransfer: public PIObject
|
||||
{
|
||||
PIOBJECT_SUBCLASS(PIBaseTransfer, PIObject)
|
||||
PIOBJECT_SUBCLASS(PIBaseTransfer, PIObject);
|
||||
public:
|
||||
PIBaseTransfer();
|
||||
~PIBaseTransfer();
|
||||
@@ -84,13 +84,13 @@ public:
|
||||
EVENT_HANDLER(void, pause) {setPause(true);}
|
||||
EVENT_HANDLER(void, resume) {setPause(false);}
|
||||
|
||||
EVENT(receiveStarted)
|
||||
EVENT(paused)
|
||||
EVENT(resumed)
|
||||
EVENT1(receiveFinished, bool, ok)
|
||||
EVENT(sendStarted)
|
||||
EVENT1(sendFinished, bool, ok)
|
||||
EVENT1(sendRequest, PIByteArray &, data)
|
||||
EVENT(receiveStarted);
|
||||
EVENT(paused);
|
||||
EVENT(resumed);
|
||||
EVENT1(receiveFinished, bool, ok);
|
||||
EVENT(sendStarted);
|
||||
EVENT1(sendFinished, bool, ok);
|
||||
EVENT1(sendRequest, PIByteArray &, data);
|
||||
|
||||
protected:
|
||||
void buildSession(PIVector<Part> parts);
|
||||
@@ -115,7 +115,7 @@ private:
|
||||
};
|
||||
# pragma pack(pop)
|
||||
|
||||
BINARY_STREAM_FRIEND(PIBaseTransfer::StartRequest)
|
||||
BINARY_STREAM_FRIEND(PIBaseTransfer::StartRequest);
|
||||
|
||||
void processData(int id, PIByteArray &data);
|
||||
PIByteArray build_packet(int id);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
class PIP_IO_UTILS_EXPORT PIBroadcast: public PIThread, public PIEthUtilBase {
|
||||
PIOBJECT_SUBCLASS(PIBroadcast, PIThread)
|
||||
PIOBJECT_SUBCLASS(PIBroadcast, PIThread);
|
||||
public:
|
||||
|
||||
//! %PIBroadcast channels, can be used independently
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
//! Send packet
|
||||
void send(const PIByteArray & data);
|
||||
|
||||
EVENT1(receiveEvent, PIByteArray, data)
|
||||
EVENT1(receiveEvent, PIByteArray, data);
|
||||
|
||||
//! \events
|
||||
//! \{
|
||||
|
||||
@@ -34,7 +34,7 @@ class PIConfig;
|
||||
|
||||
class PIP_EXPORT PIConnection: public PIObject
|
||||
{
|
||||
PIOBJECT_SUBCLASS(PIConnection, PIObject)
|
||||
PIOBJECT_SUBCLASS(PIConnection, PIObject);
|
||||
public:
|
||||
//! Constructs connection with name "name", or with default name = "connection"
|
||||
PIConnection(const PIString & name = PIStringAscii("connection"));
|
||||
@@ -279,7 +279,7 @@ public:
|
||||
static bool isFakeMode();
|
||||
|
||||
class PIP_EXPORT DevicePool: public PIThread {
|
||||
PIOBJECT_SUBCLASS(DevicePool, PIThread)
|
||||
PIOBJECT_SUBCLASS(DevicePool, PIThread);
|
||||
friend void __DevicePool_threadReadDP(void * ddp);
|
||||
friend class PIConnection;
|
||||
protected:
|
||||
@@ -317,9 +317,9 @@ public:
|
||||
bool fake;
|
||||
};
|
||||
|
||||
EVENT2(dataReceivedEvent, const PIString &, from, const PIByteArray &, data)
|
||||
EVENT2(packetReceivedEvent, const PIString &, from, const PIByteArray &, data)
|
||||
EVENT3(qualityChanged, const PIIODevice * , dev, PIDiagnostics::Quality, new_quality, PIDiagnostics::Quality, old_quality)
|
||||
EVENT2(dataReceivedEvent, const PIString &, from, const PIByteArray &, data);
|
||||
EVENT2(packetReceivedEvent, const PIString &, from, const PIByteArray &, data);
|
||||
EVENT3(qualityChanged, const PIIODevice * , dev, PIDiagnostics::Quality, new_quality, PIDiagnostics::Quality, old_quality);
|
||||
|
||||
//! \events
|
||||
//! \{
|
||||
@@ -377,7 +377,7 @@ private:
|
||||
};
|
||||
|
||||
class PIP_EXPORT Sender: public PITimer {
|
||||
PIOBJECT_SUBCLASS(Sender, PIObject)
|
||||
PIOBJECT_SUBCLASS(Sender, PIObject);
|
||||
public:
|
||||
Sender(PIConnection * parent_ = 0);
|
||||
~Sender() {stop();}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
class PIP_EXPORT PIDataTransfer: public PIBaseTransfer
|
||||
{
|
||||
PIOBJECT_SUBCLASS(PIDataTransfer, PIBaseTransfer)
|
||||
PIOBJECT_SUBCLASS(PIDataTransfer, PIBaseTransfer);
|
||||
public:
|
||||
PIDataTransfer() {;}
|
||||
~PIDataTransfer() {;}
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
|
||||
class PIP_EXPORT PIDiagnostics: public PITimer
|
||||
{
|
||||
PIOBJECT_SUBCLASS(PIDiagnostics, PITimer)
|
||||
PIOBJECT_SUBCLASS(PIDiagnostics, PITimer);
|
||||
friend class PIConnection;
|
||||
public:
|
||||
NO_COPY_CLASS(PIDiagnostics)
|
||||
NO_COPY_CLASS(PIDiagnostics);
|
||||
|
||||
//! Constructs an empty diagnostics and if "start_" start it
|
||||
PIDiagnostics(bool start_ = true);
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
EVENT_HANDLER2(void, received, int, size, bool, correct);
|
||||
EVENT_HANDLER1(void, sended, int, size);
|
||||
|
||||
EVENT2(qualityChanged, PIDiagnostics::Quality, new_quality, PIDiagnostics::Quality, old_quality)
|
||||
EVENT2(qualityChanged, PIDiagnostics::Quality, new_quality, PIDiagnostics::Quality, old_quality);
|
||||
|
||||
//! \handlers
|
||||
//! \{
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
class PIP_EXPORT PIFileTransfer: public PIBaseTransfer
|
||||
{
|
||||
PIOBJECT_SUBCLASS(PIFileTransfer, PIBaseTransfer)
|
||||
PIOBJECT_SUBCLASS(PIFileTransfer, PIBaseTransfer);
|
||||
public:
|
||||
PIFileTransfer();
|
||||
~PIFileTransfer();
|
||||
@@ -82,11 +82,11 @@ public:
|
||||
const llong * bytesFileAll_ptr() const {return &bytes_file_all;}
|
||||
const llong * bytesFileCur_ptr() const {return &bytes_file_cur;}
|
||||
|
||||
EVENT(receiveFilesStarted)
|
||||
EVENT1(receiveFilesFinished, bool, ok)
|
||||
EVENT(sendFilesStarted)
|
||||
EVENT1(sendFilesFinished, bool, ok)
|
||||
EVENT3(receiveFilesRequest, PIStringList, files, llong, total_bytes, bool *, ok)
|
||||
EVENT(receiveFilesStarted);
|
||||
EVENT1(receiveFilesFinished, bool, ok);
|
||||
EVENT(sendFilesStarted);
|
||||
EVENT1(sendFilesFinished, bool, ok);
|
||||
EVENT3(receiveFilesRequest, PIStringList, files, llong, total_bytes, bool *, ok);
|
||||
|
||||
private:
|
||||
static const char sign[];
|
||||
|
||||
@@ -33,7 +33,7 @@ typedef bool (*PacketExtractorCheckFunc)(void * , uchar * , uchar * , int );
|
||||
|
||||
class PIP_EXPORT PIPacketExtractor: public PIIODevice
|
||||
{
|
||||
PIIODEVICE(PIPacketExtractor, "pckext")
|
||||
PIIODEVICE(PIPacketExtractor, "pckext");
|
||||
friend class PIConnection;
|
||||
public:
|
||||
|
||||
@@ -127,7 +127,7 @@ public:
|
||||
//! Add data to extractor, raise \a packetReceived() if packet is ready
|
||||
void appendData(const PIByteArray & data) {appendData(data.data(), data.size_s());}
|
||||
|
||||
EVENT2(packetReceived, uchar * , data, int, size)
|
||||
EVENT2(packetReceived, uchar * , data, int, size);
|
||||
|
||||
//! \events
|
||||
//! \{
|
||||
|
||||
@@ -86,8 +86,8 @@ public:
|
||||
//! and \a sendRequest() event to \"dev\" \a PIIODevice::write() handler
|
||||
void assignDevice(PIIODevice * dev);
|
||||
|
||||
EVENT1(packetReceiveEvent, PIByteArray &, data)
|
||||
EVENT1(sendRequest, PIByteArray, data)
|
||||
EVENT1(packetReceiveEvent, PIByteArray &, data);
|
||||
EVENT1(sendRequest, PIByteArray, data);
|
||||
|
||||
//! \handlers
|
||||
//! \{
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace PIEvaluatorTypes {
|
||||
class PIP_EXPORT PIEvaluatorContent
|
||||
{
|
||||
friend class PIEvaluator;
|
||||
BINARY_STREAM_FRIEND(PIEvaluatorContent)
|
||||
BINARY_STREAM_FRIEND(PIEvaluatorContent);
|
||||
public:
|
||||
PIEvaluatorContent();
|
||||
~PIEvaluatorContent() {;}
|
||||
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
static PIPluginInfoStorage * instance();
|
||||
|
||||
private:
|
||||
NO_COPY_CLASS(PIPluginInfoStorage)
|
||||
NO_COPY_CLASS(PIPluginInfoStorage);
|
||||
|
||||
void * current;
|
||||
PIMap<void*, PIPluginInfo * > info;
|
||||
@@ -230,7 +230,7 @@ public:
|
||||
static PIStringList pluginsDirectories(const PIString & name);
|
||||
|
||||
private:
|
||||
NO_COPY_CLASS(PIPluginLoader)
|
||||
NO_COPY_CLASS(PIPluginLoader);
|
||||
|
||||
PIString findLibrary(const PIString & path);
|
||||
static PIString libExtension();
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
//! \~russian Внешний процесс.
|
||||
class PIP_EXPORT PIProcess: public PIThread
|
||||
{
|
||||
PIOBJECT_SUBCLASS(PIProcess, PIThread)
|
||||
PIOBJECT_SUBCLASS(PIProcess, PIThread);
|
||||
public:
|
||||
|
||||
//! \~english Construct empty %PIProcess
|
||||
@@ -133,8 +133,8 @@ public:
|
||||
EVENT_HANDLER(bool, waitForFinish) {return waitForFinish(60000);}
|
||||
EVENT_HANDLER1(bool, waitForFinish, int, timeout_msecs) {return PIThread::waitForFinish(timeout_msecs);}
|
||||
|
||||
EVENT1(execStarted, PIString, program)
|
||||
EVENT2(execFinished, PIString, program, int, exit_code)
|
||||
EVENT1(execStarted, PIString, program);
|
||||
EVENT2(execFinished, PIString, program, int, exit_code);
|
||||
|
||||
|
||||
//! \~english Start detached execution "program" without arguments
|
||||
|
||||
@@ -35,7 +35,7 @@ class PISharedMemory;
|
||||
//! \~english Single-instance application control.
|
||||
//! \~russian Контроль одного экземпляра приложения.
|
||||
class PIP_EXPORT PISingleApplication: public PIThread {
|
||||
PIOBJECT_SUBCLASS(PISingleApplication, PIThread)
|
||||
PIOBJECT_SUBCLASS(PISingleApplication, PIThread);
|
||||
public:
|
||||
|
||||
//! \~english Construct %PISingleApplication with name "app_name"
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
bool isFirst() const;
|
||||
|
||||
EVENT_HANDLER1(void, sendMessage, const PIByteArray &, m);
|
||||
EVENT1(messageReceived, PIByteArray, m)
|
||||
EVENT1(messageReceived, PIByteArray, m);
|
||||
|
||||
//! \handlers
|
||||
//! \{
|
||||
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
|
||||
private:
|
||||
PISystemInfo() {}
|
||||
NO_COPY_CLASS(PISystemInfo)
|
||||
NO_COPY_CLASS(PISystemInfo);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
//! \~english Process monitoring.
|
||||
//! \~russian Мониторинг процесса.
|
||||
class PIP_EXPORT PISystemMonitor: public PIThread {
|
||||
PIOBJECT_SUBCLASS(PISystemMonitor, PIThread)
|
||||
PIOBJECT_SUBCLASS(PISystemMonitor, PIThread);
|
||||
friend class PIIntrospectionServer;
|
||||
public:
|
||||
//! \~english Constructs unassigned %PISystemMonitor
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
*/
|
||||
class PIP_EXPORT PIConditionVariable {
|
||||
public:
|
||||
NO_COPY_CLASS(PIConditionVariable)
|
||||
NO_COPY_CLASS(PIConditionVariable);
|
||||
explicit PIConditionVariable();
|
||||
virtual ~PIConditionVariable();
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
template<typename T = PIByteArray>
|
||||
class PIGrabberBase: public PIThread
|
||||
{
|
||||
PIOBJECT_SUBCLASS(PIGrabberBase, PIThread)
|
||||
PIOBJECT_SUBCLASS(PIGrabberBase, PIThread);
|
||||
public:
|
||||
PIGrabberBase() {
|
||||
is_opened = false;
|
||||
@@ -130,9 +130,9 @@ public:
|
||||
close();
|
||||
}
|
||||
|
||||
EVENT(dataReady)
|
||||
EVENT(opened)
|
||||
EVENT(closed)
|
||||
EVENT(dataReady);
|
||||
EVENT(opened);
|
||||
EVENT(closed);
|
||||
|
||||
protected:
|
||||
virtual void init() {}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
class PIP_EXPORT PIMutex
|
||||
{
|
||||
public:
|
||||
NO_COPY_CLASS(PIMutex)
|
||||
NO_COPY_CLASS(PIMutex);
|
||||
|
||||
//! \~english Constructs unlocked mutex
|
||||
//! \~russian Создает незаблокированный мьютекс
|
||||
@@ -69,7 +69,7 @@ private:
|
||||
class PIP_EXPORT PIMutexLocker
|
||||
{
|
||||
public:
|
||||
NO_COPY_CLASS(PIMutexLocker)
|
||||
NO_COPY_CLASS(PIMutexLocker);
|
||||
|
||||
//! \~english Constructs and lock "m" if "condition" is \c true
|
||||
//! \~russian Создает и блокирует мьютекс "m" если "condition" \c true
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
template <typename Tin, typename Tout>
|
||||
class PIPipelineThread : public PIThread
|
||||
{
|
||||
PIOBJECT_SUBCLASS(PIPipelineThread, PIThread)
|
||||
PIOBJECT_SUBCLASS(PIPipelineThread, PIThread);
|
||||
public:
|
||||
PIPipelineThread() {
|
||||
cnt = 0;
|
||||
@@ -51,9 +51,9 @@ public:
|
||||
}
|
||||
template <typename T>
|
||||
void connectTo(PIPipelineThread<Tout, T> * next) {
|
||||
CONNECT3(void, Tout, bool, bool *, this, calculated, next, enqueue)
|
||||
CONNECT3(void, Tout, bool, bool *, this, calculated, next, enqueue);
|
||||
}
|
||||
EVENT3(calculated, const Tout &, v, bool, wait, bool *, overload)
|
||||
EVENT3(calculated, const Tout &, v, bool, wait, bool *, overload);
|
||||
EVENT_HANDLER3(void, enqueue, const Tin &, v, bool, wait, bool *, overload) {
|
||||
mutex.lock();
|
||||
//piCoutObj << "enque" << overload;
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
class PIP_EXPORT PISpinlock
|
||||
{
|
||||
public:
|
||||
NO_COPY_CLASS(PISpinlock)
|
||||
NO_COPY_CLASS(PISpinlock);
|
||||
|
||||
//! \~english Constructs unlocked spinlock
|
||||
//! \~russian Создает незаблокированный спинлок
|
||||
@@ -73,7 +73,7 @@ private:
|
||||
class PIP_EXPORT PISpinlockLocker
|
||||
{
|
||||
public:
|
||||
NO_COPY_CLASS(PISpinlockLocker)
|
||||
NO_COPY_CLASS(PISpinlockLocker);
|
||||
|
||||
//! \~english Constructs and lock "s" if "condition" is \c true
|
||||
//! \~russianСоздает и блокирует спинлок "m" если "condition" \c true
|
||||
|
||||
@@ -68,12 +68,12 @@ typedef std::function<void(void *)> ThreadFunc;
|
||||
|
||||
class PIP_EXPORT PIThread: public PIObject
|
||||
{
|
||||
PIOBJECT_SUBCLASS(PIThread, PIObject)
|
||||
PIOBJECT_SUBCLASS(PIThread, PIObject);
|
||||
#ifndef MICRO_PIP
|
||||
friend class PIIntrospectionThreads;
|
||||
#endif
|
||||
public:
|
||||
NO_COPY_CLASS(PIThread)
|
||||
NO_COPY_CLASS(PIThread);
|
||||
|
||||
//! \~english Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay"
|
||||
//! \~russian Создает поток с данными "data", функцией "func" и задержкой цикла "loop_delay"
|
||||
@@ -166,8 +166,8 @@ public:
|
||||
void __thread_func__();
|
||||
void __thread_func_once__();
|
||||
|
||||
EVENT(started)
|
||||
EVENT(stopped)
|
||||
EVENT(started);
|
||||
EVENT(stopped);
|
||||
|
||||
//! \~english Call event handler "handler" of object "object" in separate thread
|
||||
//! \~russian Вызывает обработчик "handler" объекта "object" в отдельном потоке
|
||||
|
||||
@@ -74,9 +74,9 @@ protected:
|
||||
|
||||
|
||||
class PIP_EXPORT PITimer: public PIObject {
|
||||
PIOBJECT_SUBCLASS(PITimer, PIObject)
|
||||
PIOBJECT_SUBCLASS(PITimer, PIObject);
|
||||
public:
|
||||
NO_COPY_CLASS(PITimer)
|
||||
NO_COPY_CLASS(PITimer);
|
||||
|
||||
//! \~english Constructs timer with PITimer::Thread implementation
|
||||
//! \~russian Создает таймер с реализацией PITimer::Thread
|
||||
@@ -215,7 +215,7 @@ public:
|
||||
|
||||
EVENT_HANDLER0(void, clearDelimiters) {delims.clear();}
|
||||
|
||||
EVENT2(tickEvent, void * , data_, int, delimiter)
|
||||
EVENT2(tickEvent, void * , data_, int, delimiter);
|
||||
|
||||
//! \handlers
|
||||
//! \{
|
||||
|
||||
Reference in New Issue
Block a user