MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / setProtocolIndex

Method setProtocolIndex

app/src/IO/Drivers/Modbus.cpp:705–712  ·  view source on GitHub ↗

* @brief Sets the protocol index (0 = RTU, 1 = TCP) */

Source from the content-addressed store, hash-verified

703 * @brief Sets the protocol index (0 = RTU, 1 = TCP)
704 */
705void IO::Drivers::Modbus::setProtocolIndex(const quint8 index)
706{
707 if (index < 2 && m_protocolIndex != index) {
708 m_protocolIndex = index;
709 m_settings.setValue("ModbusDriver/protocolIndex", index);
710 Q_EMIT protocolIndexChanged();
711 }
712}
713
714/**
715 * @brief Sets the slave address

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected