nekoray_Mahdi-zarei/3rdparty/simple-protobuf/example/etl.cpp
parhelia512 daa6c93900
refactor: migrate from protobuf to simple-protobuf (#520)
* refactor: migrate from protobuf to simple-protobuf

* update go.mod

* fix server

* Update gRPC.cpp

* Update gRPC.cpp
2025-07-12 15:17:05 -07:00

22 lines
626 B
C++

#include "spb/pb.hpp"
#include <etl.pb.h>
#include <iostream>
auto create_command( uint8_t arg ) -> ETL::Example::Command
{
return {
.command_id = uint8_t( ETL::Example::Command::CMD::CMD_READ ),
.arg = arg,
.in_flag = 1,
.out_flag = 0,
};
}
auto main( int, char *[] ) -> int
{
std::cout << "sizeof(Command): " << sizeof( ETL::Example::Command ) << std::endl;
std::cout << "sizeof(DeviceStatus): " << sizeof( ETL::Example::DeviceStatus ) << std::endl;
std::cout << "sizeof(CommandQueue): " << sizeof( ETL::Example::CommandQueue ) << std::endl;
return 0;
}