Table of Contents > QUARC > User's Guide
QUARC External Interfaces
QUARC provides a variety of external interfaces or APIs with which the user can communicate with the real-time code or access hardware. These APIs are categorized according to the programming language for which they are written. The languages supported by the QUARC APIs include C/C++, .NET, Java and Python languages. These external interfaces can also be categorized based on functionality: communications, hardware, error handling and target management.
The communications APIs are used to establish communication channels between applications and Simulink models (real-time code). An example of where these APIs might be used is to transfer the results of a Simulink model to an application acting as a front-end GUI.
The Hardware APIs are used to access hardware in your application. For example, you can read data from or write data to a Hardware-in-the-Loop (HIL) device using these APIs. As another example, you can create an application performing automated hardware testing.
The Target Management APIs are intended to manage the real-time code on a target. For example, you can download the real-time code for a model to a target using these APIs. Another example would be to switch between models on the target using your application.
The error handling APIs facilitate the interpretation of error codes returned by any of the functions in the QUARC APIs.
Please use the following list to refer to each set of APIs based on the programming language for which they are written:
Examples of using the C and Java functions are provided with QUARC. The C examples come with Visual Studio 2010 solutions and may be compiled for both 32-bit (Win32) and 64-bit (x64) Windows platforms when Visual Studio 2010 Professional is installed. The examples are provided under the examples folder of the QUARC installation directory, which for a typical installation is
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
dos(sprintf('explorer "%s"', fullfile(qc_root, 'examples')))
Example Documentation |
Visual Studio Solution |
---|---|
C Hardware API Examples
MATLAB Command Line Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window: dos(fullfile(qc_root, 'examples', 'C', 'hardware', 'hil_c_api_examples_readme.exe')) |
hil_c_api_examples.sln
MATLAB Command Line Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window: dos(fullfile(qc_root, 'examples', 'C', 'hardware', 'hil_c_api_examples.sln')) |
C Stream API Examples
MATLAB Command Line Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window: dos(fullfile(qc_root, 'examples', 'C', 'communications', 'stream_c_api_examples_readme.exe')) |
stream_c_api_examples.sln
MATLAB Command Line Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window: dos(fullfile(qc_root, 'examples', 'C', 'communications', 'stream_c_api_examples.sln')) |
C BSD Socket Examples
MATLAB Command Line Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window: dos(fullfile(qc_root, 'examples', 'C', 'communications', 'socket_c_api_examples_readme.exe')) |
socket_c_api_examples.sln
MATLAB Command Line Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window: dos(fullfile(qc_root, 'examples', 'C', 'communications', 'socket_c_api_examples.sln')) |
Java Communications Examples
MATLAB Command Line Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window: dos(fullfile(qc_root, 'examples', 'Java', 'communications', 'stream_java_api_examples_readme.exe')) |
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.