next up previous contents
Next: Representation of OPC XML-DA Up: Architecture and Basic Concepts Previous: Architecture and Basic Concepts   Contents

Basic PyOPC Architecture

The PyOPC framework supports the development of OPC XML-DA client and server applications. The OPC XML-DA standard defines the following eight operations, which can be used to access OPC data:

GetStatus:
This operation is used to retrieve status information of the OPC server.
Read/Write:
These operations are used to read and write OPC items8.
Subscribe / SubscriptionPolledRequest / SubscriptionCancel:
These operations are used to handle OPC subscriptions.
Browse:
This operation is used to browse OPC items.
GetProperties:
OPC items have so-called properties, which define and describe the item. GetProperties can be used to retrieve these OPC item properties.

Associated to each of these operation is a request and response SOAP message, resulting in 16 different messages. With ZSI, these messages can be parsed and serialized through specific Python objects, so-called ``Typecodes''. Although accessing typecodes is far easier than accessing the SOAP message itself, it is still a tedious task. Therefore PyOPC hides this process from the developer by defining various methods, which automatically handle the ZSI typecodes.

PyOPC introduces several classes, which are used throughout the framework. These classes inherit from each other, forming a class hierarchy, as illustrated in figure 3.

Figure 3: Class Hierarchy of the PyOPC Framework
\begin{figure}\centering
\includegraphics[scale=0.7]{graphics/object_hierarchy.eps}\end{figure}

The classes of this hierarchy implement the following functionality:

OPC Basic:
This class implements basic issues that are used by other inheriting classes. Apart from several utility methods, the class defines all OPC errors.
OPCOperation:
The OPCOperation class handles the generation and parsing of all OPC XML-DA SOAP messages. The class implements two read and write methods for each operation9, which are automatically utilized for handling ZSI typecodes.
ItemContainer:
This class represents OPC items and is described in detail below.
XDAClient:
Simple OPC XML-DA clients may be built with this class.
TWXDAClient:
This class is an advanced way to build OPC XML-DA compliant clients. The TWXDAClient class utilizes Twisted to enable multiple, concurrent client requests.
XDAServer:
The XDAServer class is the base to implement OPC XML-DA compliant servers with the PyOPC framework.


next up previous contents
Next: Representation of OPC XML-DA Up: Architecture and Basic Concepts Previous: Architecture and Basic Concepts   Contents
Hermann Himmelbauer 2006-11-07