phaser-server  0.0.2
Public Member Functions | List of all members
JobSet Class Reference

Manage objects related the RF cavity phasing job. More...

#include <jobSet.h>

Public Member Functions

 JobSet (void)
 Construct an instance. More...
 
 ~JobSet (void)
 Destroy an instance. More...
 
void StartJob (PhaseJob *)
 Start a new RF phasing job. More...
 
void RemoveJob (const char *)
 Remove any outstanding job. More...
 
PhaseJobSetPaused (bool)
 Pause or resume the job phasing. More...
 
void SetMessage (const char *, bool=false)
 Set the client job status message. More...
 
bool IsExecuting (void) const
 Is there an executing cavity phasing job? More...
 
void DbFault (const char *)
 The results database is unavailable. More...
 
PhaseJobGetJob (void)
 Access the phasing job object.
 
ResultsDbGetDb (void)
 Access the database interface object.
 
const std::string & GetMessage (void) const
 Access the job's status message.
 
bool IsAlert (void) const
 Is the job status in alert?
 
std::ofstream & GetLog (void)
 Access the raw data log.
 

Detailed Description

Manage objects related the RF cavity phasing job.

The objects managed include the 'PhaseJob', 'ResultsDb', and the job message string.

Constructor & Destructor Documentation

◆ JobSet()

JobSet::JobSet ( void  )

Construct an instance.

Note
The job and database pointers are initialized an null, and the message empty.

◆ ~JobSet()

JobSet::~JobSet ( void  )

Destroy an instance.

Free any remaining job and database objects.

Member Function Documentation

◆ DbFault()

void JobSet::DbFault ( const char *  fault)

The results database is unavailable.

Destroy the phasing job and log an error to both the server log file and the client status message.

Parameters
fault- Specific fault information.

◆ IsExecuting()

bool JobSet::IsExecuting ( void  ) const

Is there an executing cavity phasing job?

To be true, there must be a phasing job and it must not be paused.

Returns
True if an executing job exists.

◆ RemoveJob()

void JobSet::RemoveJob ( const char *  reason)

Remove any outstanding job.

Note
It is not an error when there is no current job.
Clients are notified of the null job.
Parameters
reason- Reason job was removed.

◆ SetMessage()

void JobSet::SetMessage ( const char *  msg,
bool  alert = false 
)

Set the client job status message.

Note
Clients are notified of the new message.
Parameters
msg- The new status message.
alert- Is this an alert severity message?

◆ SetPaused()

PhaseJob * JobSet::SetPaused ( bool  pause)

Pause or resume the job phasing.

Parameters
pause- Pause or resume?

◆ StartJob()

void JobSet::StartJob ( PhaseJob job)

Start a new RF phasing job.

Note
A previous job is destroyed, however no null job notifications are sent for the temporary null state.
The job is destroyed if the results database is unavailable. In this case the server log is updated as well as the client status message.
Parameters
job- The new phasing job.

The documentation for this class was generated from the following files: