SIMULINK_A7DAC  1.0
Control of A7_DAC device
Functions
parse_cmd.cpp File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "parse_cmd.h"

Go to the source code of this file.

Functions

int GetFromCommnadLine (int argc, BRDCHAR **argv, const BRDCHAR *name, int defValue)
 Get integer value from command line. More...
 
int GetStrFromCommnadLine (int argc, BRDCHAR **argv, const BRDCHAR *name, BRDCHAR *defValue, BRDCHAR *dst, int dstLen)
 Get string value from command line. More...
 

Function Documentation

◆ GetFromCommnadLine()

int GetFromCommnadLine ( int  argc,
BRDCHAR **  argv,
const BRDCHAR *  name,
int  defValue 
)

Get integer value from command line.

format command line: <name1> <value1> <name2> <value2>

Parameters
argcnumber of argument
argvpointers to arguments
namekey of argument
defValuedefault value for arguments
Returns
value of argument or default value of argument

Definition at line 29 of file parse_cmd.cpp.

Referenced by TF_SimulinkA7Dac::TF_SimulinkA7Dac().

◆ GetStrFromCommnadLine()

int GetStrFromCommnadLine ( int  argc,
BRDCHAR **  argv,
const BRDCHAR *  name,
BRDCHAR *  defValue,
BRDCHAR *  dst,
int  dstLen 
)

Get string value from command line.

format command line: <name1> <text1> <name2> <text2>

Parameters
argcnumber of argument
argvpointers to arguments
namekey of argument
defValuedefault value for arguments
dstpointer to destination string, NULL - do not copy
dstLenmax number of chars in the dst
Returns
0 - name not found, 1 - found only name, 2 - found name and text

Definition at line 58 of file parse_cmd.cpp.