[an error occurred while processing this directive]
[an error occurred while processing this directive] [an error occurred while processing this directive]

Pegasus CIM Object Broker Documentation

[an error occurred while processing this directive]


[an error occurred while processing this directive]

 

Contents

o Introduction
o Objectives
o Overview
o Credits
o Pegasus Architecture
   o Design Goals
   o The Broker
   o Pegasus Providers.
   o Extension Services
   o Pegasus Clients.
   o Functional Flow
o Pegasus Components
   o Component Descriptions
   o Pegasus Directory Structure
o Pegasus Utilization
   o Pegasus Availability
   o Pegasus Installation
   o Pegasus Operation
   o Pegasus CIM Clients
   o Pegasus Providers
   o Pegasus MOF Compiler
o Programming Pegasus
   o CIM Objects in Pegasus
   o CIM Object Table
   o Class Definitions
o Pegasus Interfaces
   o CIM Operations over HTTP
   o Pegasus Client Interfaces
   o Pegasus Provider Interfaces
   o Pegasus Service Extension Interfaces
   o Repository Interfaces
o Writing Providers.
o Glossary
o Pegasus Code Examples
   o Client Examples
   o Client Coding Examples
   o Provider Coding Examples
o Document References
o Pegausus FAQ
o

Client Coding Examples

Example 1

Declaration of a Class and the addition of qualifiers, properties, and methods to that class. Finally, the code converts the class defined to XML with print, outputs it, restores it to a new class and compares the results.

This example is one of the tests defined for Pegasus in the /commmon/tests directory


Example of Class Declaration

#include #include

using namespace Pegasus;

void test01() { ClassDecl class1("MyClass", "YourClass");

class1 .addQualifier(Qualifier("association", true)) .addQualifier(Qualifier("q1", Uint32(55))) .addQualifier(Qualifier("q2", "Hello")) .addProperty(Property("message", "Hello")) .addProperty(Property("count", Uint32(77))) .addProperty( Property("ref1", Reference("MyClass.key1=\"fred\""), "MyClass")) .addMethod(Method("isActive", Type::BOOLEAN) .addParameter(Parameter("hostname", Type::STRING)) .addParameter(Parameter("port", Type::UINT32)));

// class1.print();

OutBuffer out; out << class1;

InBuffer in(out.getData()); ClassDecl tmp; in >> tmp;

assert(class1.identical(tmp)); }

int main() { try { test01(); } catch (Exception& e) { cout << "Exception: " << e.getMessage() << endl; }

cout << "+++++ passed all tests" << endl;

return 0; }

Alphabetic index Hierarchy of classes


[an error occurred while processing this directive]