31 lines
628 B
C++
31 lines
628 B
C++
#include <print>
|
|
|
|
#include <adclib/adclib_netmsg.h>
|
|
|
|
int main()
|
|
{
|
|
adc::AdcNetworkMessage msg;
|
|
|
|
std::println("is ACK: {}", msg.isACK());
|
|
|
|
msg.createSET("ATTR1", snplib::snplib_serialization_params_t{}, 10, std::vector<char>{'V', 'A', 'L'});
|
|
|
|
std::println("KEY: <{}>", msg.key());
|
|
|
|
std::println("VALUE: <{}>", msg.value());
|
|
|
|
std::println("is SET: {}", msg.isSET());
|
|
|
|
std::println("is VALID: {}", msg.isValid());
|
|
|
|
|
|
std::string str{"SET ATTRQ 32.235 dwejh kd2jl"};
|
|
|
|
msg.fromCharRange(str);
|
|
|
|
std::println("KEY: <{}>", msg.key());
|
|
|
|
std::println("VALUE: <{}>", msg.value());
|
|
|
|
return 0;
|
|
} |