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

40 lines
743 B
C++
Raw 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.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_ */