This file is indexed.

/usr/include/Aria/ArDrawingData.h is in libaria-dev 2.8.0+repack-1.2.

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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
/*
Adept MobileRobots Robotics Interface for Applications (ARIA)
Copyright (C) 2004, 2005 ActivMedia Robotics LLC
Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc.
Copyright (C) 2011, 2012, 2013 Adept Technology

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

If you wish to redistribute ARIA under different terms, contact 
Adept MobileRobots for information about a commercial version of ARIA at 
robots@mobilerobots.com or 
Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960
*/
#ifndef ARDRAWINGDATA_H
#define ARDRAWINGDATA_H

#include "ariaTypedefs.h"
#include "ariaUtil.h"

/// A class for holding color information for ArDrawingData
class ArColor
{
public:
  /// Constructor (colors use full range of 0-255)
  ArColor(unsigned char red, unsigned char green, unsigned char blue)
    { myRed = red; myGreen = green; myBlue = blue; }
  /// Constructor
  ArColor() { myRed = 255, myGreen = 255, myBlue = 255; }

  /// Constructs a color from the given RGB value
  ArColor(ArTypes::Byte4 rgbValue)
  {
    myRed   = (rgbValue & 0xFF0000) >> 16;
    myGreen = (rgbValue & 0x00FF00) >> 8;
    myBlue  = (rgbValue & 0x0000FF);
  }

  /// Destructor
  virtual ~ArColor() {}
  /// Gets the red value (uses full range of 0-255)
  unsigned char getRed(void) { return myRed; }
  /// Gets the green value (uses full range of 0-255)
  unsigned char getGreen(void) { return myGreen; }
  /// Gets the blue value (uses full range of 0-255)
  unsigned char getBlue(void) { return myBlue; }
  /// Gets the color in a byte 4 for putting into a buffer
  ArTypes::Byte4 colorToByte4(void) 
    { return ((myRed << 16) | (myGreen << 8) | myBlue); }
protected:
  unsigned char myRed;
  unsigned char myGreen;
  unsigned char myBlue;

};


/** Describes general properties of a figure to be drawn on screen.
 *  (The actual location/geometry data of the figure is stored elsewhere and may
 *  change frequently)
 *
 * The following shapes are currently recognized:
 * <ul>
 *     <li>"polyDots" - a set of small filled circles centered on each point.  Each 
 *                      ellipse is "size" mm in diameter.  (Example: laser) </li>
 *	   <li>"polyArrows" - a set of small arrows that terminate on each point and
 *	                    point towards the robot.
 *                      Each arrow is "size" mm in length. (Example: sonar) </li>
 *     <li>"polyLine" - a line through each of the points.  The line is "size" 
 *                      pixels wide.  (Example: path) </li>
 *     <li>"polyPoints" - a set of one pixel points.  (Example: localization)</li>
 *     <li>"polySegments" - a set of line segments.  For an array of n points,
 *                      n/2 segments are drawn.  Each segment is drawn from 
 *                      array[i] to array[i+1] (with i starting at 0).  The
 *                      segments are "size" pixels wide.  </li>
 * </ul>
 *
 * The primary color determines what color the shape is. No shapes currently use
 * the secondary color (but future shapes may, or these shapes may be extended
 * in the future to use it).
 * 
 * The layer is an arbitrary int identifier that must be greater than 30 and 
 * less than 100.  (Layers below 30 are considered part of the map data, i.e.
 * not associated with a particular robot.)  The robot is drawn on layer 50.  
 * Any items that are to be drawn on top of the robot should have a layer 
 * number greater than 50.  By default, range devices begin on layer 70.
 *
 * The visibility attribute specifies 
 * whether the data is to be displayed by default, and whether the user is allowed
 * to change the display.  The following visibilities are currently supported:
 * <ul>
 *  <li> "AlwaysOn"   - item is always displayed </li>
 *  <li> "DefaultOn"  - item is visible by default, but the user may hide it</li>
 *  <li> "DefaultOff" - item is hidden by default but the user may show it </li>
 *  <li> "AlwaysOff"  - item is always hidden</li>
 * </ul>
 * The default visibility is "DefaultOn".
 *
**/
class ArDrawingData
{
public:

  enum {
    DEFAULT_REFRESH_TIME = 200 ///< Default number of ms between data refresh requests
  };


  /// Constructor
  /**
     @param shape the name of the shape to draw  (see above / MobileEyes docs for meaning)
     @param primaryColor the main color (meaning depends on shape)
     @param size the size (meaning varies depends on shape)
     @param layer the layer to draw on (see above / MobileEyes docs for meaning)
     @param defaultRefreshTime how often we want to draw it in ms
     @param visibility a string that indicates whether the data is visible 
            whether the user is allowed to change the visibility (see above / MobileEyes
            docs for valid values).  
   **/
  ArDrawingData(const char *shape, 
			                  ArColor primaryColor, 
			                  int size,
			                  int layer, 
			                  unsigned int defaultRefreshTime = DEFAULT_REFRESH_TIME, 
                        const char *visibility = "DefaultOn") :
    myShape(shape),
    myPrimaryColor(primaryColor),
    mySize(size),
    myLayer(layer),
    myDefaultRefreshTime(defaultRefreshTime),
    mySecondaryColor(ArColor(0,0,0)),
    myVisibility(visibility)
  { 
  }

  /// Constructor
  /**
     @param shape the name of the shape to draw  (see above / MobileEyes docs for meaning)
     @param primaryColor the main color (meaning depends on shape)
     @param size the size (meaning varies depends on shape)
     @param layer the layer to draw on (see above / MobileEyes docs for meaning)
     @param defaultRefreshTime how often we want to draw it in ms
     @param secondaryColor the secondary color (meaning depends on shape)
     @param visibility a string that indicates whether the data is visible 
            whether the user is allowed to change the visibility (see above / MobileEyes
            docs for valid values).  
   **/
  ArDrawingData(const char *shape, 
			 ArColor primaryColor, 
			 int size,
			 int layer, 
			 unsigned int defaultRefreshTime, 
			 ArColor secondaryColor,
       const char *visibility = "DefaultOn")
    { 
      myShape = shape; 
      myPrimaryColor = primaryColor; 
      mySize = size; 
      myLayer = layer; 
      myDefaultRefreshTime = defaultRefreshTime;
      mySecondaryColor = secondaryColor; 
      myVisibility = visibility;
    }
  /// Destructor
  virtual ~ArDrawingData() {}
  /// Returns the shape of data to draw
  const char * getShape(void) { return myShape.c_str(); }
  /// Gets the primary color (meaning depending on shape)
  ArColor getPrimaryColor(void) { return myPrimaryColor; }
  /// Gets the size (meaning depends on shape, but its in mm)
  int getSize(void) { return mySize; }
  /// Gets the layer to draw at (see MobileEyes docs for what layer means)
  int getLayer(void) { return myLayer; }
  /// Gets how often this data should be drawn (0 == only when explicitly sent)
  unsigned int getDefaultRefreshTime(void) { return myDefaultRefreshTime; }
  /// Gets the secondary color (meaning depends on shape)
  ArColor getSecondaryColor(void) { return mySecondaryColor; }
  /// Gets the visibility of the drawing data
  const char *getVisibility(void) { return myVisibility.c_str(); }

  /// Sets the shape of data to draw
  void setShape(const char *shape) { myShape = shape; }
  /// Sets the primary color (meaning depends on shape)
  void setPrimaryColor(ArColor color) { myPrimaryColor = color; }
  /// Sets the size (meaning depends on shape, but its in mm)
  void setSize(int size) { mySize = size; }
  /// Sets the layer (see MobileEyes for docs on what layer means)
  void setLayer(int layer) { myLayer = layer; }
  /// Gets how often this data should be drawn (0 == only when explicitly sent)
  void setDefaultRefreshTime(unsigned int refreshTime)
    { myDefaultRefreshTime = refreshTime; }
  /// Sets the secondary color (meaning depends on shape)
  void setSecondaryColor(ArColor color) { mySecondaryColor = color; }
  /// Sets the visibility of the drawing data
  void setVisibility(const char *visibility) { myVisibility = visibility; }
protected:
  std::string myShape;
   ArColor myPrimaryColor;
  int mySize;
  int myLayer;
  unsigned int myDefaultRefreshTime;
  ArColor mySecondaryColor;
  std::string myVisibility;
};

#endif