17 #ifndef __GimbalMotorCtrl_h__
18 #define __GimbalMotorCtrl_h__
26 #include "hwlib/netseriallib.h"
85 GimbalMotorCtrl(std::string name,
const std::string& conffile)
throw (AOException);
180 virtual int sendCommand(std::string &com, std::string &resp,
int timeout);
223 #endif //__GimbalMotorCtrl_h__
int center()
Read the preset center position for current board conditions, and gimbal to it.
Declarations for a Newport ESP motor controller.
int x_addr
The controller address of the x axis.
int y_addr
The controller address of the y axis.
virtual std::string script_command(std::string com)
Overridden from VisAOApp_base::script_command, here just calls common_command.
int * powerOutletState
The power strip outlet controlling shutter power.
int getXMoving()
Get the moving status of the x axis.
double x_dark
The configurable location of the x dark location.
int xAxisNo
The axis number of x, e.g. 0.
int postHoming
When 1, the gimbal will center after homing.
pthread_mutex_t comMutex
Mutex for communicating with the controllers.
The standalone VisAO application, does not interface with the AO Supervisor.
int xMoving
Status of moving in the x direction.
std::string common_command(std::string com, int cmode)
The common command processor for commands received by fifo.
Declarations for the standalone VisAO application.
double get_x_pos()
Get the x position.
VisAO::filterwheel_status_board * fw2sb
pointer to status board of F/W 2 (for presets)
virtual int sendCommand(std::string &com, std::string &resp, int timeout)
Implementation of ESPMotorCtrl sendCommand.
bool isMoving
True if moving - set when move starts and updating data logger.
int savepreset()
Save the current position as the preset for this board setup.
The ESP motor controller class.
int getCurState()
Get the current process state.
VisAO software utilitites, declarations.
double scale
The conversion scale from encoder mm to arcsec on the CCD47, i.e. arcsec/mm.
int ip_port
ip port on which the motor controllers are connected
virtual int update_statusboard()
Update the gimbal status board.
int getYMoving()
Get the moving status of the y axis.
int setupNetwork()
Establish the serial-over-ip connection.
virtual void dataLogger(timeval tv)
Write gimbal positions to the data log.
int getPowerStatus()
Get the status of the power outlet.
double get_y_pos()
Get the y position.
The gimbal motor controller class.
void moveStop()
Called when a move stops, for data logging.
double y_center
The configurable location of the default x-center.
int power_outlet
Configuration variable, setting which power outlet to monitor.
VisAO::wollaston_status_board * wsb
pointer to status board of wollaston (for presets)
VisAO::aosystem_status_board * aosb
pointer to status board of VisAOI (for presets)
virtual void moveStart()
Called when a move starts, for data logging. Overriden from ESPMotorCtrl.
virtual std::string remote_command(std::string com)
Overridden from VisAOApp_base::remote_command, here just calls common_command.
power_status_board * psb
This is for monitoring power outlet state.
int checkConnStat()
Check connection status by querying the status of each controller. Changes curState.
int curState
The current controller state (READY, etc.)
virtual int Run()
The main loop.
double x_center
The configurable location of the default x-center.
double y_dark
The configurable location of the y dark location.
int yAxisNo
The axis number of y, e.g. 1.
virtual std::string local_command(std::string com)
Overridden from VisAOApp_base::local_command, here just calls common_command.
VisAO::filterwheel_status_board * fw3sb
pointer to status board of F/W 3 (for presets)
void Create()
Initialization common to both constructors.
std::string ip_addr
ip address of the serial converter
The namespace of VisAO software.
int dark()
Gimbal to the dark position.
GimbalMotorCtrl(std::string name, const std::string &conffile)
Standard constructor with a config file.
std::string get_state_str()
Get the state string.