Initial commit
[remote/remote-mci.git] / protocols / diku_host_server / MsgMoteConnectionInfo.cc
blob512f41bcd9f70f8854e5091f1080b75886be5714
1 #include "MsgMoteConnectionInfo.h"
3 namespace remote { namespace protocols { namespace diku_host_server {
5 MsgMoteConnectionInfo::MsgMoteConnectionInfo() : path()
6 {}
8 MsgMoteConnectionInfo::MsgMoteConnectionInfo(uint64_t p_macAddress, std::string p_path)
9 : macAddress(p_macAddress), path(p_path)
13 MsgMoteConnectionInfo::MsgMoteConnectionInfo(const MsgMoteConnectionInfo& o) : path()
15 path = o.path;
16 macAddress = o.macAddress;
19 MsgMoteConnectionInfo::~MsgMoteConnectionInfo()
22 void MsgMoteConnectionInfo::operator = (const MsgMoteConnectionInfo& o)
24 path = o.path;
25 macAddress = o.macAddress;
28 uint32_t MsgMoteConnectionInfo::getLength()
30 return sizeof(macAddress) + path.getLength();
33 uint8_t* MsgMoteConnectionInfo::write(uint8_t* buffer, uint32_t& buflen)
35 buffer = path.write(buffer,buflen);
36 buffer = writevalue(macAddress,buffer,buflen);
37 return buffer;
40 uint8_t* MsgMoteConnectionInfo::read(uint8_t* buffer, uint32_t& buflen)
42 buffer = path.read(buffer,buflen);
43 buffer = readvalue(macAddress,buffer,buflen);
44 return buffer;
47 void MsgMoteConnectionInfo::print(_IO_FILE* s)
51 MsgPayload& MsgMoteConnectionInfo::getPath()
53 return path;
56 }}}