eRPC Generator (erpcgen)
Rev. 1.12.0
NXP Semiconductors
|
Class that encapsulates the erpcgen tool. More...
Public Member Functions | |
erpcgenTool (int argc, char *argv[]) | |
Constructor. More... | |
~erpcgenTool () | |
Destructor. | |
int | processOptions () |
Reads the command line options passed into the constructor. More... | |
void | printUsage (const Options &options) |
Prints help for the tool. More... | |
int | run () |
Core of the tool. More... | |
void | checkArguments () |
Validate arguments that can be checked. More... | |
void | setVerboseLogging () |
Turns on verbose logging. | |
Protected Types | |
enum | verbose_type_t { kWarning, kInfo, kDebug, kExtraDebug } |
enum | languages_t { kCLanguage, kPythonLanguage, kJavaLanguage } |
typedef vector< string > | string_vector_t |
Protected Attributes | |
int | m_argc |
char ** | m_argv |
StdoutLogger * | m_logger |
verbose_type_t | m_verboseType |
const char * | m_outputFilePath |
const char * | m_ErpcFile |
string_vector_t | m_positionalArgs |
languages_t | m_outputLanguage |
InterfaceDefinition::codec_t | m_codec |
string | m_javaPackageName |
Class that encapsulates the erpcgen tool.
A single global logger instance is created during object construction. It is never freed because we need it up to the last possible minute, when an exception could be thrown.
|
protected |
Vector of positional arguments.
|
inline |
Constructor.
[in] | argc | Count of arguments in argv variable. |
[in] | argv | Pointer to array of arguments. |
Creates the singleton logger instance.
|
inline |
Validate arguments that can be checked.
runtime_error | Thrown if an argument value fails to pass validation. |
|
inline |
Prints help for the tool.
[in] | options | Options, which can be used. |
|
inline |
Reads the command line options passed into the constructor.
This method can return a return code to its caller, which will cause the tool to exit immediately with that return code value. Normally, though, it will return -1 to signal that the tool should continue to execute and all options were processed successfully.
The Options class is used to parse command line options. See #k_optionsDefinition for the list of options and #k_usageText for the descriptive help for each option.
-1 | The options were processed successfully. Let the tool run normally. |
|
inline |
Core of the tool.
Calls processOptions() to handle command line options before performing the real work the tool does.
1 | The functions wasn't processed successfully. |
0 | The function was processed successfully. |
Log::error | This function is called, when function wasn't processed successfully. |
runtime_error | Thrown, when positional args is empty. |
|
protected |
Number of command line arguments.
|
protected |
String value for each command line argument.
|
protected |
Used codec type.
|
protected |
ERPC file.
|
protected |
Used java package.
|
protected |
Singleton logger instance.
|
protected |
Path to the output file.
|
protected |
Output language we're generating.
|
protected |
Positional arguments.
|
protected |
Which type of log is need to set (warning, info, debug).