European
Southern
Observatory

ESO — Reaching New Heights in Astronomy

Countries taking part in the ESO

VLT Software Documentation

trkwsSELF_CMD Class Reference

See man page trkwsSELF_CMD(4)
More...

#include <trkwsSELF_CMD.h>

List of all members.

Public Member Functions

 trkwsSELF_CMD ()
 ~trkwsSELF_CMD ()
ccsCOMPL_STAT SetReplyHandler (evhCALLBACK &cb)
ccsCOMPL_STAT SetErrorHandler (evhCALLBACK &cb)
ccsCOMPL_STAT Send (const msgCMD cmdName, const char *format,...)
void ResetCBs ()
void Reset ()
vltLOGICAL IsActive ()
void SetDescription (const char *setdescription)

Protected Member Functions

evhCB_COMPL_STAT ReplyCB (msgMESSAGE &msg, void *)
evhCB_COMPL_STAT ErrorCB (msgMESSAGE &msg, void *)

Private Attributes

evhCOMMAND command
fndSTRING description
evhCALLBACK * userReplyCB
evhCALLBACK * userErrorCB

Detailed Description

See man page trkwsSELF_CMD(4)
Manpage of trkwsSELF_CMD

trkwsSELF_CMD

Section: Devices and Network Interfaces (4)
Updated: 2012-04-23 10:11
Index Return to man pages list
 

NAME

trkwsSELF_CMD - send command to own process

 

SYNOPSIS


#include <trkwsSELF_CMD.h>
trkwsSELF_CMD selfCmd();

 

PARENT CLASS


evhSIMPLE_TASK (just to get eccsERROR_CLASS and fndOBJECT)

 

DESCRIPTION


In complex modules it is often the case that there are low level commands,
providing some basic functionality and high level commands, executing by
using sequences of low level commands. One way to implement this is to let
high level command handlers send low level commands to the own process.

This class provides an easy way to send a command to the own process and
handle the replies.

The self-command may complete whith either a normal reply or an error
reply. A timeout makes no sense for a self-command, because the low level
command already has one and returns an error reply on expiration.

The class offers one way how to process the replies to the self-command:
1. The user specifies a callback which shall be invoked.

 

PUBLIC METHODS


trkwsSELF_CMD();
~trkwsSELF_CMD();

void Send(msgCMD cmdName, const char *format, ...);
    Build a parameter buffer from the given format and parameters (like in
    printf) and send it with the given command to the own process.

void Reset();
    Resets the command if it is active by de-installing the reply handlers,
    i.e. replies to that command are simply ignored. After that the object
    is ready to send a new command.

vltLOGICAL IsActive();
    Returns ccsTRUE if a command is currently active, i.e. replies are
    pending.

 

PROTECTED METHODS


evhCB_COMPL_STAT ReplyCB(msgMESSAGE &msg, void *);
evhCB_COMPL_STAT ErrorCB(msgMESSAGE &msg, void *);
    Handlers for normal and error replies to the self-command. If user
    reply callbacks are installed they are invoked by these handlers,
    otherwise a normal or error reply is passed on to the given command
    handler.

 

PRIVATE DATA MEMBERS


evhCOMMAND        command;     // command which sent internally
fndSTRING         description; // description of purpose for error logging
evhCALLBACK      *userReplyCB; // user's reply handler
evhCALLBACK      *userErrorCB; // user's error reply handler

 

SEE ALSO


evhCOMMAND


 

Index

NAME
SYNOPSIS
PARENT CLASS
DESCRIPTION
PUBLIC METHODS
PROTECTED METHODS
PRIVATE DATA MEMBERS
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 10:11:26 GMT, April 23, 2012

Definition at line 38 of file trkwsSELF_CMD.h.


Constructor & Destructor Documentation

trkwsSELF_CMD::trkwsSELF_CMD (  ) 
trkwsSELF_CMD::~trkwsSELF_CMD (  ) 

Definition at line 105 of file trkwsSELF_CMD.C.

References DELETE_OBJECT, Reset(), userErrorCB, and userReplyCB.


Member Function Documentation

evhCB_COMPL_STAT trkwsSELF_CMD::ErrorCB ( msgMESSAGE &  msg,
void *   
) [protected]

Definition at line 267 of file trkwsSELF_CMD.C.

References description, trkwsERR_LCU, trkwsMOD, and userErrorCB.

Referenced by tcsTCS_RCSID().

vltLOGICAL trkwsSELF_CMD::IsActive (  ) 
evhCB_COMPL_STAT trkwsSELF_CMD::ReplyCB ( msgMESSAGE &  msg,
void *   
) [protected]

Definition at line 240 of file trkwsSELF_CMD.C.

References userReplyCB.

Referenced by tcsTCS_RCSID().

void trkwsSELF_CMD::Reset (  ) 
void trkwsSELF_CMD::ResetCBs (  ) 
ccsCOMPL_STAT trkwsSELF_CMD::Send ( const msgCMD  cmdName,
const char *  format,
  ... 
)
void trkwsSELF_CMD::SetDescription ( const char *  setdescription  ) 

Definition at line 114 of file trkwsSELF_CMD.C.

References description.

ccsCOMPL_STAT trkwsSELF_CMD::SetErrorHandler ( evhCALLBACK &  cb  ) 
ccsCOMPL_STAT trkwsSELF_CMD::SetReplyHandler ( evhCALLBACK &  cb  ) 

Member Data Documentation

evhCOMMAND trkwsSELF_CMD::command [private]

Definition at line 56 of file trkwsSELF_CMD.h.

Referenced by IsActive(), Reset(), Send(), and tcsTCS_RCSID().

fndSTRING trkwsSELF_CMD::description [private]

Definition at line 57 of file trkwsSELF_CMD.h.

Referenced by ErrorCB(), and SetDescription().

evhCALLBACK* trkwsSELF_CMD::userErrorCB [private]

Definition at line 59 of file trkwsSELF_CMD.h.

Referenced by ErrorCB(), ResetCBs(), SetErrorHandler(), tcsTCS_RCSID(), and ~trkwsSELF_CMD().

evhCALLBACK* trkwsSELF_CMD::userReplyCB [private]

Definition at line 58 of file trkwsSELF_CMD.h.

Referenced by ReplyCB(), ResetCBs(), SetReplyHandler(), tcsTCS_RCSID(), and ~trkwsSELF_CMD().


The documentation for this class was generated from the following files:
Generated on Mon Apr 23 10:12:57 2012 for INTROOT API by doxygen 1.6.3