Skip to content
Snippets Groups Projects
Commit 57628fd3 authored by Yuelong Yu's avatar Yuelong Yu
Browse files

changed API and docs

APIs:
- added CopmileExperimentFile
- added DeleteExperimentFile
- added SendExperimentArgs
- changed behavior of SendExperimentFile
- deleted GetStatus

Docs:
- added example.cpp to show how to use API
parent 0a03d1ec
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
PROJECT_NUMBER=$(git describe --tags)
export PROJECT_NUMBER=$(git describe --tags)
doxygen doxygen.config
cd latex
make
......
......@@ -28,6 +28,23 @@ int main(int argc, char *argv[])
cout<<"libfsdetcore version : "<<m_agipd->GetDetCoreVersion()<<endl
<<"libagipctrl version : "<<m_agipd->GetLibAGIPDCtrlVersion()<<endl
<<"firmware version : "<<m_agipd->GetFirmwareVersion()<<endl;
// start expriment
// send experiment file
string exp_file="experiment.c";
m_agipd->SendExperimentFile(exp_file);
// compile expriment file
string compilation_log;
m_agipd->CompileExperiment(compilation_log);
// send expriment arguments
string in_args = "srun 10 352";
string out_args;
m_agipd->SendExperimentArgs(in_args, out_args);
// start acquistion
string run_log;
m_agipd->StartAcq(run_log);
// process image data ...
// done
return true;
}
\ No newline at end of file
......@@ -78,24 +78,36 @@ namespace AGIPDCtrlNS
* \return firmware version
*/
string GetFirmwareVersion();
/**
* \brief get status
*
* For details of type of the status
* \see FSDetCoreNS::Enum_detector_state
*
* \return return status of the system
* \brief send file, the file can be experiment file *.c, *.yaml files.
* \param file_path path of file
* \return response of command \see AGIPDCtrlNS::RESPONSE
*/
Enum_detector_state GetStatus();
RESPONSE SendExperimentFile(string& file_path);
/**
* \brief send experiment file
* \param file_path path of experiment file
* \param log compilation log
* \brief delete file stored on hardware side
* \param file_name file name
* \param deleted_file the file been deleted
* \return response of command \see AGIPDCtrlNS::RESPONSE
*/
RESPONSE SendExperimentFile(string& file_path,string& log);
RESPONSE DeleteExperimentFile(string& file_name, string& deleted_file);
/**
* \brief compile the experiment file and get the compilation log
* \param log compilation log
* \return RESPONSE \see AGIPDCtrlNS::RESPONSE
*/
RESPONSE CompileExperimentFile(string& log);
/**
* \brief send experiment arguments
* \param in_args arguments of example (e.g. srun 10 352)
* \param out_args current arguments returned from hardware
* \return RESPONSE \see AGIPDCtrlNS::RESPONSE
*/
RESPONSE SendExperimentArgs(string& in_args,string& out_args);
/**
* \brief get application log
......@@ -222,6 +234,7 @@ namespace AGIPDCtrlNS
/**
* \brief start acquisition
* \param log the application log from hardware
* \return response of command \see AGIPDCtrlNS::RESPONSE
*/
RESPONSE StartAcq(string& log);
......@@ -242,7 +255,6 @@ namespace AGIPDCtrlNS
private:
string m_ip;
int16 m_port;
Enum_detector_state m_state;
sptr_network m_network;
uptr_agipdcomm m_communication;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment