phaser-server  0.0.4
Classes | Public Member Functions | List of all members
RfPhaser Class Reference

Manage phasing operations. More...

#include <rfPhaser.h>

Inheritance diagram for RfPhaser:
Inheritance graph
[legend]
Collaboration diagram for RfPhaser:
Collaboration graph
[legend]

Public Member Functions

 RfPhaser (void)
 Construct an instance. More...
 
virtual void Halt (bool) override
 Halt phasing operations. More...
 
virtual void SetJob (Session &, PhaseJob *) override
 Set a new RF phasing job. More...
 
virtual void StopJob (Session &) override
 Destroy any existing RF phasing job. More...
 
virtual void PauseJob (Session &) override
 Pause execution of the RF phasing job. More...
 
virtual void ResumeJob (Session &) override
 Resume execution of the RF phasing job. More...
 
virtual void SkipCavity (Session &) override
 Skip the current cavity in the RF phasing job. More...
 
virtual void GetState (Session &) override
 Get the current state of the server. More...
 
virtual std::vector< std::string > GetCavityNames (void) override
 Get the names of eligible RF cavities. More...
 
virtual void PostProgress (unsigned, const std::string &) override
 Post progress of an activity to clients. More...
 
virtual bool Peek (bool=false) override
 Peek for client commands during phasing. More...
 
virtual void ApplyCorrections (Session &, const DbIds *) override
 Request phase corrections be applied. More...
 

Additional Inherited Members

- Public Types inherited from PhaseInterface
typedef std::vector< unsigned > DbIds
 

Detailed Description

Manage phasing operations.

The measuring and correcting of phase error is performed in an independent thread.

Constructor & Destructor Documentation

◆ RfPhaser()

RfPhaser::RfPhaser ( void  )

Construct an instance.

Note
CED information about the RF configuration is loaded here, therefore all RF cavity information access by any server software will not need to go to the CED. See 'rflib' documentation about RFdef::LinacManager.

Member Function Documentation

◆ ApplyCorrections()

void RfPhaser::ApplyCorrections ( Session client,
const DbIds *  ids 
)
overridevirtual

Request phase corrections be applied.

Parameters
client- The client that will receive the updates.
ids- Database IDs of cavities to be corrected.

Implements PhaseInterface.

◆ GetCavityNames()

vector< string > RfPhaser::GetCavityNames ( void  )
overridevirtual

Get the names of eligible RF cavities.

Returns
A collection of the cavity names.

Implements PhaseInterface.

◆ GetState()

void RfPhaser::GetState ( Session client)
overridevirtual

Get the current state of the server.

Note
This includes both the phasing job and server alert message.
Parameters
client- The client that will receive the updates.

Implements PhaseInterface.

◆ Halt()

void RfPhaser::Halt ( bool  )
overridevirtual

Halt phasing operations.

Note
This function runs in the context of a client session, only queuing the command to the independently running phaser thread. The passed parameter is ignored, waiting for thread exit always will happen.

◆ PauseJob()

void RfPhaser::PauseJob ( Session client)
overridevirtual

Pause execution of the RF phasing job.

Note
This function runs in the context of a client session, only queuing the command to the independently running phaser thread.
Exceptions
JobRequestWarningif there is no phasing job.

Implements PhaseInterface.

◆ Peek()

bool RfPhaser::Peek ( bool  canSkip = false)
overridevirtual

Peek for client commands during phasing.

Exceptions
Abortif server halt has been requested.
Interruptif job has been stopped or suspended.

Implements PhaseInterface.

◆ PostProgress()

void RfPhaser::PostProgress ( unsigned  percent,
const std::string &  activity 
)
overridevirtual

Post progress of an activity to clients.

Parameters
percent- Percent complete.
activity- The activity being completed.

Implements PhaseInterface.

◆ ResumeJob()

void RfPhaser::ResumeJob ( Session client)
overridevirtual

Resume execution of the RF phasing job.

Note
This function runs in the context of a client session, only queuing the command to the independently running phaser thread.
Exceptions
JobRequestWarningif there is no phasing job.

Implements PhaseInterface.

◆ SetJob()

void RfPhaser::SetJob ( Session client,
PhaseJob job 
)
overridevirtual

Set a new RF phasing job.

Parameters
client- The client that will receive the updates.
job- The phasing job, which must be created on the heap.
Note
This thread takes ownership of the passed job, deleting from the heap when appropriate.
This function runs in the context of a client session, only queuing the command to the independently running phaser thread.

Implements PhaseInterface.

◆ SkipCavity()

void RfPhaser::SkipCavity ( Session client)
overridevirtual

Skip the current cavity in the RF phasing job.

Note
This function runs in the context of a client session, only queuing the command to the independently running phaser thread.
Exceptions
JobRequestWarningif there is no phasing job.

Implements PhaseInterface.

◆ StopJob()

void RfPhaser::StopJob ( Session client)
overridevirtual

Destroy any existing RF phasing job.

Note
This function runs in the context of a client session, only queuing the command to the independently running phaser thread.

Implements PhaseInterface.


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