Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::InformationServer Class Referenceabstract

#include <InformationServer.h>

Inheritance diagram for sf::InformationServer:
Collaboration diagram for sf::InformationServer:

Public Types

enum  EState {
  issOff = 0 , issRun , issRecord , issPause ,
  issStop , issMaxState
}
 Enumerate for state of the info server. More...
 
enum  EClass { clA = 0 , clB , clC , clMaxClass }
 Variable/parameter class enumerator. More...
 
- Public Types inherited from sf::InformationTypes
typedef unsigned long long id_type
 Type used for the identifying integer (64-bits).
 
typedef int32_t flags_type
 Type used for the flag integer.
 
typedef size_t size_type
 Type used for size of vectors.
 
typedef uint64_t data_type
 Type used for containing a single data element which is the largest integer.
 
typedef int64_t sdata_type
 Type used for containing a single data element which is the largest signed integer.
 
typedef TVector< id_typeIdVector
 Vector for lists of information ID's.
 
typedef TVector< InformationBase * > Vector
 Vector for containing different information base derived classes.
 

Public Member Functions

 InformationServer ()
 Default constructor.
 
virtual ~InformationServer ()
 
void setup (const std::string &name, const std::string &namePrefix, long vid, long deviceMask, long serverMask)
 When device mask is non-zero, variables are added automatically on creation to this info server.
 
void flush ()
 Clears the instance. Also called from setup.
 
EState getState () const
 Gets the current state.
 
const char * getStateName (int state) const
 Gets the name of the passed state.
 
void setState (EState)
 Sets the current state.
 
bool isServerId (id_type id) const
 Determines if the passed id belongs to this info server.
 
void attachVariable (Variable *var, EClass cls)
 Adds a variable to the variables vector.
 
void detachVariable (Variable *var)
 
void attachResult (ResultData *res)
 
void detachResult (ResultData *res)
 
bool isGeneratingResults ()
 
virtual void onStateChange (EState prevState, EState nextState)=0
 
virtual void clearValidations ()
 

Additional Inherited Members

- Static Public Attributes inherited from sf::InformationTypes
static constexpr size_t npos = std::numeric_limits<size_type>::max()
 Unsigned size value indicating not found or no index.
 

Member Enumeration Documentation

◆ EClass

Variable/parameter class enumerator.

Enumerator
clA 

Parameters of this class will always be writable.

clB 

Parameters of this class should be read-only during measurement.

clC 

Parameters of this class effect the result-geometry, and should be read-only during measurement and recording.

clMaxClass 

Number of classes.

◆ EState

Enumerate for state of the info server.

Enumerator
issOff 

Not generating results.

issRun 

Generating results, and flushing.

issRecord 

Generating results, no flushing.

issPause 

Not generating results, saving parameters.

issStop 

Not generating results, saving results.

issMaxState 

Max states count.

Constructor & Destructor Documentation

◆ InformationServer()

sf::InformationServer::InformationServer ( )

Default constructor.

◆ ~InformationServer()

virtual sf::InformationServer::~InformationServer ( )
virtual

Destructor

Member Function Documentation

◆ attachResult()

void sf::InformationServer::attachResult ( ResultData res)

◆ attachVariable()

void sf::InformationServer::attachVariable ( Variable var,
EClass  cls 
)

Adds a variable to the variables vector.

◆ clearValidations()

virtual void sf::InformationServer::clearValidations ( )
virtual

Reimplemented in sf::RsaServer.

◆ detachResult()

void sf::InformationServer::detachResult ( ResultData res)

◆ detachVariable()

void sf::InformationServer::detachVariable ( Variable var)

◆ flush()

void sf::InformationServer::flush ( )

Clears the instance. Also called from setup.

◆ getState()

EState sf::InformationServer::getState ( ) const

Gets the current state.

◆ getStateName()

const char * sf::InformationServer::getStateName ( int  state) const

Gets the name of the passed state.

◆ isGeneratingResults()

bool sf::InformationServer::isGeneratingResults ( )

◆ isServerId()

bool sf::InformationServer::isServerId ( id_type  id) const

Determines if the passed id belongs to this info server.

◆ onStateChange()

virtual void sf::InformationServer::onStateChange ( EState  prevState,
EState  nextState 
)
pure virtual

Implemented in sf::RsaServer.

◆ setState()

void sf::InformationServer::setState ( EState  )

Sets the current state.

◆ setup()

void sf::InformationServer::setup ( const std::string &  name,
const std::string &  namePrefix,
long  vid,
long  deviceMask,
long  serverMask 
)

When device mask is non-zero, variables are added automatically on creation to this info server.

Parameters
nameName of the server.
namePrefixPrefix of the name.
vidVariable id of state parameter.
deviceMaskDevice vid mask of this server.
serverMaskServer vid mask of this server.

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