ebusctl: interactive mode added.
This commit is contained in:
@@ -36,14 +36,14 @@ void define_args()
|
||||
{
|
||||
A.setVersion("ebusfeed is part of """PACKAGE_STRING"");
|
||||
|
||||
A.addText(" 'ebusfeed' sends a raw dump file to a local serial device (pts)\n\n"
|
||||
A.addText(" 'ebusfeed' sends a dump file to a local serial device (pts)\n\n"
|
||||
" Usage: 1. 'socat -d -d pty,raw,echo=0 pty,raw,echo=0'\n"
|
||||
" 2. create symbol links to appropriate devices\n"
|
||||
" for example: 'ln -s /dev/pts/2 /dev/ttyUSB60'\n"
|
||||
" 'ln -s /dev/pts/3 /dev/ttyUSB20'\n"
|
||||
" 3. start ebusd: 'ebusd -f -d /dev/ttyUSB20'\n"
|
||||
" 4. start ebusfeed: 'ebusfeed /path/to/raw_file'\n\n"
|
||||
"Command: '/path/to/raw_file'\n\n"
|
||||
" 4. start ebusfeed: 'ebusfeed /path/to/ebus_dump.bin'\n\n"
|
||||
"Command: '/path/to/ebus_dump.bin'\n\n"
|
||||
"Options:\n");
|
||||
|
||||
A.addOption("device", "d", OptVal("/dev/ttyUSB60"), dt_string, ot_mandatory,
|
||||
@@ -62,6 +62,11 @@ int main(int argc, char* argv[])
|
||||
// parse arguments
|
||||
A.parseArgs(argc, argv);
|
||||
|
||||
if (A.missingCommand() == true) {
|
||||
cout << "ebus dump file is required." << endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
string dev(A.getOptVal<const char*>("device"));
|
||||
Port port(dev, true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user