Elements
Elements are WinCC OA data point elements with an archiving config (_archive) and an assigned archive group or alert config (_alert_hdl).
Elements have the following properties:
- id - Data point ID from WinCC OA.
- name - Full DPE name.
- dpTypeName - Name of the data point type of the DP of which the DPE belongs.
- unit - Unit of measurement defined in the _common config of the DPE.
- alias - Alias for DPE, defined in the _common config of the DPE.
- comment - The description of the DPE specified in the _common config of the DPE.
- variableType - Data type of the DPE according to the WinCC OA types.
- eventStorageGroupNames - Assigned event archive groups.
- alertGroupMap - Assigned alert archive groups.
When you start the backend, you must synchronize the information about the archived data
point elements. To do this, call the requestMetadataDeltaSynchronously function of the
ConfigChannelHandler class. The first argument of the function is a list of archived DPEs
(type MetadataRequest
) for which the metadata is requested. An empty list
requests the metadata for all DPEs that are archived in this backend. The result of this call
is stored in the second argument of the function, which is of type
MetadataDeltaResponse
. It lists the metadata for the requested DPEs, which
are divided into updates, deletions and new archived DPEs. The request should only be made in
non-direct read mode.
Example:
// synchronizing metadata
// skip metadata synchronization in case of directReadMode
if (!directReadMode)
{
MetadataDeltaResponse metadataResponse;
// send an empty request to get all metadata from the frontend
// also, you can send metadata from the database to get the only diff between metadata in the database and the frontend
MetadataRequest metadataRequest;
configChannelHandler.requestMetadataDeltaSynchronously(metadataRequest, metadataResponse);
logDebug("Backend received metadata changes: \n" + metadataResponse.DebugString());
// proccess metadata from frontend
MetadataHandler::processMetadata(metadataResponse);
}