52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
#include "cdutils_k.h"
|
|
#include "cdutils_core.h"
|
|
#include "piethernet.h"
|
|
#include "piiostring.h"
|
|
#include "pifile.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;*/
|
|
PIFile f;
|
|
f.open("SH_base.h", PIIODevice::ReadOnly);
|
|
CDUtils::K.parse(&f);
|
|
PIIOString iosw(&s);
|
|
PIFile wf("1.txt", PIIODevice::ReadWrite);
|
|
CDUtils::K.write(&wf);
|
|
piCout << s;
|
|
//piMSleep(1000);
|
|
//CDUtils::Core::instance()->test();
|
|
return 0;
|
|
}
|
|
|