#include <frame_source.hh>
Public Types | |
| typedef frame_loc::gps_type | gps_type |
| typedef frame_loc::arch_type | arch_type |
| typedef std::vector< frame_loc > | loc_vector |
| typedef std::map< std::string, loc_vector > | frame_map |
| typedef frame_map::value_type | frmap_node |
| typedef frame_map::const_iterator | const_frmap_iter |
| typedef frame_map::iterator | frmap_iter |
Public Member Functions | |
| frame_source (void) | |
| Default frame_source database constructor. | |
| ~frame_source (void) | |
| Destructor. | |
| std::ostream & | dump (std::ostream &out, int level=1) const |
| Dump the lists. | |
| const frame_loc & | find (const std::string &type, gps_type gps) const |
| Find a frame location. | |
| void | insert (const frame_loc &loc) |
| Insert frame location int a source list. | |
| void | read (const std::string &file) |
| Read a frame source file. | |
The frame_source class contains several lists of frame locastions, one list for each archive level. The lists contain all information necessary to decide on a most easily available source and to get the driver and file name for the source. The lists are populated from one or more ascii files read by the read() method. The read() method documentation descries these files.
GPS time representation type.
Archive level ennumeration type .
| typedef std::vector<frame_loc> sends::frame_source::loc_vector |
Frame location list (vector) type.
| typedef std::map<std::string, loc_vector> sends::frame_source::frame_map |
Define frame source map type.
| typedef frame_map::value_type sends::frame_source::frmap_node |
Define frame source map node type.
| typedef frame_map::const_iterator sends::frame_source::const_frmap_iter |
Define constant frame source map iterator type.
| typedef frame_map::iterator sends::frame_source::frmap_iter |
Define frame map iterator type.
| sends::frame_source::frame_source | ( | void | ) |
Default frame_source database constructor.
Construct a Frame Source database. All the lists are constructed but left empty.
| sends::frame_source::~frame_source | ( | void | ) |
Destructor.
Frame source database destructor.
| std::ostream& sends::frame_source::dump | ( | std::ostream & | out, | |
| int | level = 1 | |||
| ) | const |
Dump the lists.
Dump the contents of all the frame source lists.
| out | Output stream. |
Find a frame location.
Find a frame location for the specified type and gps time. The search iterates over all the lists in the order online, cache, archive, offline. The first valid location found in this sequence is returned.
| type | Frame type prefix string. | |
| gps | GPS time to be found. |
| runtime_error | is thrown if no frame is found. |
| void sends::frame_source::insert | ( | const frame_loc & | loc | ) |
Insert frame location int a source list.
Insert the specified frame location into the appropriate list. The list is selected by the archive type field in the frame_loc and the frame type (key) is provided by the prefix field of the frame_loc.
| loc | Frame_loc block to be inserted into the list. |
| void sends::frame_source::read | ( | const std::string & | file | ) |
Read a frame source file.
Read a list of frame locations from a flat ascii file and use them to fill in the frame source tables. The input file contains a 7-column table with one row per line. Comments may be added by including a '#' at the start of the line or after all text on the line, and lines may be continued by terminating the line with a backslash. The columns are separated by one or more white-space (space or tab) characters and contain the following information.
| Column | Contents |
| 1 | Frame site and type, e.g "H-RDS_R_L1" |
| 2 | Start GPS of first frame |
| 3 | End GPS of last frame |
| 4 | Time duration of all frame in list |
| 5 | Archive type, i.e. "online", "cache", "archive", or offline |
| 6 | Driver type, i.e. "local", "qfs", "sends", "smem" or "unknown". "-" may be specified for a arch-dependent default. |
| 7 | Source path. The path for local and qfs data may contain fields derived from the GPS time, e.g. "%d" will be replaced byb the gps time and "%3d" ill be replace by the first 3 decimal digits of the gps |
| file | Path to source file. |
1.5.5