28 lines
619 B
C++
28 lines
619 B
C++
/*
|
|
* PingHandler.cpp
|
|
*
|
|
* Created on: 31 ìàðòà 2017 ã.
|
|
* Author: titov
|
|
*/
|
|
|
|
#include "../service/PingHandler.hh"
|
|
|
|
#include <stdint.h>
|
|
|
|
using driver::IRxLink;
|
|
using driver::ITxLink;
|
|
|
|
communication::service::PingHandler::PingHandler( uint16_t version, uint16_t mode, uint16_t session_id ) :
|
|
version(version), mode(mode), session_id(session_id) {}
|
|
|
|
void communication::service::PingHandler::handler( communication::IMessageLink * link ) {
|
|
|
|
Version answer = { .version = version, .mode = mode, .session_id = session_id };
|
|
|
|
ITxLink & outdata = link->createMessage( sizeof(Version) );
|
|
|
|
outdata << answer;
|
|
|
|
}
|
|
|