/usr/include/mama/stat.h is in libmama-dev 2.2.2.1-11ubuntu1.
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 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | /* $Id$
*
* OpenMAMA: The open middleware agnostic messaging API
* Copyright (C) 2011 NYSE Technologies, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef MamaStatsH__
#define MamaStatsH__
#include "mama/status.h"
#if defined(__cplusplus)
extern "C" {
#endif
#define MAMA_STAT_NOT_LOCKABLE 0
#define MAMA_STAT_LOCKABLE 1
typedef enum mamaStatType
{
MAMA_STAT_TYPE_INITIALS = 105,
MAMA_STAT_TYPE_RECAPS = 106,
MAMA_STAT_TYPE_NUM_MESSAGES = 107,
MAMA_STAT_TYPE_FT_TAKEOVERS = 108,
MAMA_STAT_TYPE_QUEUE_SIZE = 109,
MAMA_STAT_TYPE_SUBSCRIPTIONS = 110,
MAMA_STAT_TYPE_TIMEOUTS = 111,
MAMA_STAT_TYPE_MSG_INDEX = 112,
MAMA_STAT_TYPE_NAK_PACKETS_SENT = 113,
MAMA_STAT_TYPE_NAKS_SENT = 114,
MAMA_STAT_TYPE_MSGS_LOST = 115,
MAMA_STAT_TYPE_NCFS_IGNORE = 116,
MAMA_STAT_TYPE_NCFS_SHED = 117,
MAMA_STAT_TYPE_NCFS_RX_DELAY = 118,
MAMA_STAT_TYPE_NCFS_UNKNOWN = 119,
MAMA_STAT_TYPE_DUPLICATE_MSGS = 120,
MAMA_STAT_TYPE_UNRECOVERABLE_WINDOW_ADVANCE = 121,
MAMA_STAT_TYPE_UNRECOVERABLE_TIMEOUT = 122,
MAMA_STAT_TYPE_LBM_MSGS_RECEIVED_NO_TOPIC = 123,
MAMA_STAT_TYPE_LBM_REQUESTS_RECEIVED = 124,
MAMA_STAT_TYPE_WOMBAT_MSGS = 125,
MAMA_STAT_TYPE_RV_MSGS = 126,
MAMA_STAT_TYPE_FAST_MSGS = 127,
MAMA_STAT_TYPE_UNKNOWN_MSGS = 128,
MAMA_STAT_TYPE_PUBLISHER_SEND = 129,
MAMA_STAT_TYPE_PUBLISHER_INBOX_SEND = 130,
MAMA_STAT_TYPE_PUBLISHER_REPLY_SEND = 131,
MAMA_STAT_TYPE_UNKNOWN = 999
}mamaStatType;
/**
* Create a mamaStats object
*
* @param stat The location of a mamaStats to store the result
*/
MAMAExpDLL
extern mama_status
mamaStat_create (mamaStat* stat, mamaStatsCollector collector, int lockable, const char* name, mama_fid_t type);
/**
* Destroy a mamaStats object
*
* @param stat The stats object to destroy
*/
MAMAExpDLL
extern mama_status
mamaStat_destroy (mamaStat stat);
/**
* Increment the stats object counter
*
* @param stat The stats object to increment
*/
MAMAExpDLL
extern mama_status
mamaStat_increment (mamaStat stat);
/**
* Decrement the stats object counter
*
* @param stat The stats object to decrement
*/
MAMAExpDLL
extern mama_status
mamaStat_decrement (mamaStat stat);
/**
* Reset the stats object counter
*
* @param stat The stat object to reset
*/
MAMAExpDLL
extern mama_status
mamaStat_reset (mamaStat stat);
/**
* Adds the stats object counter with the value
*
* @param stat The stats object to added
* @param value The value to be added to be stat
*/
MAMAExpDLL
extern mama_status
mamaStat_add (mamaStat stat, int value);
/**
* Subtract the stats object counter with the value
*
* @param stat The stats object to subtracted
* @param value the value to be subtracted from stat
*/
MAMAExpDLL
extern mama_status
mamaStat_subtract (mamaStat stat, int value);
/**
* set the Interval value
*
* @param stat The stats object to be changed
* @param value the value to be used
*/
MAMAExpDLL
extern mama_status
mamaStat_setIntervalValue (mamaStat stat, int value);
/**
* Get the FID used when publishing the
* stat via the stats logger
*
* @param stat The stat object from which
* to get the FID
*/
MAMAExpDLL
extern mama_fid_t
mamaStat_getFid (mamaStat stat);
/**
* Get the value of the stat for the current
* interval
*
* @param stat The stat object from which to
* get the invterval value
*/
MAMAExpDLL
extern int
mamaStat_getIntervalValue (mamaStat stat);
/**
* Get the maximum value of the stat
*
* @param stat The stat object from which
* to get the maximum value
*/
MAMAExpDLL
extern int
mamaStat_getMaxValue (mamaStat stat);
/**
* Get the total value of the stat
*
* @param stat The stat object from which
* to get the total value
*/
MAMAExpDLL
extern int
mamaStat_getTotalValue (mamaStat stat);
/**
* Get the interval, maximum, and total values
* for the stat
*
* @param stat The stat object from
* which to get the values
* @param intervalValue Address to which the
* interval value will
* be written
* @param maxValue Address to which the
* maximum value will
* be written
* @param totalValue Address to which the
* total value will be
* written
*/
MAMAExpDLL
extern void
mamaStat_getStats (mamaStat stat, mama_i32_t* intervalValue, mama_u32_t* maxValue, mama_u32_t* totalValue);
/**
* Get the name of the stat
*
* @param The stat object from which to get the name
*/
MAMAExpDLL
extern const char*
mamaStat_getName (mamaStat stat);
/**
* Set whether or not this stat should be logged in the MAMA log.
*
* @param stat The stat object to set logging for
* @param log Whether or not to log the stat
*/
MAMAExpDLL
extern mama_status
mamaStat_setLog (mamaStat stat, int log);
/**
* Returns whether or not the stat is currently being logged to
* the MAMA log.
*
* @param The stat object to get logging for
*/
MAMAExpDLL
extern int
mamaStat_getLog (mamaStat stat);
/**
* Set whether or not to publish this stat.
*
* @parameter stat The stat object to set publishing for
* @paramter publish Whether or not to publish the stat
*/
MAMAExpDLL
extern mama_status
mamaStat_setPublish (mamaStat stat, int publish);
/**
* Returns whether or not the stat is currently being published.
*
* @param stat The stat object to check whether or not it is being
* published
*/
MAMAExpDLL
extern int
mamaStat_getPublish (mamaStat stat);
/**
* Returns a mamaStatType from a string.
*
* @param statTypeString The stat type as a string
*/
MAMAExpDLL
extern mamaStatType
mamaStatType_fromString (const char* statTypeString);
/**
* Returns a string representation of a mamaStatType.
*
* @param statType The statType to return as a string
*/
MAMAExpDLL
extern const char*
mamaStatType_toString (mamaStatType statType);
#if defined(__cplusplus)
}
#endif
#endif /* MamaStatsH__ */
|