--- a/tool/SoeCommand.cpp Fri Nov 26 11:23:19 2010 +0100
+++ b/tool/SoeCommand.cpp Sat Nov 27 17:02:54 2010 +0100
@@ -36,13 +36,6 @@
/*****************************************************************************/
-SoeCommand::SoeCommand(const string &name, const string &briefDesc):
- Command(name, briefDesc)
-{
-}
-
-/*****************************************************************************/
-
uint16_t SoeCommand::parseIdn(const string &str)
{
uint16_t idn = 0x0000;
@@ -109,6 +102,19 @@
/*****************************************************************************/
+string SoeCommand::outputIdn(uint16_t idn)
+{
+ stringstream str;
+
+ str << ((idn & 0x8000) ? 'P' : 'S')
+ << "-" << ((idn >> 12) & 0x07)
+ << "-" << setfill('0') << setw(4) << (idn & 0x0fff);
+
+ return str.str();
+}
+
+/*****************************************************************************/
+
/** Outputs an SoE error code.
*/
std::string SoeCommand::errorMsg(uint16_t code)