Modelling the Statistics


The PBX collects various statistics about the number of calls made by each telephone, the number of times an outgoing call has been blocked by all the trunks being busy, etc. We need to model some form of container to collect these statistics. As I discussed on page 97, it would be possible simply to make the statistical values properties of the appropriate classes. The disadvantage of this is that, since the counters are dynamic, they will probably need to be fetched from some hardware each time they are read ” potentially a time-consuming operation which should be avoided if the user really only wants the static content of a class.

I consequently create a number of statistical classes and associate them with the devices creating the statistics. The class which we will need to subclass is CIM_StatisticalData and it already comes with a number of subclasses. CIM_NetworkPortStatistics seems a useful candidate until its properties are studied: it does not contain general port statistics, only the port statistics for a port carrying packetised traffic. It appears therefore that we need to create our own statistics classes: see Figure 9.6.

click to expand
Figure 9.6: The PBX Statistics Classes

Each statistical class will be associated with its port by the CIM_ElementStatisticalData association (as defined in Figure 6.3 on page 98).

Note that, by inheriting from CIM_StatisticalData, our new class automatically has many useful properties and methods , including the date and time at which the statistics counters were last reset and an extrinsic function to reset them.




A Practical Approach to WBEM[s]CIM Management
A Practical Approach to WBEM[s]CIM Management
ISBN: 849323061
EAN: N/A
Year: 2006
Pages: 152

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net