version 1.2.4.2, 2006/04/21 18:35:40
|
version 1.5, 2007/02/21 10:02:34
|
|
|
PEGASUS_USING_PEGASUS; | PEGASUS_USING_PEGASUS; |
PEGASUS_USING_STD; | PEGASUS_USING_STD; |
| |
const CIMNamespaceName INTEROP_NAMESPACE = CIMNamespaceName ("root/PG_InterOp"); |
// Interop namespace used with PEGASUS_NAMESPACENAME_INTEROP in Constants.h |
const CIMNamespaceName SOURCE_NAMESPACE = | const CIMNamespaceName SOURCE_NAMESPACE = |
CIMNamespaceName ("root/SampleProvider"); | CIMNamespaceName ("root/SampleProvider"); |
| |
|
|
handlerInstance.addProperty (CIMProperty (CIMName ("PortNumber"), | handlerInstance.addProperty (CIMProperty (CIMName ("PortNumber"), |
CIMValue ((Uint32) PORT_NUMBER))); | CIMValue ((Uint32) PORT_NUMBER))); |
| |
return(client.createInstance (INTEROP_NAMESPACE, handlerInstance)); |
return(client.createInstance (PEGASUS_NAMESPACENAME_INTEROP, handlerInstance)); |
} | } |
| |
CIMObjectPath _createFilterInstance | CIMObjectPath _createFilterInstance |
|
|
filterInstance.addProperty (CIMProperty (CIMName ("SourceNamespace"), | filterInstance.addProperty (CIMProperty (CIMName ("SourceNamespace"), |
SOURCE_NAMESPACE.getString ())); | SOURCE_NAMESPACE.getString ())); |
| |
return(client.createInstance (INTEROP_NAMESPACE, filterInstance)); |
return(client.createInstance (PEGASUS_NAMESPACENAME_INTEROP, filterInstance)); |
} | } |
| |
CIMObjectPath _createSubscriptionInstance | CIMObjectPath _createSubscriptionInstance |
|
|
subscriptionInstance.addProperty (CIMProperty | subscriptionInstance.addProperty (CIMProperty |
(CIMName ("SubscriptionState"), CIMValue ((Uint16) 2))); | (CIMName ("SubscriptionState"), CIMValue ((Uint16) 2))); |
| |
return(client.createInstance (INTEROP_NAMESPACE, subscriptionInstance)); |
return(client.createInstance (PEGASUS_NAMESPACENAME_INTEROP, subscriptionInstance)); |
} | } |
| |
void _sendTestIndication(CIMClient* client, const CIMName & methodName, | void _sendTestIndication(CIMClient* client, const CIMName & methodName, |
|
|
{ | { |
CIMObjectPath subscriptionObjectPath = | CIMObjectPath subscriptionObjectPath = |
_getSubscriptionObjectPath(filterName, handlerName); | _getSubscriptionObjectPath(filterName, handlerName); |
client.deleteInstance (INTEROP_NAMESPACE, subscriptionObjectPath); |
client.deleteInstance (PEGASUS_NAMESPACENAME_INTEROP, subscriptionObjectPath); |
} | } |
| |
void _deleteHandlerInstance | void _deleteHandlerInstance |
|
|
const String & name) | const String & name) |
{ | { |
CIMObjectPath handlerObjectPath = _getHandlerObjectPath(name); | CIMObjectPath handlerObjectPath = _getHandlerObjectPath(name); |
client.deleteInstance (INTEROP_NAMESPACE, handlerObjectPath); |
client.deleteInstance (PEGASUS_NAMESPACENAME_INTEROP, handlerObjectPath); |
} | } |
| |
void _deleteFilterInstance | void _deleteFilterInstance |
|
|
const String & name) | const String & name) |
{ | { |
CIMObjectPath filterObjectPath = _getFilterObjectPath(name); | CIMObjectPath filterObjectPath = _getFilterObjectPath(name); |
client.deleteInstance (INTEROP_NAMESPACE, filterObjectPath); |
client.deleteInstance (PEGASUS_NAMESPACENAME_INTEROP, filterObjectPath); |
} | } |
| |
void _usage () | void _usage () |
|
|
<< " seconds" << endl; | << " seconds" << endl; |
} | } |
| |
PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL _executeTests(void *parm) |
ThreadReturnType PEGASUS_THREAD_CDECL _executeTests(void *parm) |
{ | { |
Thread *my_thread = (Thread *)parm; | Thread *my_thread = (Thread *)parm; |
T_Parms *parms = (T_Parms *)my_thread->get_parm(); | T_Parms *parms = (T_Parms *)my_thread->get_parm(); |
|
|
{ | { |
cout << e.getMessage() << endl; | cout << e.getMessage() << endl; |
} | } |
my_thread->exit_self((PEGASUS_THREAD_RETURN)1); |
my_thread->exit_self((ThreadReturnType)1); |
return(0); | return(0); |
} | } |
| |
|
|
| |
#define MSG_PER_SEC 4 | #define MSG_PER_SEC 4 |
| |
Uint32 testTimeout = 20000+(indicationSendCountTotal/MSG_PER_SEC)*1000; |
Uint32 testTimeout = PEGASUS_DEFAULT_CLIENT_TIMEOUT_MILLISECONDS |
|
+ (indicationSendCountTotal/MSG_PER_SEC)*1000; |
| |
// connect the clients | // connect the clients |
for(Uint32 i = 0; i < runClientThreadCount; i++) | for(Uint32 i = 0; i < runClientThreadCount; i++) |