This file is indexed.

/usr/include/rtd/RtdCamera.h is in skycat 3.1.2+starlink1~b+dfsg-5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
// -*-c++-*-
#ifndef _RtdCamera_h_
#define _RtdCamera_h_

/*
 * E.S.O. - VLT project 
 * "@(#) $Id: RtdCamera.h,v 1.1.1.1 2009/03/31 14:11:52 cguirao Exp $" 
 *
 * RtdCamera.h - class definitions for managing realtime image update
 * 
 * See the man page for a complete description.
 * 
 * who             when      what
 * --------------  --------  ----------------------------------------
 * Allan Brighton  05/10/95  Created
 * D.Hopkinson     02/12/96  Added performance test object and timestamp method
 * pbiereic        01/03/01  Removed performance test object
 */

#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <cstring>
#include <sys/types.h>
#include "error.h"
#include "define.h"
#include "Mem.h"
#include "rtdSem.h"
#include "rtdImageEvent.h"
#include "ImageIO.h"
#include "Mem.h"
#include "RtdUtils.h"
#include <tk.h>


// this call changed in tcl8
#if (TCL_MAJOR_VERSION >= 8)
#define RTD_TCL_GETFILE_(x) x
#else
#define RTD_TCL_GETFILE_(x) Tcl_GetFile((void *)x, TCL_UNIX_FD)
#endif

/*
 * Class RtdCamera
 * 
 */
class RtdCamera {
    
public:

    // constructor
    RtdCamera(
	const char* name,
	Tcl_Interp*,
	int verbose,
	int debug=0,
	char* image = "RtdCamera");
    
    // destructor 
    virtual ~RtdCamera();

    // static file handler, called by Tk file handler for realtime image events
    static void fileEventProc(ClientData, int mask);

    // start/stop/pause or continue accepting images
    int   start(const char* cameraName);
    int   stop();
    int   pause();
    int   cont();

    // return camera name
    char* camera() {return camera_;}

    // Add timestamp in performance tool.
    void  timeStamp(char *evDesc);

    // update global variables
    int   updateGlobals();

    // check if camera is attached
    int   attached();

protected:

    // member called by fileEventProc for image events
    int   fileEvent();

    // cleanup image events in the socket queue
    void  cleanup();

    // called to display new image from shared memory
    // (defined in a derived class)
    virtual int display(const rtdIMAGE_INFO&, const Mem& data) = 0;

    // set camera name
    void  camera(const char *camera) {strcpy(camBuf_, camera);}

    // create/delete the Tcl file handler
    void  fileHandler(int create);

    // disconnect from camera
    void  disconnect();

    // Decrement the semaphore
    void  semDecr();

    // check if rtdServer is alive
    void  rtdServerCheck();

    // check status after image event failure
    void  checkStat();

    // start accepting events from the camera
    int   attach(const char* camera);

    // check image type
    int   checkType(int type);

    Tcl_Interp* interp_;           // Tcl interp (for file events, error handling)
    rtdIMAGE_EVT_HNDL* eventHndl_; // image event handle
    char* camera_;                 // camera name
    RtdDebugLog *dbl_;             // debug log object
    int   connected_;              // Flag: connected to rtdServer
    int   attached_;               // Flag: attached to rtdServer
    int   was_attached_;           // Flag for updateGlobals()
    int   verbose_;                // verbose and debug flags
    int   debug_;
    int   semId_;                  // current semaphore id
    int   shmNum_;                 // current shared memory number
    char* name_;                   // some unique name (name of Tk image...)
    char* image_;                  // name of RtdImage instance (view master)
    char  camBuf_[RTD_NAMELEN];    // .. and the buffer
    char  buffer_[1024];           // general purpose character buffer

    // -- short cuts --

    int   connected() {return connected_;}
    void  connected(int set) {connected_ = set; }
    void  attached(int set) {attached_ = set; }
};

#endif /* _RtdCamera_h_ */