ifyouuseRTUModewithSerialPort,youshoulddo: -1.CreateaclasstoimplementSerialPortWrapperinterface. -2.CreateaModbusMasterinstancewithcreateRtuMastermothodofModbusFactoryclass.