11 namespace modbus_controller {
30 std::function<optional<std::string>(
ModbusSelect *
const, int64_t,
const std::vector<uint8_t> &)>;
32 std::function<optional<int64_t>(ModbusSelect *
const,
const std::string &, int64_t, std::vector<uint16_t> &)>;
42 void control(
const std::string &value)
override;
SensorValueType sensor_value_type
void set_write_template(write_transform_func_t &&f)
std::vector< int64_t > mapping_
optional< transform_func_t > transform_func_
void set_optimistic(bool optimistic)
ModbusRegisterType register_type
const nullopt_t nullopt((nullopt_t::init()))
std::function< optional< std::string >(ModbusSelect *const, int64_t, const std::vector< uint8_t > &)> transform_func_t
void set_template(transform_func_t &&f)
void control(const std::string &value) override
void set_parent(ModbusController *const parent)
optional< write_transform_func_t > write_transform_func_
void parse_and_publish(const std::vector< uint8_t > &data) override
ModbusSelect(SensorValueType sensor_value_type, uint16_t start_address, uint8_t register_count, uint16_t skip_updates, bool force_new_range, std::vector< int64_t > mapping)
Base-class for all selects.
Implementation of SPI Controller mode.
ModbusController * parent_
void dump_config() override
std::function< optional< int64_t >(ModbusSelect *const, const std::string &, int64_t, std::vector< uint16_t > &)> write_transform_func_t
void set_use_write_mutiple(bool use_write_multiple)