fp@1165: /***************************************************************************** fp@1165: * fp@1363: * $Id$ fp@1363: * fp@1363: * Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH fp@1363: * fp@1363: * This file is part of the IgH EtherCAT Master. fp@1363: * fp@1363: * The IgH EtherCAT Master is free software; you can redistribute it and/or fp@1363: * modify it under the terms of the GNU General Public License version 2, as fp@1363: * published by the Free Software Foundation. fp@1363: * fp@1363: * The IgH EtherCAT Master is distributed in the hope that it will be useful, fp@1363: * but WITHOUT ANY WARRANTY; without even the implied warranty of fp@1363: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General fp@1363: * Public License for more details. fp@1363: * fp@1363: * You should have received a copy of the GNU General Public License along fp@1363: * with the IgH EtherCAT Master; if not, write to the Free Software fp@1363: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA fp@1363: * fp@1363: * --- fp@1363: * fp@1363: * The license mentioned above concerns the source code only. Using the fp@1363: * EtherCAT technology and brand is only permitted in compliance with the fp@1363: * industrial property and similar rights of Beckhoff Automation GmbH. fp@1165: * fp@1165: ****************************************************************************/ fp@1165: fp@1165: #include fp@1165: using namespace std; fp@1165: fp@1165: #include "CommandVersion.h" fp@1165: fp@1165: /*****************************************************************************/ fp@1165: fp@1165: CommandVersion::CommandVersion(): fp@1165: Command("version", "Show version information.") fp@1165: { fp@1165: } fp@1165: fp@1165: /****************************************************************************/ fp@1165: fp@1968: string CommandVersion::helpString(const string &binaryBaseName) const fp@1165: { fp@1165: stringstream str; fp@1165: fp@1968: str << binaryBaseName << " " << getName() << " [OPTIONS]" << endl fp@1804: << endl fp@1804: << getBriefDescription() << endl; fp@1165: fp@1804: return str.str(); fp@1165: } fp@1165: fp@1165: /****************************************************************************/ fp@1165: fp@1826: void CommandVersion::execute(const StringVector &args) fp@1165: { fp@1373: if (args.size()) { fp@1373: stringstream err; fp@1373: err << "'" << getName() << "' takes no arguments!"; fp@1373: throwInvalidUsageException(err); fp@1373: } fp@1373: fp@1165: cout << "IgH EtherCAT master " << EC_MASTER_VERSION << endl; fp@1165: } fp@1165: fp@1165: /*****************************************************************************/