The framegrabber specialization for the CCD39. More...
#include <framegrabber39.h>
 Inheritance diagram for VisAO::framegrabber39:
 Inheritance diagram for VisAO::framegrabber39:| Public Member Functions | |
| framegrabber39 (int argc, char **argv) throw (AOException) | |
| framegrabber39 (std::string name, const std::string &conffile) throw (AOException) | |
| virtual int | start_framegrabber () | 
| Override this: it is where your framegrabber should do all its work. Check for !STOP_FRAMEGRABBER and !TimeToDie. | |
| virtual int | stop_framegrabber () | 
| Override this: framegrabber clean up. | |
| virtual int | update_statusboard () | 
| Update the status board.  More... | |
|  Public Member Functions inherited from VisAO::framegrabber< unsigned char > | |
| framegrabber (int argc, char **argv) throw (AOException) | |
| framegrabber (std::string, const std::string &conffile) throw (AOException) | |
| virtual int | Run () | 
| Main loop, normally won't need to be overridden. | |
| int | postGetImage () | 
| Call this immediately after getting each frame. updates frameNo and saves the init file. | |
| int | send_ping () | 
| Sends a ping to the waiting process (usuallly a framewriter).  More... | |
| int | copyto_sharedim_short (unsigned char *im) | 
| Copies the image data to shared memory, as shorts. | |
| int | copyto_sharedim_short_rotated (unsigned char *im) | 
| Copies the image data to shared memory, as shorts, rotated by 90 degrees. | |
| int | copyto_sharedim_short_deintlv_rotated (unsigned char *im) | 
| Copies the image to data to shared memory, as shorts, rotated by 90 degrees, with DALSA 2 channel de-interleaving. | |
| std::string | local_command (std::string com) | 
| Called by __local_command after control state logic.  More... | |
| std::string | script_command (std::string com) | 
| Called by __script_command after control state logic.  More... | |
| std::string | auto_command (std::string com, char *seqmsg) | 
| Processing for auto commands - to be overriden.  More... | |
| std::string | common_command (std::string com, int cmode) | 
|  Public Member Functions inherited from VisAO::VisAOApp_standalone | |
| VisAOApp_standalone () throw (AOException) | |
| Default constructor. | |
| VisAOApp_standalone (string name, int id, int logLevel=Logger::LOG_LEV_INFO) throw (AOException) | |
| Complicated constructor. | |
| void | set_conffile (std::string name) throw (AOException) | 
| VisAOApp_standalone (std::string name, const std::string &conffile) throw (AOException) | |
| Config file constructor. | |
| void | set_conffile (std::string name, const std::string &conffile) throw (AOException) | 
| For use if default constructed. | |
| VisAOApp_standalone (int argc, char **argv) throw (AOException) | |
| Command line constructor. | |
| void | usage () | 
| virtual std::string | get_app_name () | 
| Get the application name. | |
| void | log_msg (int LogLevel, std::string lmsg) | 
| Report an error. Also calls log_msg. Overloaded from VisAOApp_base.  More... | |
| virtual int | Exec () | 
| Installs the term and XXXX signal handlers, and calls Run().  More... | |
| void | signal_catcher () | 
| Signal loop, normally won't need to be overridden.  More... | |
| virtual int | start_signal_catcher (bool inherit_sched=true) | 
| Starts the signal catching loop.  More... | |
| virtual int | install_sig_mainthread_catcher () | 
| Install the SIG_MAINTHREAD signal catcher. | |
| virtual int | block_signal (int signum) | 
| Sets the signal mask to block signal signum. | |
| virtual int | block_sigio () | 
| Sets the signal mask to block SIGIO and RTSIGIO. | |
| virtual int | kill_me () | 
| Handle a timetodie condition upon exiting the signal catcher thread (e.g. tell main thread it is about to die)  More... | |
|  Public Member Functions inherited from VisAO::VisAOApp_base | |
| VisAOApp_base () | |
| Default constructor. | |
| virtual | ~VisAOApp_base () | 
| Virtual destructor. | |
| int | set_euid_called () | 
| Changes the user id of the process to euid_called. | |
| int | set_euid_real () | 
| Changes the user id fo the process to the real user id. | |
| int | set_RT_priority (int prio) | 
| Set the real-time priority of the current process.  More... | |
| int | get_RT_priority () | 
| Get the real-time priority of the current process. | |
| int | set_app_name (std::string an) | 
| Set the application name. | |
| virtual int | setup_baseApp (bool usethreads=false) | 
| Install fifo channels.  More... | |
| virtual int | setup_baseApp (bool remfifo, bool locfifo, bool scrfifo, bool autfifo, bool usethreads=false) | 
| Create fifo names, then installs the fifo channels.  More... | |
| int | setup_fifo_list (int nfifos) | 
| Allocate the fifo_list.  More... | |
| int | connect_fifo_list () | 
| Connect the fifo_list with exclusive locking.  More... | |
| int | connect_fifo_list_nolock () | 
| Connect the fifo_list without exclusive locking.  More... | |
| int | setup_sigio () | 
| Setup the SIGIO signal handling.  More... | |
| int | setup_RTsigio () | 
| Setup SIGIO signal handling using realtime signals.  More... | |
| int | check_fifo_list_RTpending () | 
| Check for pending reads for the fifo list while using the RT signals. | |
| int | write_fifo_channel (int ch, const char *com, int comlen, std::string *resp) | 
| Write data to a fifo_channel, and get a response if desired.  More... | |
| int | write_fifo_channel (int ch, const char *com, int comlen, std::string *resp, char *sm) | 
| Write data to a fifo_channel, with a sequence message attached, and get a response if desired.  More... | |
| int | get_fifo_channel_response (std::string *resp, int ch) | 
| Check, and wait if neccessary, for data on a fifo channel.  More... | |
| int | set_wait_to (double to) | 
| Set the wait timeout for fifo channel responses.  More... | |
| double | get_wait_to () | 
| Get the wait timeout for fifo channel responses.  More... | |
| virtual int | request_control (int cmode) | 
| Calls request_control(cmode, 0). | |
| virtual int | request_control (int cmode, bool override) | 
| Attempts to change the control type.  More... | |
| virtual std::string | __remote_command (std::string com, char *seqmsg) | 
| Processing for remote commands.  More... | |
| virtual std::string | remote_command (std::string com) | 
| Called by __remote_command after control state logic.  More... | |
| virtual std::string | remote_command (std::string com, char *seqmsg) | 
| virtual std::string | __local_command (std::string com, char *seqmsg) | 
| Processing for local commands.  More... | |
| virtual std::string | local_command (std::string com, char *seqmsg) | 
| virtual std::string | __script_command (std::string com, char *seqmsg) | 
| Processing for script commands - not normally overriden.  More... | |
| virtual std::string | script_command (std::string com, char *seqmsg) | 
| virtual std::string | post_auto_command (std::string com, char *seqmsg=0) | 
| Processing for auto commands - not normally overriden.  More... | |
| std::string | control_mode_string () | 
| Convenience function to return the control type string, e.g. "REMOTE". | |
| std::string | control_mode_response () | 
| Convenience function to return the control type response string, e.g. "A\n". | |
| virtual void | error_report (int LogLevel, std::string emsg) | 
| Report an error. Also calls log_msg.  More... | |
| VisAO::profiler * | get_profile () | 
| int | get_use_profiler () | 
| int | start_profiler () | 
| void * | get_statusboard_shmemptr () | 
| Get the status board shared memory pointer.  More... | |
| int | set_statusboard_shmemkey (key_t mkey) | 
| Set the status board shared memory key. Does nothing else.  More... | |
| key_t | get_statusboard_shmemkey () | 
| Get the status board shared memory key.  More... | |
| virtual void | dataLogger (timeval tv) | 
| Log data at intervals. | |
| Protected Member Functions | |
| void | init_framegrabber39 () | 
| ebt_ulog_packet_msg_t * | ulog_get_packet () | 
|  Protected Member Functions inherited from VisAO::framegrabber< unsigned char > | |
| void | Create () | 
| Processes the config file. | |
| int | addto_dark () | 
| int | save_init () | 
| Save the initialization data to disk. | |
| int | delete_init () | 
| Delete the initialization file. | |
|  Protected Member Functions inherited from VisAO::VisAOApp_base | |
| int | create_statusboard (size_t sz) | 
| Creates and attaches to the statusboard shared memory.  More... | |
| std::string | getDataFileName () | 
| int | checkDataFileOpen () | 
| Protected Attributes | |
| int | frameSizeDw | 
| int | _frameSizeBytes | 
| int | _packetsPerFrame | 
| size_t | curr_len | 
| double | t0 | 
| Starting time of framegrabber loop. | |
| int | pktcnt | 
| int | rcvbufsize | 
| char | buf [BUFLEN] | 
| int | sfd | 
| ebt_ulog_packet_msg_t * | msg | 
| struct ethhdr * | ehdr | 
| struct ethertypeent * | etype | 
| struct protoent * | prototype | 
| struct iphdr * | iph | 
| std::vector< int > | bcuLUT | 
|  Protected Attributes inherited from VisAO::framegrabber< unsigned char > | |
| u_char * | image_p | 
| Pointer to the current image data. | |
| int | width | 
| Image width. | |
| int | bias_width | 
| Width of bias stripe (if any) | |
| int | height | 
| Image height. | |
| int | bias_height | 
| Height of bias stripe (if any) | |
| int | depth | 
| Image bit depth. | |
| int | frameNo | 
| For use as a running tally of images captured. | |
| sharedim_stack< unsigned char > | sis | 
| The shared memory ring buffer for image storage. | |
| sharedim< unsigned char > * | sim | 
| Pointer to a shared memory image. | |
| int | shmem_key | 
| The key for the shared memory. | |
| int | dark_shmem_key | 
| The key for the darks shared memory. | |
| int | num_sharedim | 
| The number of shared images available in the buffer. | |
| size_t | max_imsize | 
| The maximum size (x*y) of images that will be put in this buffer. | |
| int | hasWriterPing | 
| If true, open fifo for pinging the framewriter. | |
| int | writerPingEnabled | 
| Send pings on frame ready when true. | |
| int | writerPingChan | 
| The fifo channel for the writer pings. | |
| int | saves_remaining | 
| Number pings left to issue. | |
| int | num_skip | 
| The number of frames to skip between pings. | |
| int | skips_remaining | 
| Skips remaining. | |
| int | hasServerPing | 
| If true, open fifo for pinging the frame server. | |
| int | serverPingEnabled | 
| Send pings on frame ready when true. | |
| int | serverPingChan | 
| The fifo channel for the writer pings. | |
| int | STOP_FRAMEGRABBER | 
| If true, framegrabber stops at top of next loop. | |
| int | RUNNING | 
| Status of framegrabber. | |
| int | sh_i | 
| Convenience variable for loops. | |
| int | sh_j | 
| Convenience variable for loops. | |
| timeval | tv | 
| Convenience variable for filling in the frame time in the image header. | |
| timeval | tv_dma | 
| Convenience variable for filling in the dma timestamp. | |
| sharedim_stack< unsigned char > | dark_sis | 
| The shared memory ring buffer for image storage. | |
| sharedim< unsigned char > * | dark_sim | 
| Pointer to a shared memory image. | |
| std::vector< unsigned char > | dark_temp | 
| Temporary data storage for dark calculations. | |
| int | calc_dark | 
| int | no_darks_added | 
| int | init_save_interval | 
|  Protected Attributes inherited from VisAO::VisAOApp_standalone | |
| std::string | init_file | 
| Config_File * | init_vars | 
| pthread_t | main_thread | 
| Identifier for the main thread. | |
| pthread_t | signal_thread | 
| Identifier for the separate signal handling thread. | |
| pthread_mutex_t | signal_mutex | 
| Mutex for the condition signaling. | |
| pthread_cond_t | signal_cond | 
| Condition for telling main thread that something changed. | |
| double | signalth_sleeptime | 
|  Protected Attributes inherited from VisAO::VisAOApp_base | |
| std::string | app_name | 
| The name of the application. | |
| double | pause_time | 
| Time to pause during application main loop. | |
| fifo_list | fl | 
| The list of named-pipe fifos used for inter-process comms. | |
| std::string | com_path | 
| The control fifo path base name. | |
| std::string | com_path_remote | 
| The path for the remote control fifos. | |
| std::string | com_path_local | 
| The path for the local control fifos. | |
| std::string | com_path_script | 
| The path for the script control fifos. | |
| std::string | com_path_auto | 
| The path for the auto control fifos. | |
| double | wait_to | 
| The timeout for waiting on responses from FIFOs in seconds. | |
| std::ostringstream | logss | 
| Conveninence string stream for building log messages. | |
| VisAO::profiler * | profile | 
| std::string | profile_path | 
| int | use_profiler | 
| void * | statusboard_shmemptr | 
| The pointer to the shared memory block for the statusboard. | |
| key_t | statusboard_shmemkey | 
| The key used to lookup the shared memory. | |
| int | statusboard_shmemid | 
| The ID of the shared memory block. | |
| std::ofstream | dataof | 
| bool | dataFileOpen | 
| double | dataFileOpenTime | 
| double | data_log_time_length | 
| std::string | data_save_path | 
| std::string | data_file_prefix | 
| Static Protected Attributes | |
| static const int | _FRAME_HEADER_SIZE_DW = 4 | 
|  Static Protected Attributes inherited from VisAO::VisAOApp_standalone | |
| static Logger * | _logger = NULL | 
|  Static Protected Attributes inherited from VisAO::VisAOApp_base | |
| static int | control_mode = VisAOApp_base::CMODE_NONE | 
| The current control mode.  More... | |
| static int | default_control_mode = -1 | 
| The default control mode.  More... | |
| Additional Inherited Members | |
|  Public Types inherited from VisAO::VisAOApp_base | |
| enum | control_modes { CMODE_NONE, CMODE_REMOTE, CMODE_LOCAL, CMODE_SCRIPT, CMODE_AUTO, CMODE_max } | 
| The control modes. | |
|  Static Public Member Functions inherited from VisAO::VisAOApp_standalone | |
| static const std::string & | ConfigFile () | 
| static const std::string & | MyName () | 
| static const std::string & | MyFullName () | 
| static int | ID () | 
| static Config_File & | ConfigDictionary () | 
| static int | Verbosity () | 
| static string | getConffile (string identity) | 
| Return configuration file path based on identity. | |
|  Public Attributes inherited from VisAO::VisAOApp_base | |
| pthread_mutex_t | my_mutex | 
| Mutex used by the threaded versions of the standard command handlers. | |
|  Static Protected Member Functions inherited from VisAO::VisAOApp_standalone | |
| static void | SetMyName (const std::string &name) | 
| static void | SetConfigFile (const std::string &conffile) throw (Config_File_Exception) | 
| static void | SetID (int id) | 
This class uses the bcu ethernet bridge to transparently grab BCU39 frames, and writes them a sharedim_stack. Does not interface with the BCU 39 in anyway.
See framegrabber for a list of config file options.
See VisAOApp_standalone for command line arguments. There are no additional command line arguments for a basic framegrabber, though derived clases may add them.
See framegrabber for the commands accepted by this class.
Definition at line 79 of file framegrabber39.h.
| 
 | virtual | 
Overridden from VisAOApp_base
| 0 | on success | 
| -1 | on failure | 
Reimplemented from VisAO::VisAOApp_base.
Definition at line 367 of file framegrabber39.cpp.
References get_curr_time(), VisAO::framegrabber< unsigned char >::RUNNING, VisAO::framegrabber< unsigned char >::serverPingEnabled, VisAO::VisAOApp_base::statusboard_shmemptr, t0, VisAO::VisAOApp_base::update_statusboard(), and VisAO::framegrabber< unsigned char >::writerPingEnabled.