mswCHANGE_FOCUS
Section: Devices and Network Interfaces (4)
Updated: 2012-04-23 10:09
Index
Return to man pages list
NAME
mswCHANGE_FOCUS - Control telescope's focus change.
SYNOPSIS
#include "mswCHANGE_FOCUS.h"
class mswCHANGE_FOCUS : public evhDB_TASK
{
public:
mswCHANGE_FOCUS(mswMOD_LIST_MANAGER &listManager);
mswCHANGE_FOCUS(const dbSYMADDRESS dbPoint,
mswMOD_LIST_MANAGER &listManager);
~mswCHANGE_FOCUS();
virtual vltLOGICAL CheckPresetToZenith();
virtual vltINT32 CurrentFocus();
ccsCOMPL_STAT RegisterCallbacks(evhOBJ_CALLBACK okCB,
evhOBJ_CALLBACK errCB);
virtual ccsCOMPL_STAT Execute(msgMESSAGE &msg) = 0;
protected:
virtual mswCHANGE_FOCUS &CurrentFocus(vltINT32 currFoc);
virtual ccsCOMPL_STAT ReadMirrorsPos(vltINT32 *currFoc);
ccsCOMPL_STAT CheckPresetToZenith(msgMESSAGE &msg)
protected:
mswFOCUS focus;
mswMOD_LIST_MANAGER &modListManager;
msgMESSAGE chFocusMsg;
evhDB_CMD_SERIAL *M3Cmd;
msgMESSAGE M3Msg;
evhOBJ_CALLBACK chFocusOkCB;
evhOBJ_CALLBACK chFocusErrorCB;
}
PARENT CLASS
evhDB_TASK
DESCRIPTION
Base class to perform focus change. It is a pure virtual class.
Subclasses implements the real focus changing functionality taking
into account the specific telescope architecture (VLT, NTT).
PUBLIC METHODS
mswCHANGE_FOCUS(mswMOD_LIST_MANAGER &listManager);
mswCHANGE_FOCUS(const dbSYMADDRESS dbPoint,
mswMOD_LIST_MANAGER &listManager);
Two constructors are provided.
The second one receives as parameter the symbolic address of
online database support point for the object, i.e. the point
where the object can find configuration and run time values.
The first one defines the online database support point calling
the standard tcsDbRoot(4) function and appenting the
default relative path from the TCS database root point,
assuming a complete default TCS database structure.
It prepares all the internal structures. It reads from the database
the timeout value for the commands to be sent by means of internal
object and installs the callbacks to process the replies.
It computes from the mirrors position the current focus and saves
this value in the database.
~mswCHANGE_FOCUS()
Deletes all the internal structures created dynamically.
virtual vltLOGICAL CheckPresetToZenith();
Checks if the telescope is pointing to zenith.
Reads from the database the current altitude (with an indirect
addressing) and compares this value with a range around zenith
(90 deg).
virtual vltINT32 CurrentFocus();
Returns the current focus value as stored in the database.
ccsCOMPL_STAT RegisterCallbacks(evhOBJ_CALLBACK okCB,
evhOBJ_CALLBACK errCB);
Registers into the change focus object a success and an error
callback, which have to be called respectively either when
the change focus procedure has completed successfully or when
any error occurred. By means of these callbacks the program
flow comes back always under mswCONTROL_MAIN object control.
vltDOUBLE GetFocusOffset(void);
void SetFocusOffset(vltDOUBLE foffset);
vltLOGICAL IsSelectIntrument(msgMESSAGE &msg);
virtual ccsCOMPL_STAT CheckModeSwitchingState(vltINT32 actState,
vltINT32 actSubState);
virtual ccsCOMPL_STAT Execute(msgMESSAGE &msg) = 0;
Pure virtual function. It is overridden by the corresponding
function in the derived classes to implement the actual changing
focus procedure.
PROTECTED METHODS
virtual mswCHANGE_FOCUS &CurrentFocus(vltINT32 currFoc);
Stores the current focus value in the database.
virtual ccsCOMPL_STAT ReadMirrorsPos(vltINT32 *currFoc);
Computes the current focus by reading the mirrors positions.
Here only a default dummy implementation is provided, returning
always the initial focus defined in mswDefines.h by
mswSTARTING_FOCUS.
Every subclass should provide a proper implementation.
PROTECTED DATA MEMBERS
mswFOCUS focus;
Standard focur access object.
mswMOD_LIST_MANAGER &modListManager;
List manager object, used when accessing the msw database table.
msgMESSAGE chFocusMsg;
Message object to store received command in order to return
reply to the sender from the callbacks.
evhDB_CMD_SERIAL *M3Cmd;
Command object to send commands to M3 subsystem.
msgMESSAGE M3Msg;
Message object to store command to M3 subsystem.
evhOBJ_CALLBACK chFocusOkCB;
Callback function object to store the pointer to the
mswCONTROL_MAIN method, which is called when the change focus
procedure has completed successfully.
evhOBJ_CALLBACK chFocusErrorCB;
Callback function object to store the pointer to the
mswCONTROL_MAIN method, which is called when an error
occurred during the change focus procedure.
ON LINE DATABASE
The following database branch in the preset structure pertains
to the instance of mswCHANGE_FOCUS:
CLASS evhDB_TASK mswCHANGE_FOCUS
BEGIN
ATTRIBUTE INT32 currentFocus
ATTRIBUTE BYTES256 altAddr
ATTRIBUTE INT32 M3CmdTimeout
ATTRIBUTE evhDB_CMD_SERIAL M3Cmd
ENVIRONMENT
TCS_DBPOINT - TCs default database root point
SEE ALSO
evhDB_TASK(4), tcsDbRoot(4)
Index
- NAME
-
- SYNOPSIS
-
- PARENT CLASS
-
- DESCRIPTION
-
- PUBLIC METHODS
-
- PROTECTED METHODS
-
- PROTECTED DATA MEMBERS
-
- ON LINE DATABASE
-
- BEGIN
-
- ENVIRONMENT
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 10:09:27 GMT, April 23, 2012