This repository has been archived on 2020-09-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
libs/cd_utils/cdutilstest.cpp

44 lines
961 B
C++

#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));
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;
}