diff -r 87de63b19e4c -r 04fdb4abf120 tool/SoeCommand.cpp --- a/tool/SoeCommand.cpp Tue Dec 14 21:58:53 2010 +0100 +++ b/tool/SoeCommand.cpp Mon Dec 20 17:52:37 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)