This project provides a DLL library for communicating with the ATEQ G520 air/air leak detector via a serial port (RS-232). The library allows you to send commands to the device and read data from it, enabling seamless integration with your applications for leak detection and testing.
-
Easily open and close communication with the ATEQ G520 device.
-
Send specific commands to the device, such as starting, stopping, resetting, and setting programs.
-
Read data from the device, including status information and test results.
-
Robust error handling to ensure reliable communication with the device.
-
Clone or download the repository.
-
Build the project to generate the DLL.
-
Include the DLL in your project.
-
Link the DLL in your application and use the provided functions to interact with the ATEQ G520 device.
AteqOpen(LPCTSTR comPort)
: Opens the serial port and initializes communication with the ATEQ G520 device.
Returns a unique ID for the opened connection, or a negative value on error.
AteqGetStatus(int ateqId, BYTE* buffer, int bufferSize)
: Retrieves the status of the device.
Returns the number of bytes read, or a negative value on error.
AteqSetProgram(int ateqId, BYTE programNumber, BYTE* buffer, int bufferSize)
: Sets the program on the device.
Returns the number of bytes read, or a negative value on error.
AteqStart(int ateqId, BYTE* buffer, int bufferSize)
: Starts the leak detection process.
Returns the number of bytes read, or a negative value on error.
AteqStop(int ateqId, BYTE* buffer, int bufferSize)
: Stops the leak detection process.
Returns the number of bytes read, or a negative value on error.
AteqReset(int ateqId, BYTE* buffer, int bufferSize)
: Resets the device.
Returns the number of bytes read, or a negative value on error.
AteqClose(int ateqId)
: Closes the COM port and releases resources.
Returns 1 on success, 0 on failure.
-1: Invalid device ID or device not found.
-2: General exception or error.
-3: Failed to write to the device.
-4: Failed to wait for an event.
-5: Failed to send a break signal.
-6: Failed to read from the device.