git-svn-id: svn://db.shs.com.ru/pip@496 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-05-07 09:36:13 +00:00
parent b9c609ecad
commit e33406b283
10 changed files with 56 additions and 40 deletions

View File

@@ -1,25 +1,11 @@
#include "pip.h"
class A: public PIObject {
PIOBJECT(A)
public:
EVENT1(ev1, float, f)
};
class B: public PIObject {
PIOBJECT(B)
public:
EVENT_HANDLER0(void, eh0) {piCout << "eh0";}
EVENT_HANDLER1(void, eh1, float, f) {piCout << "eh1_1" << f;}
EVENT_HANDLER2(void, eh1, float, f, int, s) {piCout << "eh1_2" << f << s;}
};
#include "main.h"
#include <stdio.h>
int main(int argc, char *argv[]) {
A a;
B b;
a.setName("__a__");
b.setName("__b__");
/*CONNECTU_QUEUED(&a, ev1, &b, eh0, &b);
CONNECTU_QUEUED(&a, ev1, &b, eh1, &a);
piCout << "start";
@@ -29,9 +15,12 @@ int main(int argc, char *argv[]) {
piSleep(1);
piCout << b.maybeCallQueuedEvents();*/
//piCout << "end";
b.executeQueued(&a, "eh1", PIVariant(0.1), "0150", 10, 40);
/*b.executeQueued(&a, "eh1", PIVariant(0.1), "0150", 10, 40);
piSleep(1);
a.maybeCallQueuedEvents();
a.maybeCallQueuedEvents();*/
//dumpApplication();
b.execute("eh1", PIVariant(0.1), "0150", 10, 40);
b.executeQueued(&a, "eh1", PIVariant(0.1), "0150", 10, 40);
a.callQueuedEvents();
return 0;
}