European
Southern
Observatory

ESO — Reaching New Heights in Astronomy

Countries taking part in the ESO

VLT Software Documentation

tcsDB_BACKUP Class Reference

See man page tcsDB_BACKUP(4)
More...

#include <tcsDB_BACKUP.h>

List of all members.

Public Member Functions

 tcsDB_BACKUP (const dbSYMADDRESS symAddr, vltLOGICAL branch, const char *backupFile)
 ~tcsDB_BACKUP ()
ccsCOMPL_STAT DoBackup ()
void SetBackupFile (const char *backupFile)
void SetSymAddr (const dbSYMADDRESS symAddr)
void SetTypeBranch (vltLOGICAL branch)
void ChangeCWPinBackupFile (const char *cwp)

Private Member Functions

ccsCOMPL_STAT DbBackupSingleAttr (ccsENVNAME env, dbSYMADDRESS symAddr, dbDIRADDRESS *dirAddr)
ccsCOMPL_STAT DbBackupPoint (ccsENVNAME env, dbSYMADDRESS alias, vltLOGICAL branch)
ccsCOMPL_STAT DbBackupFct (dbSYMADDRESS symAddr, vltLOGICAL branch)

Private Attributes

dbSYMADDRESS symCwp
FILE * dbBackupFd
char dbBackupOut [MAXPATHLEN+1]
char * dbBackupPtr
int dbBackupSize
vltLOGICAL dbBranch
dbSYMADDRESS dbOvlCwp

Detailed Description

See man page tcsDB_BACKUP(4)
Manpage of tcsDB_BACKUP

tcsDB_BACKUP

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

NAME

tcsDB_BACKUP - Class to handle backup of a database branch.

 

SYNOPSIS


#include "tcsDB_BACKUP.h"

class tcsDB_BACKUP : public eccsERROR_CLASS
{
  public:
    tcsDB_BACKUP(const dbSYMADDRESS symAddr,
                 vltLOGICAL branch,
                 const char *backupFile);
    ~tcsDB_BACKUP();

    ccsCOMPL_STAT DoBackup();

    void SetBackupFile (const char *backupFile);
    void SetSymAddr(const dbSYMADDRESS symAddr);
    void SetTypeBranch(vltLOGICAL branch);
    void ChangeCWPinBackupFile(const char *cwp);

  private:
    ccsCOMPL_STAT DbBackupSingleAttr (ccsENVNAME     env,
                                      dbSYMADDRESS   symAddr,
                                      dbDIRADDRESS  *dirAddr );

    ccsCOMPL_STAT DbBackupPoint(ccsENVNAME    env,
                                dbSYMADDRESS  alias,
                                vltLOGICAL    branch );

    ccsCOMPL_STAT DbBackupFct(dbSYMADDRESS  symAddr,
                              vltLOGICAL    branch);

    dbSYMADDRESS  symCwp;
    FILE         *dbBackupFd;                  // file descriptor of output file
    char          dbBackupOut[MAXPATHLEN];     // output file
    char         *dbBackupPtr;
    int           dbBackupSize;
    vltLOGICAL    dbBranch;
    dbSYMADDRESS  dbOvlCwp;
};

 

PARENT CLASS


public eccsERROR_CLASS*

 

PUBLIC METHODS


tcsDB_BACKUP(const dbSYMADDRESS symAddr, vltLOGICAL branch, const char *backupFile);
~tcsDB_BACKUP();

ccsCOMPL_STAT DoBackup();

void SetBackupFile (const char *backupFile);
void SetSymAddr(const dbSYMADDRESS symAddr);
void SetTypeBranch(vltLOGICAL branch);
void ChangeCWPinBackupFile(const char *cwp);


 

PRIVATE METHODS


ccsCOMPL_STAT DbBackupFct(dbSYMADDRESS  symAddr,
                          vltLOGICAL    branch);
    Checks the input parameters passed to dbBackup(),
    prepares the corresponding parameters needed for the backup and
    calls the appropriate backup function.

    symAddr  <IN>  symbolic name of the database item specified
                   by the user
    branch   <IN>  flag indicating in case of a point, whether
                   only the attributes of the point or also
                   of the subpoints shall be read
ccsCOMPL_STAT DbBackupPoint(ccsENVNAME    env,
                            dbSYMADDRESS  alias,
                            vltLOGICAL    branch);
    Generates a backup of all attributes of a point
    and if <branch> is set also of all subpoints.

    env        <IN>  environment, where to read
    alias      <IN>  alias name of current working point
    branch     <IN>  flag indicating whether only the attributes
                     of the current working point or additionally
                     of all subpoints shall be read
ccsCOMPL_STAT DbBackupSingleAttr (ccsENVNAME     env,
                                  dbSYMADDRESS   symAddr,
                                  dbDIRADDRESS  *dirAddr );
    Reads the data of the attribute <addr>
    and writes it in a formatted form into a file.

    env      <IN>  environment, where to read the attribute
    addr     <IN>  attribute name
    dirAddr  <IN>  direct address of attribute




 

PRIVATE DATA MEMBERS


dbSYMADDRESS  symCwp;                  // symbolic address of the point/branch
                                       // to be backed up
FILE         *dbBackupFd;              // file descriptor of output file
char          dbBackupOut[MAXPATHLEN]; // output file name
char         *dbBackupPtr;
int           dbBackupSize;
vltLOGICAL    dbBranch;                // flag indicating whether only the attributes
                                       // of the current working point or
                                       // additionally of all subpoints shall be read
dbSYMADDRESS  dbOvlCwp;


 

FILES


The database is backed up in the file specified in the constructor
or with the SetBackupFile method.



 

Index

NAME
SYNOPSIS
PARENT CLASS
PUBLIC METHODS
PRIVATE METHODS
PRIVATE DATA MEMBERS
FILES

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

Definition at line 49 of file tcsDB_BACKUP.h.


Constructor & Destructor Documentation

tcsDB_BACKUP::tcsDB_BACKUP ( const dbSYMADDRESS  symAddr,
vltLOGICAL  branch,
const char *  backupFile 
)
tcsDB_BACKUP::~tcsDB_BACKUP (  ) 

Definition at line 193 of file tcsDB_BACKUP.C.


Member Function Documentation

void tcsDB_BACKUP::ChangeCWPinBackupFile ( const char *  cwp  ) 

Definition at line 205 of file tcsDB_BACKUP.C.

References dbOvlCwp.

Referenced by trkwsNEW_PCM_SER::CompletedCB().

ccsCOMPL_STAT tcsDB_BACKUP::DbBackupFct ( dbSYMADDRESS  symAddr,
vltLOGICAL  branch 
) [private]

Definition at line 277 of file tcsDB_BACKUP.C.

References dbBackupFd, dbBackupOut, DbBackupPoint(), dbBackupPtr, DbBackupSingleAttr(), dbOvlCwp, and TRUE.

Referenced by DoBackup().

ccsCOMPL_STAT tcsDB_BACKUP::DbBackupPoint ( ccsENVNAME  env,
dbSYMADDRESS  alias,
vltLOGICAL  branch 
) [private]

Definition at line 378 of file tcsDB_BACKUP.C.

References dbBackupFd, dbBackupOut, dbBackupPtr, DbBackupSingleAttr(), and dbBackupSize.

Referenced by DbBackupFct().

ccsCOMPL_STAT tcsDB_BACKUP::DbBackupSingleAttr ( ccsENVNAME  env,
dbSYMADDRESS  symAddr,
dbDIRADDRESS *  dirAddr 
) [private]

Definition at line 500 of file tcsDB_BACKUP.C.

References dbBackupFd, dbBACKUPMAX, and dbBackupOut.

Referenced by DbBackupFct(), and DbBackupPoint().

ccsCOMPL_STAT tcsDB_BACKUP::DoBackup (  ) 
void tcsDB_BACKUP::SetBackupFile ( const char *  backupFile  ) 

Definition at line 200 of file tcsDB_BACKUP.C.

References dbBackupOut.

Referenced by trkwsNEW_PCM_SER::CompletedCB().

void tcsDB_BACKUP::SetSymAddr ( const dbSYMADDRESS  symAddr  ) 

Definition at line 210 of file tcsDB_BACKUP.C.

References symCwp.

Referenced by trkwsNEW_PCM_SER::CompletedCB().

void tcsDB_BACKUP::SetTypeBranch ( vltLOGICAL  branch  ) 

Definition at line 215 of file tcsDB_BACKUP.C.

References dbBranch.

Referenced by trkwsNEW_PCM_SER::CompletedCB().


Member Data Documentation

FILE* tcsDB_BACKUP::dbBackupFd [private]

Definition at line 77 of file tcsDB_BACKUP.h.

Referenced by DbBackupFct(), DbBackupPoint(), DbBackupSingleAttr(), and DoBackup().

char tcsDB_BACKUP::dbBackupOut[MAXPATHLEN+1] [private]
char* tcsDB_BACKUP::dbBackupPtr [private]

Definition at line 79 of file tcsDB_BACKUP.h.

Referenced by DbBackupFct(), DbBackupPoint(), and DoBackup().

Definition at line 80 of file tcsDB_BACKUP.h.

Referenced by DbBackupPoint(), and DoBackup().

vltLOGICAL tcsDB_BACKUP::dbBranch [private]

Definition at line 81 of file tcsDB_BACKUP.h.

Referenced by DoBackup(), and SetTypeBranch().

dbSYMADDRESS tcsDB_BACKUP::dbOvlCwp [private]

Definition at line 82 of file tcsDB_BACKUP.h.

Referenced by ChangeCWPinBackupFile(), and DbBackupFct().

dbSYMADDRESS tcsDB_BACKUP::symCwp [private]

Definition at line 76 of file tcsDB_BACKUP.h.

Referenced by DoBackup(), and SetSymAddr().


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