192 if (bytes_received==0 || err)
194 if (err==ba::error::eof)
195 Warn(
"Connection closed by remote host (FTM).");
199 if (err && err!=ba::error::eof &&
200 err!=ba::error::basic_errors::not_connected &&
201 err!=ba::error::basic_errors::operation_aborted)
204 str <<
"Reading from " << URL() <<
": " << err.message() <<
" (" << err <<
")";
207 PostClose(err!=ba::error::basic_errors::operation_aborted);
218 str <<
"Excepted " <<
sizeof(
FTM::Header) <<
" bytes (FTM::Header) but received " << bytes_received <<
".";
230 str <<
"Invalid header received: start delimiter wrong, received ";
264 str <<
"Unknonw type " <<
fHeader.
fType <<
" in received header." << endl;
277 str <<
"Invalid data received: end delimiter wrong, received ";
332 Out() << endl <<
kBold <<
"Register received: " << endl;
333 Out() <<
"Addr: " << ntohs(
fBuffer[0]) << endl;
334 Out() <<
"Value: " << ntohs(
fBuffer[1]) << endl;
345 str <<
"Unknonw type " <<
fHeader.
fType <<
" in header." << endl;
351 catch (
const logic_error &e)
354 str <<
"Exception converting buffer into data structure: " << e.what();
vector< uint16_t > fBuffer
FTM::DynamicData fDynamicData
FTM::StaticData fBufStaticData
Static (configuration) data.
bool CheckConsistency(FTM::StaticData &data)
virtual void UpdateFirstHeader()
virtual void UpdateCounter()
virtual void UpdateFtuList()
FTM::StaticData fStaticData
virtual void UpdateError()
map< uint16_t, uint32_t > fCounter
Local extension to identify a header in fCounter.
FTU list (answer of ping)
Start delimiter send before each header.
virtual void HandleReadTimeout(const boost::system::error_code &)
A requested register value.
virtual void UpdateHeader()
virtual void UpdateStaticData()
End delimiter send after each data block.
void CmdSendStatDat(const FTM::StaticData &data)
virtual void UpdateDynamicData()
Error list (error when FTU communication failed)