MotorControlModuleSDFM_TMS3.../Projects/EFC_Application/UMLibrary/communication/service/PingHandler.hh

40 lines
737 B
C++

/*
* PingHandler.h
*
* Created on: 31 ìàðòà 2017 ã.
* Author: titov
*/
#ifndef SOURCES_COMMUNICATION_PINGHANDLER_H_
#define SOURCES_COMMUNICATION_PINGHANDLER_H_
#include "../service/IMessageHandler.hh"
#include "../service/IMessageLink.hh"
#include <stdint.h>
namespace communication { namespace service {
class PingHandler : public IMessageHandler {
public:
PingHandler( uint16_t version = 0, uint16_t mode = 0, uint16_t session_id = 0 );
struct Version {
uint16_t version:8;
uint16_t mode :8;
uint16_t session_id;
};
void handler(IMessageLink * link);
private:
const uint16_t version;
const uint16_t mode;
const uint16_t session_id;
};
}}
#endif /* SOURCES_COMMUNICATION_PINGHANDLER_H_ */