Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
//
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#import "C:UsersrradzikoviskiDesktopVisual Studio 2015ProjectsLecroyControl_cppLecroyControl_cppActiveDSO.ocx"
using namespace ACTIVEDSOLib;
using namespace std;
int main()
{
_bstr_t idnString;
_bstr_t stop = "STOP";
string text;
string input;
fstream file;
// Initialize OLE 2.0 libraries
if (S_OK != OleInitialize(NULL))
return FALSE;
// create a smart pointer for ActiveDSO
_DActiveDSOPtr activeDSO;
HRESULT hr = activeDSO.GetActiveObject(__uuidof(ActiveDSO));
if (FAILED(hr))
{
hr = activeDSO.CreateInstance(__uuidof(ActiveDSO));
if (FAILED(hr))
_com_issue_error(hr);
}
// start using the control
cout << "Enter IP: ";
cin >> input;
string connectionString = "IP: " + input;
activeDSO->MakeConnection(connectionString.c_str());
cout << "Connected to " + connectionString;
/*file.open("config.txt", ios::in);
while (!file.eof())
{
getline(file, text);
if (text.find("//")==-1 && text.length()!=0)
{
printf("%sn", (const char*)text.c_str());
idnString = text.c_str();
activeDSO->WriteString(idnString, 1);
}
}*/
//activeDSO->WriteString("TRMD SINGLE", 1);
while (true)
{
activeDSO->WriteString("TRMD?", 1);
idnString = activeDSO->ReadString(50);
cout << "Trigger status: " + idnString;
if (idnString == stop) break;
Sleep(100);
if (GetAsyncKeyState(VK_RETURN))
cout << "Enter Trigger state :";
}
/*activeDSO->WriteString("HARDCOPY_SETUP DEV, JPEG, FORMAT, LANDSCAPE, BCKG, WHITE, DEST, FILE, DIR, 'C:/Documents and Settings/LeCroyUser/Desktop/Test/', FILE, 'test', AREA, DSOWINDOW", 1);
activeDSO->WriteString("SCDP", 1);
activeDSO->StoreHardcopyToFile("JPEG","","test.jpg");*/
//activeDSO->WriteString("STore_SeTup C4,HDD,AUTO,OFF,FORMAT,ASCII", 1);
//activeDSO->WriteString("STORE C4,HDD", 1);
//Sleep(30000);
//activeDSO->WriteString("VBS 'app.SaveRecall.Waveform.DoSave'", 1);
//idnString = activeDSO->ReadString(50);
//printf("Read: %sn", (const char*) idnString);
//activeDSO->TransferFileToPc("HDD", "D:\New Folder (2)\C4poweroff100001.txt", "C:\Users\rradzikoviski\Desktop\Visual Studio 2010\Projects\lecroy_test\lecroy\1.txt");
//cin.get();
return 1;
}
![]() |
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team