modbus_flush


 

Function

 

Flushes unsent data. The flushed data will be discarded.

 

Format

 

modbus_flush( modbus_t *'ctx' );

 

Parameters

 

ctx [ C : modbus_t * ] [ Python : ctypes.POINTER(modbus_t) ]

Specify the pointer to the libmodbus structure.

 

Return values

 

None

 

Remarks

 

Flushes unsent data. The flushed data will be discarded.

 

Example

 

Flushes the unsent data of the structure specified by ctx.

 

C

int ret;

modbus_t *ctx;

ret = modbus_flush(ctx);

 

Python

ret = ctypes.c_int

ctx = ctypes.POINTER(modbus_t)

ret = modbus.modbus_flush(ctx)