// Various include files
#include "RetCodes.h"
#include "BeltMsg.h"
#include "QPager.h"
// #include "wheresub.h"
#include "y2k.h"
#include "Ymdhms.h"
#include "TimeRep.h"
#include "TimeStamp.h"
#include "Duration.h"
// Definition of the maximum length of a CUBE computer page
const int MAX_COMP_PAGE = 256;
BeltMsg::BeltMsg() : DBScript() //What does the '::' mean?
{
}
BeltMsg::~BeltMsg() //What does '~' in front of BeltMsg mean?
{
}
int BeltMsg::Run()
{
Origin or;
Magnitude mag;
qpager_data_type qpage;
char belttext[MAX_COMP_PAGE];
// Get the origin
or = (*(event.origins.begin()));
// Get the magnitude
mag = (*(or.mags.begin()));
// Initialize the QPager routines
QInit(townfile, faultfile);
// Create and send pages
strcpy(qpage.message_type, "Event");
qpage.event_id = event.evid;
strcpy(qpage.data_source, "Pasadena");
qpage.event_version = nmod;
// Create ymdhms from the eqtime.long()
struct ymdhms localtim;
struct ymdhms gmttim;