/* * ModbusAnalogOutput.hh * * Created on: 19 мар. 2021 г. * Author: titov */ #ifndef UMLIBRARY_DRIVER_MODBUSANALOGOUTPUT_HH_ #define UMLIBRARY_DRIVER_MODBUSANALOGOUTPUT_HH_ #include #include "IModBus.hh" namespace driver { namespace modbus { class ModbusAnalogOutput : public IModBusDispatch { typedef IModBusDispatch::Status Status; const float coeff; const float offset; const float invalid; float value; uint16_t reg; bool sign; float up_limit; float down_limit; public: ModbusAnalogOutput( float coeff, float offset, float invalid, bool sign, float initial, float up_limit, float down_limit ); const float & signal() const; Status read( uint16_t & reg ); Status write( uint16_t reg ); }; } } #endif /* UMLIBRARY_DRIVER_MODBUSANALOGOUTPUT_HH_ */