#include <iostream>
int main()
{
std::string param_name;
int32_t ret_value;
double param_value;
ret_value = pkt.
LoadFile(
"my_file.xml" );
if( ret_value )
{
cout << "Could not open file\n";
return 1;
}
if( ret_value )
{
cout << "Could not find parameter\n";
return 1;
}
param_value = -2;
ret_value = param_ptr->
SetValue( param_value );
if( ret_value )
{
cout << "Could not set the value\n";
return 1;
}
param_ptr->
SetValue( (uint32_t)1024, 1 );
param_ptr->
SetValue( (uint32_t)2048, 2 );
param_ptr->
SetValue( (uint32_t)4096, 3 );
param_value = 1.2345;
uint8_t buf[1000];
uint32_t buf_size;
buf_size = 1000;
ret_value = pkt.
Build( buf, &buf_size );
if( ret_value )
{
cout << "Build failed for the packet\n";
return 1;
}
return 0;
}