HP LoadRunner Protocol SDK Test Run API Reference  12.02
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ProtocolExtension.h
Go to the documentation of this file.
1 #ifndef LR_PROTOCOL_SDK_PROTOCOL_EXTENSION_H
4 #define LR_PROTOCOL_SDK_PROTOCOL_EXTENSION_H
5 
6 #include "ProtocolSdkDefs.h"
7 #include "EvaluatedString.h"
8 
10 #define LR_PASS 0
11 #define LR_FAIL 1
13 
14 
15 struct ext_in_config;
16 struct ext_out_config;
17 
18 
25 class PROTOCOL_EXTENSION_DECLSPEC CProtocolExtension
26 {
27 public:
28 
30  static CProtocolExtension* Instance();
31 
33  virtual ~CProtocolExtension();
34 
38  virtual ext_out_config *
39  Register(
40  const char* mProtocolID,
41  void * mExtensionID,
42  ext_in_config * mDriverData
43  ) = 0;
44 
46  virtual void RegisterEventHandler(
47  EVENT_TYPE mEventType,
48  EventHandlerType mHandler
49  ) = 0;
50 
54  virtual void SetVirtualUserData(
55  void* mData
56  ) = 0;
57 
61  virtual void* GetVirtualUserData() = 0;
62 
66  virtual void LogErrorMessage(
67  int mMessageID,
68  ...
69  ) = 0;
70 
74  virtual void LogWarningMessage(
75  int mMessageID,
76  ...
77  ) = 0;
78 
82  virtual void LogNotifyMessage(
83  LOG_LEVEL mLevel,
84  int mMessageID,
85  ...
86  ) const = 0;
87 
88 
92  virtual void LogTextMessage(
93  LOG_LEVEL mLevel,
94  const char* mMessage
95  ) const= 0;
96 
97 
102  virtual void LogBuffer(
103  LOG_LEVEL mLevel,
104  const char* mBuffer,
105  unsigned int mBufferLength
106  ) const= 0;
107 
108 
112  virtual void CreateDataPoint(
113  const char* mName,
114  double mValue
115  ) = 0;
116 
121  virtual CEvaluatedString
122  EvaluateString(
123  const char* mString,
124  int mStringLen = -1
125  ) = 0;
126 
130  virtual void SaveStringToParameter(
131  const char* mValue,
132  const char* mParameterName
133  ) = 0;
134 
138  virtual const char*
139  GetRunTimeSettingEntryValue(
140  const char* mKey
141  ) = 0;
142 
146  virtual void SetRunTimeSettingEntryValue(
147  const char* mKey,
148  const char* mValue
149  ) = 0;
150 
154  virtual const char*
155  GetConfigurationAttribute(
156  CONFIGURATION_ATTRIBUTE mAttribute
157  ) = 0;
158 
164  virtual TimerHandlerType
165  RegisterTimer(
166  TimerCallbackType mCallbackFunction,
167  void* mContext,
168  long mTimeout
169  ) = 0;
170 
175  virtual void UnregisterTimer(
176  TimerHandlerType mTimerHandler
177  ) = 0;
178 
180  virtual ularge_t
181  GetNumberOfMillisecondsFromStartOfRun() = 0;
182 
183 protected:
189 private:
190 
191  static CProtocolExtension* m_instance;
192 };
193 
194 #endif
195 
EVENT_TYPE
The execution environment events for which the protocol can register handlers.
Definition: ProtocolSdkDefs.h:18
int(* EventHandlerType)(void *)
Event handler callback type.
Definition: ProtocolSdkDefs.h:59
CONFIGURATION_ATTRIBUTE
Configuration attributes.
Definition: ProtocolSdkDefs.h:43
int(* TimerCallbackType)(void *context)
Timer callback type.
Definition: ProtocolSdkDefs.h:63
Class CProtocolExtension provides services for interactions with the LoadRunner execution environment...
Definition: ProtocolExtension.h:25
LOG_LEVEL
The level of detail to be logged during test run. See LoadRunner documentation for details...
Definition: ProtocolSdkDefs.h:34
void * TimerHandlerType
Timer handle type.
Definition: ProtocolSdkDefs.h:61
This file contains declarations of parameterized string evaluator.
This file contains general types.
Class CEvaluatedString wraps the result of the function CProtocolExtension::EvaluateString().
Definition: EvaluatedString.h:12


Send documentation feedback to HP.


© 1995-2015 Hewlett-Packard Development Company, L.P.