Added 'ethercat version' command.

This commit is contained in:
Florian Pose
2008-07-28 14:06:03 +00:00
parent f82214e66e
commit 98beafca60
5 changed files with 82 additions and 8 deletions
+39
View File
@@ -0,0 +1,39 @@
/*****************************************************************************
*
* $Id$
*
****************************************************************************/
#include <iostream>
using namespace std;
#include "CommandVersion.h"
/*****************************************************************************/
CommandVersion::CommandVersion():
Command("version", "Show version information.")
{
}
/****************************************************************************/
string CommandVersion::helpString() const
{
stringstream str;
str << getName() << " [OPTIONS]" << endl
<< endl
<< getBriefDescription() << endl;
return str.str();
}
/****************************************************************************/
void CommandVersion::execute(MasterDevice &m, const StringVector &args)
{
cout << "IgH EtherCAT master " << EC_MASTER_VERSION << endl;
}
/*****************************************************************************/