Next: Item Caching and Subscriptions
Up: Server Functionality
Previous: Server Configuration
Contents
The PyOPC XDAServer class automatically parses incoming SOAP messages
and creates appropriate PyOPC objects, which represent the incoming
message. After that, the preprocessing stage prepares and handles some
of the following options of the outgoing message:
- RcvTime:
- This option is set to the time, the SOAP message was
received by the server.
- ClientRequestHandle:
- The content of the incoming
ClientRequestHandle is automatically copied to the outgoing message.
- RevisedLocaleID:
- If the requested locale is not available, the
server automatically chooses the first available locale and returns it
with this options.
- ServerState:
- This option is set to the ServerState attribute of
the server class, the default is ``running''.
After this stage, the server operation methods are executed.
Therefore the data from the preprocessing stage is available in these
methods and may be modified. For instance, the read operation may
check for the option ``RevisedLocaleID'' in the outgoing message and
set it to a different locale.
After the server operations are finished, the PyOPC objects, which
represent the incoming and outgoing SOAP messages is handed over to
the postprocessing stage, which handles and modifies the following
options:
- Unhandled Items:
- As denoted above, the incoming and outgoing
OPC items are stored in the ItemPairHolder object. The preprocessing
stage will create this object, which contains an incoming
ItemContainer object and an associated, empty outgoing ItemContainer
object. The operations should then fill this outgoing item with
appropriate data. If, however, the outgoing ItemContainer object is
still empty15 in the postprocessing
stage, an error of the type ``PYO_E_EMPTYITEM'' is associated with
it, denoting that the item contains no data.
- ErrorText:
- If ReturnErrorText is set to false in the
request message, any error text in the outgoing message is
deleted. Otherwise the error text will be kept, and if there is none
in the outgoing message, it will be set to a blank string.
- DiagnosticInfo:
- If ReturnDiagnosticInfo is set to false
or is omitted in the request message, any diagnostic info in the
outgoing message is deleted. Otherwise the diagnostic info will be
kept, and if there is none in the outgoing message, it will be set to
a blank string.
- Timestamp:
- If ReturnItemTime is set to false or is
omitted in the request message, any item-related timestamp in the
outgoing message is deleted. Otherwise the timestamp will be kept,
and if there is none in the outgoing message, it will be set to
the current time.
- ItemPath/ItemName:
- If ReturnItemPath/Name is set to false
or is omitted in the request message, any ItemPath/Name in the
outgoing message is deleted. Otherwise the ItemPath/Name will be kept,
and if there is none in the outgoing message, it will be set to a
blank string.
- ClientItemHandle:
- The ClientItemHandle of each incoming item is
copied to the according outgoing item.
- ReplyTime:
- The ReplyTime in the outgoing message is set to the
current time, unless it has not been already set a previous server
method.
Next: Item Caching and Subscriptions
Up: Server Functionality
Previous: Server Configuration
Contents
Hermann Himmelbauer
2006-11-07