unCPC6  6.6.11
WinCC-OA implementation of UNICOS CPC
cpcExportGenericFunctions.ctl File Reference

This library contains generic exportation functions. More...

Functions

void cpcExportGenericFunctions_processAddress (string sDp, string sDeviceType, string sDpeName, bool bIsInput, dyn_string &dsDpParameters)
 
string DRV_CMW_convertToUnicosAddress (string sDeviceDpeName, string sDeviceType)
 
void cpcExportGenericFunctions_getParameters (string sDp, dyn_string &dsDpParameters, dyn_string &dsExceptionInfo)
 
void cpcExportGenericFunctions_getMetainfo (string sDp, dyn_string &dsDpParameters, dyn_string &dsExceptionInfo)
 
void cpcExportGenericFunctions_getUnit (string sDp, dyn_string &dsDpParameters, string sDpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getFormat (string sDp, dyn_string &dsDpParameters, string sDpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getSimpleFormat (string sDp, dyn_string &dsDpParameters, string sDpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getRange (string sDp, dyn_string &dsDpParameters, dyn_string &dsExceptionInfo, string sDpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getOutRange (string sDp, dyn_string &dsDpParameters, dyn_string &dsExceptionInfo, string sDpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getDeadband (string sDp, dyn_string &dsDpParameters, dyn_string &dsExceptionInfo, string sDpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getArchive (string sDp, dyn_string &dsDpParameters, string sDpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getMaskEvent (string sDp, dyn_string &dsDpParameters)
 
void cpcExportGenericFunctions_getDefaultValue (string sDp, dyn_string &dsDpParameters, string sDefaultElementName="DfltVal")
 
void cpcExportGenericFunctions_getBoolDefaultValue (string sDp, dyn_string &dsDpParameters, string sDefaultElementName="DfltVal")
 
void cpcExportGenericFunctions_getDPEValue (string sDp, string sElementName, dyn_string &dsDpParameters, string sPrintFormat="", string sConfigDetailAttrib=":_online.._value")
 
void cpcExportGenericFunctions_getPIDName (string sDp, dyn_string &dsDpParameters)
 
void cpcExportGenericFunctions_getKeyDeviceConfiguration (string sDp, dyn_string &dsDpParameters, string sKey, dyn_string &dsExceptionInfo)
 
void cpcExportGenericFunctions_getDigitalNormalPosition (string sDP, string sObject, dyn_string dsDpElements, dyn_string &dsDpParameters)
 
void cpcExportGenericFunctions_getPCOParameters (string sDP, dyn_string &dsDpParameters)
 
void cpcExportGenericFunctions_setAutonomous (dyn_string dsDpList, dyn_string &dsExceptionInfo, string sDpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getArchiveNameForDpes (string sDp, string sDefaultValue, dyn_string dsDpes, dyn_string &dsDpParameters)
 
dyn_string cpcExportGenericFunctions_getArchivedDpes (string sDeviceType, int iArchiveType)
 
void cpcExportGenericFunctions_getCategories (string sDp, dyn_string dsDpes, dyn_string &dsDpParameters, dyn_string &dsExceptionInfo)
 
string cpcExportGenericFunctions_getAcknowledgeAlarmValue (string sDp, string sDpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getAcknowledgeAlarm (string sDp, string sAlarmDp, dyn_string &dsDpParameters, dyn_string &dsExceptionInfo)
 
void cpcExportGenericFunctions_get5AlertLimits (string sDp, dyn_string &dsDpParameters)
 
void cpcExportGenericFunctions_get5AlertClasses (string sDp, dyn_string &dsClasses, dyn_string &dsExceptionInfo, string sDpe=".ProcessInput.PosSt")
 
string cpcExportGenericFunctions_get5AlertAcknowledgeAlarmValue (string sDp, dyn_string &dsExceptionInfo)
 
void cpcExportGenericFunctions_get5AlertAcknowledgeAlarm (string sDp, string sAlarmDp, dyn_string &dsDpParameters, dyn_string &dsExceptionInfo)
 
void cpcExportGenericFunctions_getAlarmActive (string sDp, dyn_string &dsDpParameters, string sDpe=".ProcessInput.PosSt")
 
string dynJoin (dyn_string dsArray, string sSeparator)
 
void cpcExportGenericFunctions_updateConversionParameters (string sDp, string sDpe, dyn_string dsExceptionInfo)
 
void cpcExportGenericFunctions_updateAlarmParameters (string sDp, string sDpe, string sDeviceTypeName, dyn_string dsExceptionInfo)
 

Detailed Description

This library contains generic exportation functions.

Normally a function in this library is designed to accept currentDP and dsDpParameters (array representation of pvss importation line) with two first parameters. Other parameters may be accepted in order to specify a particular element in device to process. Function adds certain parameters to the end of dsDpParameters as a result of its work.

Author
Nikolay KULMAN (IT/CO)
Alexey Merezhin (EN-ICE-PLC)
Creation Date
06/04/2006
Constraints
None
Usage
Public
PVSS managers
UI, CTRL

Function Documentation

◆ cpcExportGenericFunctions_processAddress()

void cpcExportGenericFunctions_processAddress ( string  sDp,
string  sDeviceType,
string  sDpeName,
bool  bIsInput,
dyn_string &  dsDpParameters 
)

Add DPE address to the device's output

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
sDeviceTypedevice type
sDpeNamedpe name (without path)
bIsInputshould be true if it's in ProcessInput and false if it's in ProcessOutput
dsDpParametersobject's output
Returns
nothing

Referenced by _UnPlc_CPC_RcpBuffers_ExportConfig().

◆ DRV_CMW_convertToUnicosAddress()

string DRV_CMW_convertToUnicosAddress ( string  sDeviceDpeName,
string  sDeviceType 
)

Purpose: function to retrieve CMW address for given Data Point

Parameters: sDeviceDpeName: string, input, dpe name for which address should be formatted sDeviceType: string, input, device type name

Usage: External function

PVSS manager usage: Ctrl, NG, NV

Reviewed:
2018-07-24 Callback

◆ cpcExportGenericFunctions_getParameters()

void cpcExportGenericFunctions_getParameters ( string  sDp,
dyn_string &  dsDpParameters,
dyn_string &  dsExceptionInfo 
)

Add parameters field to the device's output

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
dsDpParametersobject's output
dsExceptionInfoexception info

References dynJoin(), and UN_CPC_DEVICE_PROPERTY_PREFIX.

Referenced by cpcExportGenericFunctions_setAutonomous().

◆ cpcExportGenericFunctions_getMetainfo()

void cpcExportGenericFunctions_getMetainfo ( string  sDp,
dyn_string &  dsDpParameters,
dyn_string &  dsExceptionInfo 
)

Add meta-info fields to the device's output

Meta info is device's heirarchy (i.e. master/parents/children), type and second alias

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
dsDpParametersobject's output
dsExceptionInfoexception info

References CPC_CONFIG_CHILDREN_KEY, CPC_CONFIG_MASTER_NAME_KEY, CPC_CONFIG_PARENTS_KEY, CPC_CONFIG_SECOND_ALIAS_KEY, CPC_CONFIG_TYPE_KEY, and dynJoin().

◆ cpcExportGenericFunctions_getUnit()

void cpcExportGenericFunctions_getUnit ( string  sDp,
dyn_string &  dsDpParameters,
string  sDpe = ".ProcessInput.PosSt" 
)

Add unit to the device's output

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
dsDpParametersobject's output
sDpename of unit's dpe, ProcessInput.PosSt by default

◆ cpcExportGenericFunctions_getFormat()

void cpcExportGenericFunctions_getFormat ( string  sDp,
dyn_string &  dsDpParameters,
string  sDpe = ".ProcessInput.PosSt" 
)

Add format to the device's output

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
dsDpParametersobject's output
sDpename of format's dpe, ProcessInput.PosSt by default

◆ cpcExportGenericFunctions_getSimpleFormat()

void cpcExportGenericFunctions_getSimpleFormat ( string  sDp,
dyn_string &  dsDpParameters,
string  sDpe = ".ProcessInput.PosSt" 
)

Add format without log_scale flag to the device's output

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
dsDpParametersobject's output
sDpename of format's dpe, ProcessInput.PosSt by default

◆ cpcExportGenericFunctions_getRange()

void cpcExportGenericFunctions_getRange ( string  sDp,
dyn_string &  dsDpParameters,
dyn_string &  dsExceptionInfo,
string  sDpe = ".ProcessInput.PosSt" 
)

Add range fields (max, min) to the device's output

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
dsDpParametersobject's output
dsExceptionInfoexception info
sDpename of range's dpe, ProcessInput.PosSt by default

◆ cpcExportGenericFunctions_getOutRange()

void cpcExportGenericFunctions_getOutRange ( string  sDp,
dyn_string &  dsDpParameters,
dyn_string &  dsExceptionInfo,
string  sDpe = ".ProcessInput.PosSt" 
)

Add out range fields (max, min) to the device's output

Out range stands for the scaled range.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
dsDpParametersobject's output
dsExceptionInfoexception info
sDpename of out range's dpe, ProcessInput.PosSt by default

◆ cpcExportGenericFunctions_getDeadband()

void cpcExportGenericFunctions_getDeadband ( string  sDp,
dyn_string &  dsDpParameters,
dyn_string &  dsExceptionInfo,
string  sDpe = ".ProcessInput.PosSt" 
)

Add deadband fields (deadband and deadband type) to the device's output

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
dsDpParametersobject's output
dsExceptionInfoexception info
sDpename of deadband's dpe, ProcessInput.PosSt by default

◆ cpcExportGenericFunctions_getArchive()

void cpcExportGenericFunctions_getArchive ( string  sDp,
dyn_string &  dsDpParameters,
string  sDpe = ".ProcessInput.PosSt" 
)

Add archive fields (archive active and archive time filter) to the device's output

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
dsDpParametersobject's output
sDpename of archive's dpe, ProcessInput.PosSt by default

◆ cpcExportGenericFunctions_getMaskEvent()

void cpcExportGenericFunctions_getMaskEvent ( string  sDp,
dyn_string &  dsDpParameters 
)

Add isDeviceMasked value to the device's output

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
dsDpParametersobject's output

◆ cpcExportGenericFunctions_getDefaultValue()

void cpcExportGenericFunctions_getDefaultValue ( string  sDp,
dyn_string &  dsDpParameters,
string  sDefaultElementName = "DfltVal" 
)

Add default value to the device's output

Function stands for fetch online value of ProcessOutput DPE

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
dsDpParametersobject's output
sDefaultElementNamedpe name, "DfltVal" by default

◆ cpcExportGenericFunctions_getBoolDefaultValue()

void cpcExportGenericFunctions_getBoolDefaultValue ( string  sDp,
dyn_string &  dsDpParameters,
string  sDefaultElementName = "DfltVal" 
)

Add default value casted to bool to the device's output

Constraints
None
Usage
Public
PVSS managers
UI
See also
cpcExportGenericFunctions_getDefaultValue
Parameters
sDpcurrent dp name
dsDpParametersobject's output
sDefaultElementNamedpe name, "DfltVal" by default

◆ cpcExportGenericFunctions_getDPEValue()

void cpcExportGenericFunctions_getDPEValue ( string  sDp,
string  sElementName,
dyn_string &  dsDpParameters,
string  sPrintFormat = "",
string  sConfigDetailAttrib = ":_online.._value" 
)

Add DPE values to the device's output

Function fetches the online value of DPE

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpCurrent DP name
sElementNameThe DPE name
dsDpParametersA dyn_string to which the value of the DPE is appended; the output of the function
sPrintFormatOptional sprintf() format used to print the DPE value; default is "", i.e. no custom formatting
sConfigDetailAttribOptional config, detail and attribute of the DPE; default is ":_online.._value", replicating the default dpGet() behaviour in WccOA 3.15

◆ cpcExportGenericFunctions_getPIDName()

void cpcExportGenericFunctions_getPIDName ( string  sDp,
dyn_string &  dsDpParameters 
)

Add PID name to the device's output

Proxy to unExportDevice_getPIDName

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
dsDpParametersobject's output

◆ cpcExportGenericFunctions_getKeyDeviceConfiguration()

void cpcExportGenericFunctions_getKeyDeviceConfiguration ( string  sDp,
dyn_string &  dsDpParameters,
string  sKey,
dyn_string &  dsExceptionInfo 
)

Add device config value for given name to the device's output

Proxy to unExportDevice_getPCOName

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
dsDpParametersobject's output
sKeykey in device configuration
dsExceptionInfoexception info

◆ cpcExportGenericFunctions_getDigitalNormalPosition()

void cpcExportGenericFunctions_getDigitalNormalPosition ( string  sDP,
string  sObject,
dyn_string  dsDpElements,
dyn_string &  dsDpParameters 
)

Add digital normal position to the device's output

Port of unExportDevice_getDigitalNormalPositionDPE.

Use full path in alarm list (dsDpElements), for example, there's a list of interlocks for a field object:

makeDynString(".ProcessInput.StartISt", ".ProcessInput.TStopISt", ".ProcessInput.FuStopISt")
Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDPcurrent dp name
sObjectdevice type; don't used
dsDpElementsan array of alarm dpes
dsDpParametersobject's output

◆ cpcExportGenericFunctions_getPCOParameters()

void cpcExportGenericFunctions_getPCOParameters ( string  sDP,
dyn_string &  dsDpParameters 
)

Add PCO parameters to the device's output

Proxy to unExportDevice_getPCOParameters.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDPcurrent dp name
dsDpParametersobject's output

◆ cpcExportGenericFunctions_setAutonomous()

void cpcExportGenericFunctions_setAutonomous ( dyn_string  dsDpList,
dyn_string &  dsExceptionInfo,
string  sDpe = ".ProcessInput.PosSt" 
)

Add autonomous property to devices

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
dsDpListlist of dp names
dsExceptionInfoexception info
sDpename of autonomous's dpe, ProcessInput.PosSt by default

References cpcExportGenericFunctions_getParameters(), and cpcGenericDpFunctions_setDeviceProperty().

Referenced by SOFT_FE_CPC_AnalogParameter_ExportConfigOnlineValues(), and SOFT_FE_CPC_DigitalParameter_ExportConfigOnlineValues().

◆ cpcExportGenericFunctions_getArchiveNameForDpes()

void cpcExportGenericFunctions_getArchiveNameForDpes ( string  sDp,
string  sDefaultValue,
dyn_string  dsDpes,
dyn_string &  dsDpParameters 
)

Add archive name of given dpes to the device's output

Funtion collect archive name for each of dpes. If archive is the same for everyone, it use this archive. Else it use empty string.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
sDefaultValuevalue that used if archive is not configured for dpe
dsDpeslist of dpes that supposed to have same archive
dsDpParametersobject's output

◆ cpcExportGenericFunctions_getArchivedDpes()

dyn_string cpcExportGenericFunctions_getArchivedDpes ( string  sDeviceType,
int  iArchiveType 
)

Return list of dpes of given deviceType that have hasArchive property

Funtion collect dpes' names that are archived

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDeviceTypedevice type name
iArchiveTypetype of archive: 1 (UN_CONFIG_ADDITIONAL_ARCHIVE_BOOL) for BOOLEAN, 2 (UN_CONFIG_ADDITIONAL_ARCHIVE_ANALOG) for ANALOG and 3 (UN_CONFIG_ADDITIONAL_ARCHIVE_EVENT) for EVENT
Returns
list of dpes

References CPC_BOOL, CPC_FLOAT, CPC_INT16, CPC_INT32, CPC_UINT16, and cpcConfigGenericFunctions_getShortTypeName().

◆ cpcExportGenericFunctions_getCategories()

void cpcExportGenericFunctions_getCategories ( string  sDp,
dyn_string  dsDpes,
dyn_string &  dsDpParameters,
dyn_string &  dsExceptionInfo 
)

Add alarm categories assigned to device to the device's output

Proxy for unProcessAlarm_getCategory.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
dsDpesdyn_string with the DPEs
dsDpParametersobject's output
dsExceptionInfoexception info

◆ cpcExportGenericFunctions_getAcknowledgeAlarmValue()

string cpcExportGenericFunctions_getAcknowledgeAlarmValue ( string  sDp,
string  sDpe = ".ProcessInput.PosSt" 
)

Returns if dpe's alarm acknowledgeable

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
sDpename of acknowledgeable's dpe, ProcessInput.PosSt by default

References CPC_CONFIG_ALARM_ACK_POSTFIX.

Referenced by CPC_AnalogAlarm_ButtonConfig(), CPC_AnalogAlarm_FaceplateInitStatics(), CPC_DigitalAlarm_ButtonConfig(), CPC_DigitalAlarm_FaceplateInitStatics(), CPC_DigitalInput_FaceplateInitStatics(), CPC_Local_ButtonConfig(), CPC_Local_FaceplateInitStatics(), and cpcExportGenericFunctions_getAcknowledgeAlarm().

◆ cpcExportGenericFunctions_getAcknowledgeAlarm()

void cpcExportGenericFunctions_getAcknowledgeAlarm ( string  sDp,
string  sAlarmDp,
dyn_string &  dsDpParameters,
dyn_string &  dsExceptionInfo 
)

Add acknowledgeable value to the device's output

Constraints
None
Usage
Public
PVSS managers
UI
Todo:
unify format: rename alarmDP to dpe and move to the end of parameters
Parameters
sDpcurrent dp name
sAlarmDpname of acknowledgeable's dpe
dsDpParametersobject's output
dsExceptionInfoexception info

References cpcExportGenericFunctions_getAcknowledgeAlarmValue().

◆ cpcExportGenericFunctions_get5AlertLimits()

void cpcExportGenericFunctions_get5AlertLimits ( string  sDp,
dyn_string &  dsDpParameters 
)

Add alarm's threshold values to the device's output

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
dsDpParametersobject's output

◆ cpcExportGenericFunctions_get5AlertClasses()

void cpcExportGenericFunctions_get5AlertClasses ( string  sDp,
dyn_string &  dsClasses,
dyn_string &  dsExceptionInfo,
string  sDpe = ".ProcessInput.PosSt" 
)

Fetch classes of 5-range alert

Constraints
None
Usage
Public
PVSS managers
UI
Todo:
return dsClasses instead
Parameters
sDpcurrent dp name
dsClassesoutput
dsExceptionInfoexception info
sDpename of dpe with 5-range alert, ProcessInput.PosSt by default

Referenced by cpcExportGenericFunctions_get5AlertAcknowledgeAlarmValue().

◆ cpcExportGenericFunctions_get5AlertAcknowledgeAlarmValue()

string cpcExportGenericFunctions_get5AlertAcknowledgeAlarmValue ( string  sDp,
dyn_string &  dsExceptionInfo 
)

Return is 5-range alert acknowledgeable

If at least one of thresholds contains CPC_CONFIG_ALARM_ACK_POSTFIX in the alert class, alert is acknowledgeable

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
dsExceptionInfoexception info

References CPC_CONFIG_ALARM_ACK_POSTFIX, and cpcExportGenericFunctions_get5AlertClasses().

Referenced by CPC_AnalogInput_FaceplateInitStatics(), CPC_AnalogStatus_ButtonSetState(), CPC_AnalogStatus_FaceplateInitStatics(), CPC_WordStatus_ButtonSetState(), and cpcExportGenericFunctions_get5AlertAcknowledgeAlarm().

◆ cpcExportGenericFunctions_get5AlertAcknowledgeAlarm()

void cpcExportGenericFunctions_get5AlertAcknowledgeAlarm ( string  sDp,
string  sAlarmDp,
dyn_string &  dsDpParameters,
dyn_string &  dsExceptionInfo 
)

Add is 5-range alert acknowledgeable to the device's output

Constraints
None
Usage
Public
PVSS managers
UI
Todo:
unify format: rename alarmDP to dpe and move to the end of parameters
Parameters
sDpcurrent dp name
sAlarmDpname of acknowledgeable's dpe
dsDpParametersobject's output
dsExceptionInfoexception info

References cpcExportGenericFunctions_get5AlertAcknowledgeAlarmValue().

◆ cpcExportGenericFunctions_getAlarmActive()

void cpcExportGenericFunctions_getAlarmActive ( string  sDp,
dyn_string &  dsDpParameters,
string  sDpe = ".ProcessInput.PosSt" 
)

Add is alarm active to the device's output

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpcurrent dp name
dsDpParametersobject's output
sDpename of alarm dpe, ProcessInput.PosSt by default

◆ dynJoin()

string dynJoin ( dyn_string  dsArray,
string  sSeparator 
)

Convertion dyn_string into string; elements is glued via separator

Function returns an empty string if input array is empty or string with all elements of array merged with separator.

Constraints
None
Usage
Public
PVSS managers
UI
Todo:
move to generic place. reuse in other places
Parameters
dsArraydata to process
sSeparatoritem's separator
Returns
sResult string

Referenced by cpcExportGenericFunctions_getMetainfo(), cpcExportGenericFunctions_getParameters(), and cpcGenericObject_translateAlarmAcronym().

◆ cpcExportGenericFunctions_updateConversionParameters()

void cpcExportGenericFunctions_updateConversionParameters ( string  sDp,
string  sDpe,
dyn_string  dsExceptionInfo 
)

updates CPC_CONFIG_CONVERSION parameter based on _msg_conv dpe config

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDpdatapoint name
sDpedatapoint element
dsExceptionInfofor errors

References cpcGenericDpFunctions_setDeviceProperty().