Commit 7424e4c8 authored by cyclops's avatar cyclops
Browse files

Add cyclpos settings

parent 9366fff5
......@@ -16,8 +16,9 @@
* limitations under the Licence.
*/
#include "common/DirectCamera.h"
#include "controllers/common/family/Families.h"
#include "DirectCamera.h"
using namespace std;
......
......@@ -59,6 +59,9 @@ PslDriver::PslDriver(const string& name):
bpixel.init(this, SAVE, "bpixel");
fileSimu.init(this, SAVE, "file_simu");
indexSimu.init(this, SAVE, "index_simu");
fileDirectory.init(this, SAVE, "fileDirectory");
fileName.init(this, SAVE, "fileName");
numor.init(this, SAVE, "numor");
initCommand(driver::INIT_COMMAND);
initCommand(driver::READ_COMMAND);
......
......@@ -82,11 +82,14 @@ public:
Property<int32> acqmode;
Property<int32> nbFrame;
Property<int32> bpixel;
Property<bool> bpixel;
Property<int32> gain;
Property<std::string> fileSimu;
Property<int32> indexSimu;
Property<string> fileDirectory;
Property<string> fileName;
Property<int32> numor;
private:
......
......@@ -64,7 +64,7 @@ void RealPslDriver::writeParam() {
string err;
buf_conf << "SetAcquisitionMode; "<< boost::format("%03d") %PslDriver::MODE[owner()->acqmode()];
buf_conf << "SetAcquisitionMode;"<< boost::format("%03d") %PslDriver::MODE[owner()->acqmode()];
err = writeAndRead(buf_conf.str(), TERMINATOR);
buf_conf.str("");
buf_conf.clear();
......@@ -102,7 +102,7 @@ void RealPslDriver::writeParam() {
if (err != "True") {
cerr << "error SetIntensifierGain " << endl;
}
owner()->nbFrame=1;
buf_conf << "SetFrameNumber;"<< boost::format("%03d") % owner()->nbFrame();
err = writeAndRead(buf_conf.str(), TERMINATOR);
buf_conf.str("");
......@@ -119,12 +119,12 @@ void RealPslDriver::writeParam() {
void RealPslDriver::synchroniseRead() {
string err;
int32 i;
do {
err = writeAndRead("WaitForImage", TERMINATOR);
} while ((err == "False") && (i++ < 5));
if (err != "True") {
cerr << "error acquisition " << endl;
} else {
// do {
// err = writeAndRead("WaitForImage", TERMINATOR);
// } while ((err == "False") && (i++ < 5));
// if (err != "True") {
// cerr << "error acquisition " << endl;
// } else {
string buf;
owner()->connect();
Counter c1;
......@@ -183,7 +183,7 @@ void RealPslDriver::synchroniseRead() {
}
owner()->disconnect();
cout << "read time:" << c1.getTime() << endl;
}
cout << "owner()->m_SynchroniseReadTerminated = true" << endl;
owner()->m_SynchroniseReadTerminated = true;
}
......@@ -198,15 +198,39 @@ void RealPslDriver::read() {
* start
*/
void RealPslDriver::start() {
ostringstream buf_conf;
float64 exp_time = owner()->time.setpoint();
string err;
buf_conf << "SetRecordPath;"<< "z:";// owner()->fileDirectory();
err = writeAndRead(buf_conf.str(), TERMINATOR);
buf_conf.str("");
buf_conf.clear();
if (err != "True") {
cerr << "error SetRecordPath; " << endl;
}
buf_conf << "SetRecordName;"<< "test";// owner()->fileName();
err = writeAndRead(buf_conf.str(), TERMINATOR);
buf_conf.str("");
buf_conf.clear();
if (err != "True") {
cerr << "error SetRecordName;; " << endl;
}
owner()->numor=222;
buf_conf << "SetRecordNumber;"<< owner()->numor();
err = writeAndRead(buf_conf.str(), TERMINATOR);
buf_conf.str("");
buf_conf.clear();
if (err != "True") {
cerr << "error SetRecordName;; " << endl;
}
cout << "start" << endl;
cout << "exp_time:" << exp_time << endl;
buf_conf << "SetExposure;[" << exp_time << ",\"Second\"]";
string err = writeAndRead(buf_conf.str(), TERMINATOR);
err = writeAndRead(buf_conf.str(), TERMINATOR);
err = writeAndRead("Snap", TERMINATOR);
if (err != "True") {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment