Public Member Functions | List of all members
PilzModbusClientMock Class Reference

Mock used in the unittest of the PilzModbusClient. More...

#include <pilz_modbus_client_mock.h>

Inheritance diagram for PilzModbusClientMock:
Inheritance graph
[legend]

Public Member Functions

 MOCK_METHOD0 (connect, void())
 
 MOCK_METHOD0 (getResponseTimeoutInMs, unsigned long())
 
 MOCK_METHOD1 (setResponseTimeoutInMs, void(unsigned long timeout_ms))
 
 MOCK_METHOD2 (init, bool(const char *ip, unsigned int port))
 
 MOCK_METHOD2 (readHoldingRegister, std::vector< uint16_t >(int addr, int nb))
 
 MOCK_METHOD4 (writeReadHoldingRegister, std::vector< uint16_t >(const int write_addr, const std::vector< uint16_t > &write_reg, const int read_addr, const int read_nb))
 
- Public Member Functions inherited from prbt_hardware_support::ModbusClient
virtual unsigned long getResponseTimeoutInMs ()=0
 Get the response timeout. More...
 
virtual bool init (const char *ip, unsigned int port)=0
 Initialize the modbus client by connecting to the server. More...
 
virtual RegCont readHoldingRegister (int addr, int nb)=0
 Read the holding registers. More...
 
virtual void setResponseTimeoutInMs (unsigned long timeout_ms)=0
 Set the response timeout. More...
 
virtual RegCont writeReadHoldingRegister (const int write_addr, const RegCont &write_reg, const int read_addr, const int read_nb)=0
 
virtual ~ModbusClient ()=default
 

Detailed Description

Mock used in the unittest of the PilzModbusClient.

Definition at line 29 of file pilz_modbus_client_mock.h.

Member Function Documentation

◆ MOCK_METHOD0() [1/2]

PilzModbusClientMock::MOCK_METHOD0 ( connect  ,
void()   
)

◆ MOCK_METHOD0() [2/2]

PilzModbusClientMock::MOCK_METHOD0 ( getResponseTimeoutInMs  ,
unsigned   long() 
)

◆ MOCK_METHOD1()

PilzModbusClientMock::MOCK_METHOD1 ( setResponseTimeoutInMs  ,
void(unsigned long timeout_ms)   
)

◆ MOCK_METHOD2() [1/2]

PilzModbusClientMock::MOCK_METHOD2 ( init  ,
bool(const char *ip, unsigned int port)   
)

◆ MOCK_METHOD2() [2/2]

PilzModbusClientMock::MOCK_METHOD2 ( readHoldingRegister  ,
std::vector< uint16_t >  int addr, int nb 
)

◆ MOCK_METHOD4()

PilzModbusClientMock::MOCK_METHOD4 ( writeReadHoldingRegister  ,
std::vector< uint16_t >  const int write_addr, const std::vector< uint16_t > &write_reg, const int read_addr, const int read_nb 
)

The documentation for this class was generated from the following file:


prbt_hardware_support
Author(s):
autogenerated on Fri Aug 7 2020 03:13:41