MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/UMLibrary/communication/service/PingHandler.cpp
2024-06-07 11:12:56 +03:00

28 lines
625 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* 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;
}