19 #ifndef __VisAOJoeCtrl_h__
20 #define __VisAOJoeCtrl_h__
25 #include "stdconfig.h"
26 #include "base/thrdlib.h"
46 JoeCtrl( std::string name,
const std::string &conffile)
throw (AOException);
49 JoeCtrl(
int argc,
char **argv)
throw (AOException);
89 std::vector<littlejoe_programset>
ondisk;
93 RTDBvar var_name, var_status, var_errmsg, var_enable_cur, var_enable_req;
94 RTDBvar var_dx, var_dx_cur, var_dy, var_dx_req, var_dy_cur,var_dy_req, var_windowxs, var_windowys,var_xbins, var_ybins, var_speeds;
95 RTDBvar var_xbin_cur, var_ybin_cur, var_speed_cur, var_black_cur;
96 RTDBvar var_xbin_req, var_ybin_req, var_speed_req, var_black_req;
97 RTDBvar var_temps, var_framerate_cur, var_framerate_req;
98 RTDBvar var_rep_cur, var_rep_req;
99 RTDBvar var_gain_cur, var_gain_req;
115 void Create(
void) throw (AOException);
157 int GetProgramPos(
int speed,
int xbin,
int ybin,
int *need_upload);
159 int UpdateJoeMemory(
unsigned int uploaded_file);
161 int LoadJoeDiskFiles(
void);
163 int EraseLocalMemory(
void);
165 int SetLocalMemory(
unsigned int programset_num);
167 int ComputeFramerate();
169 int ChangeFramerate(
double framerate,
int bestspeed=1);
177 int insert_value(
std::vector<
int> &array,
int value);
220 #endif //__VisAOJoeCtrl_h__
int _minRep
Minimum repititions (controls integration time)
RTDBvar var_preset_req
Preset to program set 0, program 0, for presetVisAO.
int cur_Reps
The current repititions running on the little joe.
int _maxRep
Maximum repititions (controls integration time)
int cur_Program
The current program running on the little joe.
Holds the details of a little joe program set (i.e. a pattern/con file pair)
int cur_ProgramSet
The Current program set loaded on the little joe.
static int EnableReqChanged(void *pt, Variable *var)
RTDB handler for an enable change request form the AO Supervisor.
static int PresetReqChanged(void *pt, Variable *msgb)
RTDB handler for preset request from the AO Supervisor.
littlejoe_programset memory
Struct representing LittleJoe's internal memory.
unsigned int _ccdNumSpeeds
Number of speeds.
std::string send_ccd47_command(std::string com)
Send a command to the CCD47 and get its response.
static int SpeedReqChanged(void *pt, Variable *var)
RTDB handler for a speed change request form the AO Supervisor.
int Stop()
Send a stop command to the CCD47Ctrl.
void SetupVars(void)
VIRTUAL - Setups variables in RTDB.
std::string _ccdName
CCD name.
static int RepReqChanged(void *pt, Variable *var)
RTDB handler for a repetitions change request form the AO Supervisor.
int Start()
Send a start command to the CCD47Ctrl.
static int BlackReqChanged(void *pt, Variable *var)
RTDB handler for a black level change request form the AO Supervisor.
int cur_Gain
The current gain running on the little joe.
RTDBvar var_cmode_cur
The current control mode in the RTDB.
static int CModeReqChanged(void *pt, Variable *msgb)
RTDB handler for a control mode change request from the AO Supervisor.
std::vector< int > _ccdXbins
Vector of x binnings.
std::vector< littlejoe_programset > ondisk
Struct array representing files that can be uploaded to LittleJoe (each one is a memory dump) ...
static int XbinReqChanged(void *pt, Variable *var)
RTDB handler for an x-bin change request form the AO Supervisor.
int TestCCD47CtrlLink()
Test the link with the CCD47Ctrl, and get its state.
std::vector< int > _ccdSpeeds
Vector of speeds.
int _maxNumBins
Maximum number of binnings.
static int FrameRateReqChanged(void *pt, Variable *var)
RTDB handler for a frame rate change request form the AO Supervisor.
int ReprogramJoe(int force=0)
Calculate and send a reprogram request to the CCD47Ctrl.
int _ccdDefaultXbin
Default x binning.
int DoFSM(void)
Perform controller functions and manage states.
static int YbinReqChanged(void *pt, Variable *var)
RTDB handler for a y-bin change request form the AO Supervisor.
int _ccdBlacksNum
Nuber of blacks.
int _startProgramSet
The program set currently set to load from flash on little joe power up.
The base class for VisAO applications.
std::vector< int > _ccdBlacks
Vector of black levels.
void StateChange(int oldstate, int state)
VIRTUAL - StateChange.
int _ccdDefaultSpeed
Default speed.
std::vector< int > _ccdYbins
Vector of y binnings.
Holds the details of one little joe program.
int _maxNumSpeeds
Maximum number of speeds.
int _ccdDefaultYbin
Default y binning.
The interface between the CCD47Ctrl class and the AO Supervisor.
Declarations for the VisAO CCD47 controller.
The namespace of VisAO software.
static int GainReqChanged(void *pt, Variable *var)
RTDB handler for a gain change request form the AO Supervisor.
std::string getCompletePath(std::string filename)
Gets the complete path of a program/pattern file.
int _ccdNum
CCD number (set from cfg file)
void Create(void)
Read the JoeCtrl specific config vars and connect to the CCD47Ctrl.
JoeCtrl(std::string name, const std::string &conffile)
Config file constructor.
RTDBvar var_cmode_req
The requested control mode in the RTDB.
int _ccdDefaultBlack
Default black levels.
void PostInit()
VIRTUAL - Perform post-initialization settings.