cdev-1.7.2n
This commit is contained in:
24
test/cdevDataTest2.cc
Executable file
24
test/cdevDataTest2.cc
Executable file
@@ -0,0 +1,24 @@
|
||||
#include <cdevData.h>
|
||||
#include "equal.h"
|
||||
|
||||
char * str[3] =
|
||||
{
|
||||
"This is the first string",
|
||||
"This is the seconds string",
|
||||
"This is the third string"
|
||||
};
|
||||
|
||||
void main ()
|
||||
{
|
||||
char * binary;
|
||||
size_t binaryLen;
|
||||
|
||||
cdevData data, data2;
|
||||
data.insert("value", str, 1);
|
||||
data.insert("status", str[0]);
|
||||
data.insert("severity", str[1]);
|
||||
data.asciiDump();
|
||||
data.xdrExport(&binary, &binaryLen);
|
||||
data2.xdrImport(binary, binaryLen);
|
||||
data2.asciiDump();
|
||||
}
|
||||
Reference in New Issue
Block a user