![Oriel Cornerstone 130 Скачать руководство пользователя страница 8](http://html.mh-extra.com/html/oriel/cornerstone-130/cornerstone-130_quick-start-manual_1650790008.webp)
CS API v3.01 QSG
Programming Interface Manual
8
public partial class MainForm : Form
{
public Int32 nActiveUnit = 1;
// Used only for multiple devices (default) below
private void btnSend_Click(object sender, EventArgs e)
{
cs.sendCommand(txtComand.Text);
txtInfo.Text = cs.getLastMessage();
}
private void btnResponse_Click(object sender, EventArgs e)
{
txtInfo.Text = cs.getResponse();
}
//====================== Second Controls for second device if needed
// NOT needed for only one device.
private void btnSend2_Click(object sender, EventArgs e)
{
cs.setActiveDevice(cs.usbDevices.Count);
cs.sendCommand(txtComand2.Text);
txtInfo.Text = cs.getLastMessage();
cs.setActiveDevice(nActiveUnit);
}
private void btnResponse2_Click(object sender, EventArgs e)
{
cs.setActiveDevice(cs.usbDevices.Count);
txtInfo.Text = cs.getResponse();
cs.setActiveDevice(nActiveUnit);
}
4 USAGE C++ DLL
This demonstrates how to call the Oriel Cypress DLL in C++.
Files:
Oriel_USB.h
– Header file of functions (inside a class object that needs to be created)
X86(32 Bit) / x64 (64 Bit) versions of:
Oriel_USB.dll and Oriel_USB.lib
The .lib file is used for programmic linking, and the .DLL needs to be in the folder or path to be found by
any executable that uses it.
Oriel_USB.h file provides an COriel_USB class that links DLL functions to connect and control the
Cornerstone.