git-svn-id: svn://db.shs.com.ru/libs@98 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2016-07-13 13:40:33 +00:00
parent f14a58cf19
commit f30c749428
10 changed files with 346 additions and 36 deletions

View File

@@ -1,12 +1,42 @@
#include "cdutils_core.h"
#include "cdutils_k.h"
#include "piethernet.h"
#include "piiostring.h"
int main(int argc, char *argv[]) {
PIEthernet eth;
eth.send("127.0.0.1:16102", PIByteArray("data\n", 5));
eth.send("127.0.0.1:26102", PIByteArray("data\n", 5));
eth.send("127.0.0.1:36102", PIByteArray("data\n", 5));
piMSleep(1000);
PIString s = "[k]\n\
1.f = 120+3 #s comment\n\
1.v = 123\n\
2.f = 2 #s comm\n\
2.v = 1\n\
4.f = -6/10 #s mment\n\
4.v = -0.6\n\
[s.10.k]\n\
5.f = 2*2*2\n\
5.v = 8 #s 88\n\
[s.10.s.50.k]\n\
100.f = 2*2*2\n\
100.v = 8 #s 88\n\
[s.11.k]\n\
3.f = 1\n\
3.v = 1 #s 88 \n\
4.f = 0\n\
4.v = 0 #s 88 \n\
6.f = 0\n\
6.v = 0 #s 881 \n\
[]\n\
";
PIIOString ios(&s);
CDUtils::K.read(&ios);
s.clear();
PIIOString iosw(&s);
CDUtils::K.write(&iosw);
piCout << s;
//piMSleep(1000);
//CDUtils::Core::instance()->test();
return 0;
}