Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::TMotionServer Class Reference

#include <GmiServer.h>

Collaboration diagram for sf::TMotionServer:

Classes

struct  ExtraInfo
 Structure placed in the TVariable's Data field for fast access to information. More...
 

Public Member Functions

 TMotionServer (gmi::Controller *controller, int device_nr=-1, const char *dev_name=nullptr)
 Constructor.
 
 ~TMotionServer ()
 Destructor.
 
void AddPropertyPages (PropertySheetDialog *sheet)
 Add the property sheets for this server to the given dialog.
 
const VariableGetVariable (int pid)
 Gets the owner variable that corresponds the motion interfaces parameter id.
 
bool IsLocked () const
 Returns true when all parameters are locked.
 
void SetLocked (bool flag)
 Locks the variables by making them all read only.
 

Protected Member Functions

unsigned GetAxisCount ()
 Gets the amount of axes for this implementation.
 
std::string GetAxisName (int axis)
 Gets the axis name of the given axis.
 
void CreateInterface ()
 Create interface parameters at construction once.
 
void DestroyInterface ()
 Remove all parameters and results.
 
unsigned VarListFind (int id) const
 Looks up a parameter which is represented the interface by the given id.
 
bool CreateVariable (Variable *&var, gmi::ParamInfo &info, std::string setup)
 Creates a variable with an extra info structure attached.
 
void DestroyVariable (Variable *var)
 Destroys a variable including the attached extra info structure.
 
std::string CreateSetupString (const gmi::ParamInfo &info, long vid)
 Creates a setup string from the passed parameter info structure.
 
void EvaluateInterfaceParams ()
 Evaluate parameters after the configuration has changed.
 
std::string GetNameOfs (const gmi::ParamInfo &info)
 Gets the name of the channel using the device name.
 
unsigned ResListFind (int id) const
 Looks up a result data which is represented the interface id.
 
ResultDataCreateResultData (gmi::ResultInfo &info, std::string setup)
 Creates a variable with an extra info structure attached.
 
void DestroyResultData (ResultData *var)
 Destroys a variable including the attached extra info structure.
 
std::string CreateSetupString (const gmi::ResultInfo &info, long vid)
 Creates a setup string from the passed result info structure.
 
void EvaluateInterfaceResults ()
 Evaluate results after the configuration has changed.
 
std::string GetNameOfs (const gmi::ResultInfo &info)
 Returns the name of the channel using the device name.
 
ExtraInfoCast (Variable *var) const
 Easy to use function to access the extra info from a variable.
 
ExtraInfoCast (ResultData *var) const
 Easy to use function to access the extra info from a result data.
 
void ClearValidations ()
 Overloaded from InfoServer.
 
void ServerVarHandler (Variable::EEvent event, const Variable &caller, Variable &linker, bool sameinst)
 
void ServerResHandler (ResultData::EEvent event, const ResultData &caller, ResultData &link, const Range &rng, bool same_inst)
 
void ParamNotify (int id)
 
void ResultNotify (int id)
 
void CheckReadOnly ()
 

Static Protected Member Functions

static void ParamNotifyProc (void *data, int id)
 
static void ResultNotifyProc (void *data, int id)
 

Protected Attributes

gmi::ControllerController
 Holds the acquisition implementation.
 
Variable VImplementation
 Variable for selecting an implementation.
 
VariableLinkHandler< TMotionServerSrvVarLink
 
TVariable::TPtrVector VarList
 
TResultDataLinkHandler< TMotionServerSrvResLink
 
TResultData::TPtrVector ResList
 
int DeviceNr
 
mstring DeviceName
 
bool FLock
 
long FHandledParamId
 
int VarHandlerEntryCount
 
const TVariable * VMovePos
 
const TVariable * VMoveVel
 

Static Protected Attributes

static unsigned ServerMap
 

Friends

class MotionVariablePropertyPage
 

Constructor & Destructor Documentation

◆ TMotionServer()

sf::TMotionServer::TMotionServer ( gmi::Controller controller,
int  device_nr = -1,
const char *  dev_name = nullptr 
)
explicit

Constructor.

Parameters
controller
device_nr
dev_name

◆ ~TMotionServer()

sf::TMotionServer::~TMotionServer ( )

Destructor.

Member Function Documentation

◆ AddPropertyPages()

void sf::TMotionServer::AddPropertyPages ( PropertySheetDialog sheet)

Add the property sheets for this server to the given dialog.

◆ Cast() [1/2]

ExtraInfo * sf::TMotionServer::Cast ( ResultData var) const
protected

Easy to use function to access the extra info from a result data.

◆ Cast() [2/2]

ExtraInfo * sf::TMotionServer::Cast ( Variable var) const
protected

Easy to use function to access the extra info from a variable.

◆ CheckReadOnly()

void sf::TMotionServer::CheckReadOnly ( )
protected

◆ ClearValidations()

void sf::TMotionServer::ClearValidations ( )
protected

Overloaded from InfoServer.

◆ CreateInterface()

void sf::TMotionServer::CreateInterface ( )
protected

Create interface parameters at construction once.

◆ CreateResultData()

ResultData * sf::TMotionServer::CreateResultData ( gmi::ResultInfo info,
std::string  setup 
)
protected

Creates a variable with an extra info structure attached.

Parameters
info
setup
Returns

◆ CreateSetupString() [1/2]

std::string sf::TMotionServer::CreateSetupString ( const gmi::ParamInfo info,
long  vid 
)
protected

Creates a setup string from the passed parameter info structure.

Parameters
info
vid
Returns

◆ CreateSetupString() [2/2]

std::string sf::TMotionServer::CreateSetupString ( const gmi::ResultInfo info,
long  vid 
)
protected

Creates a setup string from the passed result info structure.

Parameters
info
vid
Returns

◆ CreateVariable()

bool sf::TMotionServer::CreateVariable ( Variable *&  var,
gmi::ParamInfo info,
std::string  setup 
)
protected

Creates a variable with an extra info structure attached.

Parameters
var
info
setup
Returns
True when

◆ DestroyInterface()

void sf::TMotionServer::DestroyInterface ( )
protected

Remove all parameters and results.

◆ DestroyResultData()

void sf::TMotionServer::DestroyResultData ( ResultData var)
protected

Destroys a variable including the attached extra info structure.

Parameters
var

◆ DestroyVariable()

void sf::TMotionServer::DestroyVariable ( Variable var)
protected

Destroys a variable including the attached extra info structure.

Parameters
var

◆ EvaluateInterfaceParams()

void sf::TMotionServer::EvaluateInterfaceParams ( )
protected

Evaluate parameters after the configuration has changed.

◆ EvaluateInterfaceResults()

void sf::TMotionServer::EvaluateInterfaceResults ( )
protected

Evaluate results after the configuration has changed.

◆ GetAxisCount()

unsigned sf::TMotionServer::GetAxisCount ( )
protected

Gets the amount of axes for this implementation.

◆ GetAxisName()

std::string sf::TMotionServer::GetAxisName ( int  axis)
protected

Gets the axis name of the given axis.

Parameters
axisAxis number as in #EAxisLocation
Returns

◆ GetNameOfs() [1/2]

std::string sf::TMotionServer::GetNameOfs ( const gmi::ParamInfo info)
protected

Gets the name of the channel using the device name.

Parameters
infoParameter in formation.
Returns
Name offset.

◆ GetNameOfs() [2/2]

std::string sf::TMotionServer::GetNameOfs ( const gmi::ResultInfo info)
protected

Returns the name of the channel using the device name.

Parameters
info
Returns

◆ GetVariable()

const Variable & sf::TMotionServer::GetVariable ( int  pid)

Gets the owner variable that corresponds the motion interfaces parameter id.

Parameters
pidParameter id
Returns
Corresponding variable.

◆ IsLocked()

bool sf::TMotionServer::IsLocked ( ) const
inline

Returns true when all parameters are locked.

Returns
True when locked.

◆ ParamNotify()

void sf::TMotionServer::ParamNotify ( int  id)
protected

◆ ParamNotifyProc()

static void sf::TMotionServer::ParamNotifyProc ( void *  data,
int  id 
)
staticprotected

◆ ResListFind()

unsigned sf::TMotionServer::ResListFind ( int  id) const
protected

Looks up a result data which is represented the interface id.

Parameters
id
Returns

◆ ResultNotify()

void sf::TMotionServer::ResultNotify ( int  id)
protected

◆ ResultNotifyProc()

static void sf::TMotionServer::ResultNotifyProc ( void *  data,
int  id 
)
staticprotected

◆ ServerResHandler()

void sf::TMotionServer::ServerResHandler ( ResultData::EEvent  event,
const ResultData caller,
ResultData link,
const Range rng,
bool  same_inst 
)
protected

◆ ServerVarHandler()

void sf::TMotionServer::ServerVarHandler ( Variable::EEvent  event,
const Variable caller,
Variable linker,
bool  sameinst 
)
protected

◆ SetLocked()

void sf::TMotionServer::SetLocked ( bool  flag)

Locks the variables by making them all read only.

Parameters
flagLocking state.

◆ VarListFind()

unsigned sf::TMotionServer::VarListFind ( int  id) const
protected

Looks up a parameter which is represented the interface by the given id.

Parameters
id
Returns

Friends And Related Symbol Documentation

◆ MotionVariablePropertyPage

friend class MotionVariablePropertyPage
friend

Member Data Documentation

◆ Controller

gmi::Controller* sf::TMotionServer::Controller
protected

Holds the acquisition implementation.

◆ DeviceName

mstring sf::TMotionServer::DeviceName
protected

◆ DeviceNr

int sf::TMotionServer::DeviceNr
protected

◆ FHandledParamId

long sf::TMotionServer::FHandledParamId
protected

◆ FLock

bool sf::TMotionServer::FLock
protected

◆ ResList

TResultData::TPtrVector sf::TMotionServer::ResList
protected

◆ ServerMap

unsigned sf::TMotionServer::ServerMap
staticprotected

◆ SrvResLink

TResultDataLinkHandler<TMotionServer> sf::TMotionServer::SrvResLink
protected

◆ SrvVarLink

VariableLinkHandler<TMotionServer> sf::TMotionServer::SrvVarLink
protected

◆ VarHandlerEntryCount

int sf::TMotionServer::VarHandlerEntryCount
protected

◆ VarList

TVariable::TPtrVector sf::TMotionServer::VarList
protected

◆ VImplementation

Variable sf::TMotionServer::VImplementation
protected

Variable for selecting an implementation.

◆ VMovePos

const TVariable* sf::TMotionServer::VMovePos
protected

◆ VMoveVel

const TVariable* sf::TMotionServer::VMoveVel
protected

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