23 #ifndef __CCD47Ctrl_h__
24 #define __CCD47Ctrl_h__
44 #include "hwlib/netseriallib.h"
45 #include "hwlib/joelib.h"
48 #include "base/thrdlib.h"
132 CCD47Ctrl( std::string name,
const std::string &conffile)
throw (AOException);
135 CCD47Ctrl(
int argc,
char **argv)
throw (AOException);
140 void Create(
void)
throw (AOException);
223 std::vector<littlejoe_programset>
ondisk;
224 int _startProgramSet;
279 int ReprogramJoe(
int program_set,
int program,
int gain,
int rep,
int force=0);
307 int __ReprogramJoe(
int program_set,
int program,
int gain,
int rep,
int force=0);
391 #endif //__CCD47Ctrl_h__
std::string EDT_cfg_fname
Name of the EDT config file for this program.
void Create(void)
Common creation tasks, called by constructors.
littlejoe_program ReadProgram(Config_File &cfg)
Read a configuration file with the parameters of a single LittleJoe program.
Config_File * adopt_cfg
The dictionary of config details from the adopt config file.
std::string adopt_cfg_file
Name of the adopt config file (this is specified in the main config file)
Holds the details of a little joe program set (i.e. a pattern/con file pair)
unsigned int _ccdNumSpeeds
Number of speeds.
double load_time
Typical time for this programs set to upload to the little joe.
int load_EDT_config(std::string)
Loads the EDT configuration file.
int FGrunning
Whether or not the framegrabber is running.
pthread_t load_thread
Identifier for the __ReprogramJoe thread.
int readout_speed
Program readout speed, pixel rate in khz.
int cur_xbin
Current x binning.
int joe_loading
Tells the main thread that the __ReprogramJoe thread is working.
int cur_State
Current state.
int _minRep
Minimum repetitions.
int _ccdDx
CCD x dimension.
The standalone VisAO application, does not interface with the AO Supervisor.
std::string control_filename
Name of the control file.
std::string FrameWriterName
Process name of the relevant framewriter.
int Stop(void)
Stop sequencing and stop the framegrabber.
int SetupNetwork(void)
Setup network connection with LittleJoe.
The controller for the VisAO CCD47 via its Little Joe.
basic_status_board * fw47sb
The Framewriter47 status board is used to check if framewriter is running before saving.
int cur_Program
The currently running program.
Declarations for the standalone VisAO application.
Logger * _tempsLogger
Temperature logger.
double cur_framerate
Current frame rate.
int FGremaining
How many saves are remaining.
virtual int update_statusboard()
Update the CCD47 Status Board shared memory.
virtual std::string remote_command(std::string com)
Called by __remote_command after control state logic.
int FGskipping
Whether or not the framegrabber is skipping, and how many frames to skip.
std::vector< littlejoe_program > programs
Details of the individual programs.
virtual std::string local_command(std::string com)
Called by __local_command after control state logic.
int cur_ProgramSet
The currently loaded program set.
int cur_windowx
Current x window size.
int cur_ybin
Current y binning.
std::string get_ccdNetAddr()
Return the network address of the CCD.
int _ccdDefaultYbin
Default y binning.
pthread_mutex_t reprogMutex
Mutex for the __ReprogramJoe thread.
std::string name
Program name.
int DoFSM(void)
Performs controller functions and manages states.
double temps[3]
Current temperatures.
int Start(void)
Start sequencing and start the framegrabber.
int SetJoeRCL(int rcl)
Set the recall "RCL" parameter on the little joe (pixel readout, gain & related settings) ...
int ComputeRepsFrameRate(double fr)
Computes the reps required to match a requested framerate.
CCD47Ctrl(std::string name, const std::string &conffile)
Name and config file constructor.
int FirstJoeConfig(void)
Sets the LittleJoe controller in a known state.
virtual std::string script_command(std::string com)
Called by __script_command after control state logic.
int _maxRep
Maximum repetitions.
Declarations for some utility functions pertaining to the EDT framegrabber PCI card.
int ReprogramJoe(int program_set, int program, int gain, int rep, int force=0)
Reprogram the little joe, including file uploads as necessary.
int LoadJoeDiskFiles(void)
Load the configuration files specifying the different program sets that can be uploaded to LittleJoe...
int _ccdDefaultXbin
Default x binning.
std::string common_command(std::string com, int cmode)
Called by all the command handlers, to perform common command processing.
int ComputeFramerate()
Computes the current framerate from the current state of LittleJoe control variables.
int _ccdDefaultBlack
Default black levels.
int set_imtype(int it)
Set the image type.
int cur_speed
Current speed.
std::string _ccdNetAddr
CCD network address.
std::vector< littlejoe_programset > ondisk
Struct array representing files that can be uploaded to LittleJoe.
int ReadJoeStatus()
Check the LittleJoe CCD camera status.
Holds the details of one little joe program.
int ReadJoeTemps(void)
Read the LittleJoe CCD camera temperatures.
std::string EDT_cfgdir
EDT configuration files directory.
int _maxNumBins
Maximum number of bins.
std::string getCompletePath(std::string filename)
Get the complete path of a program/pattern file.
std::string FWsubdir
The current subdirectory of the framewriter.
int _ccdNetPort
The TCP/IP port of the CCD at its network address.
std::string pattern_filename
Name of the pattern file.
int _maxNumSpeeds
Maximum number of speeds.
int cur_windowy
Current y window size.
int blackLevel[2]
Current blacklevels.
int FGsaving
Whether or not the framegrabber is saving, and how many to save.
int swonly_reprogram(int program_set, int program, int gain, int rep)
Only change the settings in this software, do not reprogram the little joe.
std::string FrameGrabberName
Process name of the relevant framegrabber.
int get_ccdNetPort()
Returns the TCP/IP port of the CCD at its network address.
int GetFramegrabberStatus()
Checks whether the framegrabber process is running, and what its current status is.
int cur_Gain
The currently loaded gain.
The namespace of VisAO software.
int imtype
Image type, 0=science (default), 1=acquisition, 2=dark, 3=sky.
int _ccdDy
CCD y dimension.
int __ReprogramJoe(int program_set, int program, int gain, int rep, int force=0)
This function does the actual reprogramming, based on the adopt version.
int cur_Reps
The currently loaded repetitions.
int _ccdBlacksNum
Number of blacks.
void init_VisAOApp()
Initialize the details of the VisAOApp.
littlejoe_programset ReadProgramSet(Config_File &cfg)
Read a configuration file with the parameters of a little Joe Program SET.
int _ccdDefaultSpeed
Default speed.
int ComputeRepsExpTime(double et)
Computes the reps required to match a requested exptime.
std::string name
Name of the program set.
std::string _ccdName
CCD name.
void * ReprogramJoeThreadWorker(void *adata)
This is the thread start function for reprogramming the little joe.
int Run()
Overriden virtual function, called by Exec().