PVSS - DIM Integration
Functionality:
The PVSS - DIM package allows PVSS Data Points to behave
as:
-
Client Services - Receive data published by DIM Servers
DP content is updated when the DIM Server updates the
Service
-
Client Commands - Send commands to DIM Servers
DP content is sent as a DIM Command whenever it changes
-
Server Services – Publish Services to DIM Clients
DP Content is published at start up and updated whenever
it changes
-
Server Commands – Receive Commands from DIM clients
DP Content is updated when a DIM Client sends a command
-
Client RPC – Send Commands and receive Services from DIM RPC
Servers
DP1 Content is sent as an RPC request to an RPC server
DP2 Content will get updated when the server answers
-
Server RPC – Publish Services on Command reception to DIM RPC Clients
DP1 Content is updated when a Client does an RPC send
DP2 is sent to the respective client when it is written into
In all cases DP (including DP1 and DP2) can be a complete Data Point (i.e. a
structure with many
items), a single Data Point Item or a set of (unrelated) Data Point Items
separated by ';'.
Note: When writing to a DP to be sent out as a command to a DIM Server or as
a service to a DIM Client (same for RPCs) please use dpSetWait (not dpSet) to
avoid the loss of commands or services.
For all cases the user has to specify the correspondence
between DPs and DIM services either in a config file or in a config dp (with the
help of a library - fwDim).
For Client Services the user has to specify
additionally:
- A default value: a value to be set in the DP when the DIM
service is not available (empty string means no default)
- A timeout: if timeout = 0 services are updated on change,
i.e. when the server updates them and they are different from the previous
value (built in old-new comparison). They can be updated on change and also
at regular intervals if timeout > 0. Timeout = -1 disables old-new
comparison, i.e. services are updated when the server updates them.
- A timestamp & quality flag: if set to 1 instructs the
server to send with the service a timestamp and a quality flag (manipulated
by the server developer).
For Client Commands if DP contains more than one Data Point
item the user can additionally specify a Multiplexing flag: if set, instead of
sending all data as a structure when a single item changes, only the changed
item is sent as an ascii string containing the name of the item and its new
value (separated by a space).
Implementation:
The PVSS - DIM communications are implemented by a PVSS
API Manager: PVSS00dim
PVSS00dim can be started like any other PVSS Manager,
it accepts the following command line options:
PVSS00dim [-num <num>] [ -dim_config <config_file>] [ -dim_dp_config
<dp_name>] [-dim_dns_node <node_name>]
Both options "-dim_config" and "-dim_dp_config" specify the correspondence between PVSS Data
Points and DIM Services.
The user can specify none, one or both options.
-
The settings in <config_file> are static. PVSS00dim has
to be restarted when it is modified.
-
The settings in <dp_name> are dynamic. They are taken
into account whenever this data point is modified.
-
If the user does not provide a -dim_dp_config parameter, the
default config "fwDimDefaultConfig" is used if it exists.
The option "-dim_dns_node" can be used to overwrite
the default Dns node given by the environment variable DIM_DNS_NODE.
The Format of the <config_file> is as in the following
example:
[DIM Client Services]
# DP name, DIM service name, default value, timeout interval, time
stamp & quality flag
DimClientStructure, COMPLEX_SERVICE, , 0, 0
[DIM Client Commands]
# DP name, DIM Command name [, Multiplex flag]
[DIM Server Services]
# DP name, DIM service name
[DIM Server Commands]
# DP name, DIM Command name
[DIM Client RPCs]
# DP out name, DP in name, DIM RPC service name
[DIM Server RPCs]
# DP in name, DP out name, DIM RPC service name
<dp_name> is a Data Point of Data Point
Type: _FwDimConfig
The Library - fwDim -
should be used to manipulate <dp_name>. It provides:
- Dynamic subscription/publishing of DIM Services, Commands
and RPCs
- Information on currently available DIM Services or Commands
(wildcard search)
- Changing PVSS00dim parameters like: polling rate, alive
message rate, etc.
- Checking if PVSS00dim(s) are running and starting/stopping
them
A PVSS panel - fwDim.pnl - is also available. It allows users
to:
- In the Edit tab:
- specify the correspondence between PVSS data points and
DIM services/commands
- setup the PVSS00dim's properties and start and stop them
- In the View tab:
- Visualize the status of the subscribed/published
services/commands
- Search for available services/commands (by contacting
the DIM Name Server)
Distribution:
Download for: Windows or Linux
The PVSS – DIM Demo distribution Kit contains:
-
PVSS00dim
-
The libary fwDim
-
Three Example Data Point Types (see picture underneath):
-
DIMComplex for sending and receiving structures
With two DPs: DimClientStructure and DimServerStructure
-
DIMSimple for sending and receiving single items.
With two DPs: DimClient and DimServer
-
DIMRPC for server and client RPCs.
With two DPs: DimClientRPC and DimServerRPC
-
A config DP: DimDemoConfig to configure the six example DPs.
-
A DIM visualization panel: fwDim.pnl (can be used also as
an example on how to use the fwDim library)
-
A DIM Server providing Services to PVSS and receiving Commands.
-
A DIM Client receiving PVSS Services and sending Commands