// SPDX-License-Identifier: BSD-3-Clause #ifndef INVERTER_TOOLS_PROTOCOL_COMMON_COMMANDS_H #define INVERTER_TOOLS_PROTOCOL_COMMON_COMMANDS_H #include #include #define GET_ARGS(__len__) protocol::get_args((protocol::CommandInput*)input, arguments, (__len__)) namespace protocol { #ifdef INVERTERCTL struct CommandInput { int argc; char **argv; }; #endif #ifdef INVERTERD struct CommandInput { std::vector* argv; }; #endif void get_args(CommandInput* input, std::vector& arguments, size_t count); void validate_date_args(const std::string* ys, const std::string* ms, const std::string* ds); void validate_time_args(const std::string* hs, const std::string* ms, const std::string* ss); } #endif //INVERTER_TOOLS_PROTOCOL_COMMON_COMMANDS_H