MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/UMLibrary/application/drivers/BinaryEncoderSync.hh
2024-06-07 11:12:56 +03:00

54 lines
2.0 KiB
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.

/*
* BinaryEncoderSync.hh
*
* Created on: 1 февр. 2022 г.
* Author: titov
*/
#ifndef UMLIBRARY_APPLICATION_DRIVERS_BINARYENCODERSYNC_HH_
#define UMLIBRARY_APPLICATION_DRIVERS_BINARYENCODERSYNC_HH_
#include "../ISetupStep.hh"
#include "../../communication/format/BinaryDataPublisher.hh"
namespace application { namespace board {
//!Модуль представляет асинхронные бинарные данные в виде энкодера, синхронизируя их по "процессу".
struct BinaryEncoderSync : public ISetupStep {
::communication::ISubscriberRegistrator * data_master = nullptr;
bool input( Environment & env );
void build( Environment & env );
struct Links {
Environment::Id data_master; //!<Входящий фрейм данных.
Environment::Id encoder_sync; //!<Интерфейс энкодера, синхронизированные по процессу данные.
};
struct Setting {
uint16_t frame_bitsize; //!<Размер данных посылки в битах.
uint16_t frame_bitoffset; //!<Смещение данных посылки в битах.
uint16_t agnle_bitsize; //!<Размер данных "угла" в битах в посылке.
uint16_t angle_bitoffset; //!<Смещение данных "угла" в битах в посылке.
uint16_t turn_bitsize; //!<Размер данных "оборотов" в битах в посылке.
uint16_t turn_bitoffset; //!<Смещение данных "оборотов" в битах в посылке.
};
const Links & links;
const Setting & config;
const configuration::ProcessConfig & params;
BinaryEncoderSync( const Links & links, const Setting & config, configuration::ProcessConfig & params );
};
} /* namespace board */
} /* namespace application */
#endif /* UMLIBRARY_APPLICATION_DRIVERS_BINARYENCODERSYNC_HH_ */