summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRALOVICH, Kristof <tade60@freemail.hu>2014-01-19 15:41:28 +0100
committerRALOVICH, Kristof <tade60@freemail.hu>2014-01-19 15:41:28 +0100
commite9b94340499d62850ead0cc5a67ecd7617077764 (patch)
tree93e3d5e288d2a703e84739c5a8c081c270a267fd /src
parent158434b0483c743ce58a2f7b15761f4879f4bd6d (diff)
move method from header to .cpp
Diffstat (limited to 'src')
-rw-r--r--src/AntMessage.cpp11
-rw-r--r--src/AntMessage.hpp9
2 files changed, 12 insertions, 8 deletions
diff --git a/src/AntMessage.cpp b/src/AntMessage.cpp
index 8cbeea7..0630c5f 100644
--- a/src/AntMessage.cpp
+++ b/src/AntMessage.cpp
@@ -38,6 +38,7 @@ using namespace std;
namespace antpm{
+
std::string
antFSCommand2Str(uchar cmd)
{
@@ -109,6 +110,15 @@ isAntFSCommandOrResponse(const uchar command, bool& isCommand)
}
+const string M_ANT_Channel_Id::toString() const
+{
+ std::stringstream sstr;
+ sstr
+ << " chan=0x" << antpm::toString<int>(chan,2,'0') << ", devNum=0x" << antpm::toString<int>(devNum,4,'0')
+ << ", devId=0x" << antpm::toString<int>(devId,2,'0') << ", transType=0x" << antpm::toString<int>(transType,2,'0');
+ return sstr.str();
+}
+
bool AntMessage::vrfChkSum() const
{
@@ -780,4 +790,5 @@ template bool AntMessage::saveAsAntParse<std::list<AntMessage> >(std::ostream& o
//template bool AntMessage::saveAsAntParse<std::queue<AntMessage> >(std::ostream& os, const std::queue<AntMessage>& messages);
template bool AntMessage::saveAsAntParse<std::vector<AntMessage> >(std::ostream& os, const std::vector<AntMessage>& messages);
+
}
diff --git a/src/AntMessage.hpp b/src/AntMessage.hpp
index b9e5f36..7f80d98 100644
--- a/src/AntMessage.hpp
+++ b/src/AntMessage.hpp
@@ -44,14 +44,7 @@ struct M_ANT_Channel_Id : public AntMessageContentBase
ushort devNum;
uchar devId;
uchar transType;
- const std::string toString() const
- {
- std::stringstream sstr;
- sstr
- << " chan=0x" << antpm::toString<int>(chan,2,'0') << ", devNum=0x" << antpm::toString<int>(devNum,4,'0')
- << ", devId=0x" << antpm::toString<int>(devId,2,'0') << ", transType=0x" << antpm::toString<int>(transType,2,'0');
- return sstr.str();
- }
+ const std::string toString() const;
};
struct M_ANTFS_Beacon : public AntMessageContentBase
{