30 lines
639 B
C++
30 lines
639 B
C++
#include "pip.h"
|
|
|
|
class Base: public PIObject {
|
|
PIOBJECT(Base)
|
|
public:
|
|
EVENT_HANDLER(void, tick) {piCout << "tick";}
|
|
};
|
|
|
|
int main() {
|
|
Base b;
|
|
PIConnection c;
|
|
c.configureFromConfig("d:/orders/nicirt/bin/spec_core.conf", "core");
|
|
//CONNECTU(&t, tickEvent, &b, tick);
|
|
piCout << "start ...";
|
|
c.start();
|
|
//t.start(500);
|
|
piSleep(3);
|
|
//t.stop();
|
|
//delete t;
|
|
c.stop();
|
|
piCout << "deleted";
|
|
|
|
/*PIEthernet * eth = PIIODevice::createFromFullPath("eth://UDP:::192.168.0.33:16666")->cast<PIEthernet>();
|
|
for (;;) {
|
|
eth->send(PIByteArray::fromHex("00112233445566778899"));
|
|
piSleep(1.5);
|
|
}*/
|
|
return 0;
|
|
}
|