79 #define DLT_TEST_NUM_CONTEXT 7 83 int testall(
int count,
int repeat,
int delay,
int size);
107 printf(
"Usage: dlt-test-stress-user [options]\n");
108 printf(
"Test user application providing Test messages.\n");
109 printf(
"%s \n", version);
110 printf(
"Options:\n");
111 printf(
" -v Verbose mode\n");
112 printf(
" -f filename Use local log file instead of sending to daemon\n");
113 printf(
" -n count Number of messages to be sent per test (Default: 10000)\n");
114 printf(
" -r repeat How often test is repeated (Default: 100)\n");
115 printf(
" -d delay Delay between sent messages in uSec (Default: 1000)\n");
116 printf(
" -s size Size of extra message data in bytes (Default: 100)\n");
122 int main(
int argc,
char* argv[])
135 while ((c = getopt (argc, argv,
"vf:n:r:d:s:")) != -1)
151 nvalue = atoi(optarg);
156 rvalue = atoi(optarg);
161 dvalue = atoi(optarg);
166 svalue = atoi(optarg);
171 if (optopt ==
'd' || optopt ==
'f' || optopt ==
'n' || optopt ==
'r' || optopt ==
'd' || optopt ==
's')
173 fprintf (stderr,
"Option -%c requires an argument.\n", optopt);
175 else if (isprint (optopt))
177 fprintf (stderr,
"Unknown option `-%c'.\n", optopt);
181 fprintf (stderr,
"Unknown option character `\\x%x'.\n",optopt);
211 printf(
"Tests starting\n");
217 testall(nvalue,rvalue,dvalue,svalue);
220 printf(
"Tests finished\n");
239 int testall(
int count,
int repeat,
int delay,
int size)
244 for(num=0;num< size;num++)
253 for(rnum=0;rnum<repeat;rnum++)
255 for(num=1;num<=count;num++)
#define DLT_RAW(BUF, LEN)
#define DLT_UNREGISTER_APP()
DltReturnValue dlt_init_file(const char *name)
#define DLT_TEST_NUM_CONTEXT
#define DLT_REGISTER_APP(APPID, DESCRIPTION)
unsigned char buffer[BUFFER_SIZE]
Buffer for dlt file transfer. The size is defined by BUFFER_SIZE.
#define DLT_REGISTER_CONTEXT(CONTEXT, CONTEXTID, DESCRIPTION)
DLT_DECLARE_CONTEXT(context_info)
int testall(int count, int repeat, int delay, int size)
#define DLT_UNREGISTER_CONTEXT(CONTEXT)
#define DLT_LOG(CONTEXT, LOGLEVEL, ARGS...)
int main(int argc, char *argv[])
void dlt_get_version(char *buf, size_t size)