Header
Product Comparison: USB I2C | USB SPI | USB GPIO
  • My Account
  • Shopping Cart
  • Products
  • My Account
  • About
  • Products
  • PC-I2C/SPI/GPIO Adapters
  • Main Page
  • Classes
  • Files
  • File List
  • File Members

encoder_usage.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2007 by Diolan                                          *
00003  *   www.diolan.com                                                        *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00021 #include "osdep/osdep.h"
00022 
00023 #include <string>
00024 #include "encoder_usage.h"
00025 
00026 using namespace std;
00027 
00028 EncoderUsage::EncoderUsage()
00029 {
00030  add(UsageDescriptor(
00031   ARG_HELP,
00032   "h",
00033   "help",
00034   UsageDescriptor::possible,
00035   "DEVICE",
00036   "Print this message.",
00037   UsageDescriptor::command
00038   ));
00039 
00040 
00041  add(UsageDescriptor(
00042   ARG_CMD_ENCODE,
00043   "e",
00044   "encode",
00045   UsageDescriptor::required,
00046   "PASSWORD",
00047   string("Encode the input file with PASSWORD and save it to output file.")
00048   + string("\n\tPASSWORD has to be provided as string of two hex digits per byte (like 01202040ac)."),
00049   UsageDescriptor::command
00050   ));
00051 
00052  add(UsageDescriptor(
00053   ARG_CMD_DECODE,
00054   "d",
00055   "decode",
00056   UsageDescriptor::required,
00057   "PASSWORD",
00058   string("Decode the input file with PASSWORD and save it to output file.")
00059   + string("\n\tPASSWORD has to be provided as string of two hex digits per byte (like 01202040ac)."),
00060   UsageDescriptor::command
00061   ));
00062  add(UsageDescriptor(
00063   ARG_CMD_CONVERT,
00064   "c",
00065   "convert",
00066   UsageDescriptor::absent,
00067   "",
00068   "Convert the file from one format to enother.",
00069   UsageDescriptor::command
00070   ));
00071 
00072 
00073  add(UsageDescriptor(
00074   ARG_INPUT_HEX,
00075   "ix",
00076   "input_hex",
00077   UsageDescriptor::required,
00078   "FILE_NAME",
00079   "Input file in Intel Hex Format.",
00080   UsageDescriptor::option
00081   ));
00082 
00083  add(UsageDescriptor(
00084   ARG_INPUT_BIN,
00085   "ib",
00086   "input_bin",
00087   UsageDescriptor::required,
00088   "FILE_NAME",
00089   "Input file in Binary Format.",
00090   UsageDescriptor::option
00091   ));
00092 
00093  add(UsageDescriptor(
00094   ARG_INPUT_DATA,
00095   "id",
00096   "input_data",
00097   UsageDescriptor::required,
00098   "DATA",
00099   string("Immediate mode - actual byte(s) specified in the command line")
00100   + string("\n\tas string of two hex digits per byte (like 01202040ac)."),
00101   UsageDescriptor::option
00102   ));
00103 
00104  add(UsageDescriptor(
00105   ARG_OUTPUT_HEX,
00106   "ox",
00107   "output_hex",
00108   UsageDescriptor::required,
00109   "FILE_NAME",
00110   "Output file in Intel Hex Format.",
00111   UsageDescriptor::option
00112   ));
00113 
00114  add(UsageDescriptor(
00115   ARG_OUTPUT_BIN,
00116   "ob",
00117   "output_bin",
00118   UsageDescriptor::required,
00119   "FILE_NAME",
00120   "Output file in Binary Format.",
00121   UsageDescriptor::option
00122   ));
00123 
00124 }
  • Products
  • PC-I2C/SPI/GPIO Adapters
  • Comparison
  • PC-I2C/SPI/GPIO Adapter DLN-1
  • USB-I2C/SPI/GPIO Adapter DLN-2
  • Multiprotocol Master DLN-4M
  • Multiprotocol Slave DLN-4S
  • Downloads
  • Software
  • Documentation
  • SW Tools & Examples
  • Development Boards
  • Open Source Projects
  • Discontinued Products
  • API Documentation
  • Downloads
  • SW Tools and Examples
footer top footer bottom
© Copyright Diolan 2006-2012