61 int ShutterControl::set_last_t(
double lt)
67 int ShutterControl::open_shutter(
void *adata)
80 if(do_shutter_open(adata) == 0)
92 std::cerr <<
"Error in do_shutter_open()\n";
100 int ShutterControl::close_shutter(
void *adata)
114 if(do_shutter_close(adata) == 0)
124 std::cerr <<
"Error in do_shutter_close()\n";
132 int ShutterControl::set_state(
int st)
135 if(st > 0)
return open_shutter();
136 else return close_shutter();
140 int ShutterControl::get_state()
154 int ShutterControl::get_sw_state()
159 int ShutterControl::get_hw_state()
164 double ShutterControl::get_curr_t()
169 gettimeofday(&
tp, 0);
176 int ShutterControl::do_shutter_open(
void *adata)
181 int ShutterControl::do_shutter_close(
void *adata)
186 int ShutterControl::start_ShutterControl()
191 int ShutterControl::shutdown_ShutterControl()
Declarations for a generic shutter controller.
double dead_time
Time to wait between commanded changes in state.
ShutterControl()
Default constructor.
int initialize_ShutterControl()
Sets the basic parameters to default values.
double last_t
the time of the last commanded change in state
int hw_state
1 is open, -1 is shut, 0 is unknown
int sw_state
1 is open, -1 is shut, 0 is unknown
double curr_t
the current time
timeval tp
for use in getting system time
bool ignore_hw_state
For when hw_state is unavailable.