Virtual Serial Port Tools - Advanced serial port configurations for your custom ports usage scenario
Download Virtual Serial Port Tools Hide this button

ITimeouts Interface

This interface is implemented by a timeouts override object. Values stored in this object are documented in the Windows Documentation. IConfigurableDevice.timeouts property is used to set or retrieve this object. A new object with specified values may also be created using the ISerialPortLibrary.createTimeoutsObject method.

Declaration

interface ITimeouts {
    // Properties
    ${readIntervalTimeout}: number;
    ${readTotalTimeoutMultiplier}: number;
    ${readTotalTimeoutConstant}: number;
    ${writeTotalTimeoutMultiplier}: number;
    ${writeTotalTimeoutConstant}: number;
}
public interface ITimeouts
{
    // Properties
    uint ${readIntervalTimeout} { get; set; }
    uint ${readTotalTimeoutMultiplier} { get; set; }
    uint ${readTotalTimeoutConstant} { get; set; }
    uint ${writeTotalTimeoutMultiplier} { get; set; }
    uint ${writeTotalTimeoutConstant} { get; set; }
}
struct ITimeouts : IDispatch
{
    // Properties
    unsigned ${readIntervalTimeout};  // get set 
    unsigned ${readTotalTimeoutMultiplier};  // get set 
    unsigned ${readTotalTimeoutConstant};  // get set 
    unsigned ${writeTotalTimeoutMultiplier};  // get set 
    unsigned ${writeTotalTimeoutConstant};  // get set 
};

ITimeouts Properties

readIntervalTimeout

readIntervalTimeout: number;
uint readIntervalTimeout { get; set; }
unsigned readIntervalTimeout;  // get set 

The maximum time allowed to elapse before the arrival of the next byte on the communications line, in milliseconds. If the interval between the arrival of any two bytes exceeds this amount, the ReadFile operation is completed and any buffered data is returned. A value of zero indicates that interval time-outs are not used.

A value of 4294967295 (or -1), combined with zero values for both the readTotalTimeoutConstant and readTotalTimeoutMultiplier members, specifies that the read operation is to return immediately with the bytes that have already been received, even if no bytes have been received.

readTotalTimeoutMultiplier

readTotalTimeoutMultiplier: number;
uint readTotalTimeoutMultiplier { get; set; }
unsigned readTotalTimeoutMultiplier;  // get set 

The multiplier used to calculate the total time-out period for read operations, in milliseconds. For each read operation, this value is multiplied by the requested number of bytes to be read.

readTotalTimeoutConstant

readTotalTimeoutConstant: number;
uint readTotalTimeoutConstant { get; set; }
unsigned readTotalTimeoutConstant;  // get set 

A constant used to calculate the total time-out period for read operations, in milliseconds. For each read operation, this value is added to the product of the readTotalTimeoutMultiplier member and the requested number of bytes.

A value of zero for both the readTotalTimeoutMultiplier and readTotalTimeoutConstant members indicates that total time-outs are not used for read operations.

writeTotalTimeoutMultiplier

writeTotalTimeoutMultiplier: number;
uint writeTotalTimeoutMultiplier { get; set; }
unsigned writeTotalTimeoutMultiplier;  // get set 

The multiplier used to calculate the total time-out period for write operations, in milliseconds. For each write operation, this value is multiplied by the number of bytes to be written.

writeTotalTimeoutConstant

writeTotalTimeoutConstant: number;
uint writeTotalTimeoutConstant { get; set; }
unsigned writeTotalTimeoutConstant;  // get set 

A constant used to calculate the total time-out period for write operations, in milliseconds. For each write operation, this value is added to the product of the writeTotalTimeoutMultiplier member and the number of bytes to be written.

A value of zero for both the writeTotalTimeoutMultiplier and writeTotalTimeoutConstant members indicates that total time-outs are not used for write operations.