1 #include "MsgHostConfirm.h"
3 namespace remote
{ namespace protocols
{ namespace diku_host_server
{
5 MsgHostConfirm::MsgHostConfirm(uint8_t status
,MsgMoteAddresses
& addresses
, MsgPayload
& message
)
12 MsgHostConfirm::MsgHostConfirm(uint8_t*& buffer
, uint32_t& buflen
)
14 buffer
=this->read(buffer
,buflen
);
18 MsgHostConfirm::~MsgHostConfirm()
22 delete this->addresses
;
27 uint32_t MsgHostConfirm::getLength()
29 return sizeof(status
) + addresses
->getLength() + message
->getLength();
32 uint8_t* MsgHostConfirm::write(uint8_t* buffer
, uint32_t& buflen
)
34 buffer
= writevalue(status
,buffer
,buflen
);
35 buffer
= addresses
->write(buffer
,buflen
);
36 buffer
= message
->write(buffer
,buflen
);
40 uint8_t* MsgHostConfirm::read(uint8_t* buffer
, uint32_t& buflen
)
42 buffer
= readvalue(status
,buffer
,buflen
);
43 addresses
= new MsgMoteAddresses(buffer
,buflen
);
44 message
= new MsgPayload(buffer
,buflen
);
48 void MsgHostConfirm::print(FILE* s
)
52 uint8_t MsgHostConfirm::getStatus()
57 MsgMoteAddresses
& MsgHostConfirm::getMoteAddresses()
62 MsgPayload
& MsgHostConfirm::getMessage()