unCPC6  6.6.2
WinCC-OA implementation of UNICOS CPC
 All Files Functions Variables Pages
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 &exceptionInfo)
 
void cpcExportGenericFunctions_getMetainfo (string sDp, dyn_string &dsDpParameters, dyn_string &exceptionInfo)
 
void cpcExportGenericFunctions_getUnit (string sDp, dyn_string &dsDpParameters, string dpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getFormat (string sDp, dyn_string &dsDpParameters, string dpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getSimpleFormat (string sDp, dyn_string &dsDpParameters, string dpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getRange (string sDp, dyn_string &dsDpParameters, dyn_string &exceptionInfo, string dpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getOutRange (string sDp, dyn_string &dsDpParameters, dyn_string &exceptionInfo, string dpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getDeadband (string sDp, dyn_string &dsDpParameters, dyn_string &exceptionInfo, string dpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getArchive (string sDp, dyn_string &dsDpParameters, string dpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getMaskEvent (string sDp, dyn_string &dsDpParameters)
 
void cpcExportGenericFunctions_getDefaultValue (string sDp, dyn_string &dsDpParameters, string dfltElementName="DfltVal")
 
void cpcExportGenericFunctions_getBoolDefaultValue (string sDp, dyn_string &dsDpParameters, string dfltElementName="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 key, dyn_string &exceptionInfo)
 
void cpcExportGenericFunctions_getDigitalNormalPosition (string sDP, string sObject, dyn_string dsDpElements, dyn_string &dsDpParameters)
 
void cpcExportGenericFunctions_getPCOParameters (string sDP, dyn_string &dsDpParameters)
 
void cpcExportGenericFunctions_getAutonomous (string sDP, dyn_string &dsDpParameters, string dpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getArchiveNameForDpes (string sDp, string defaultValue, dyn_string dsDpes, dyn_string &dsDpParameters)
 
dyn_string cpcExportGenericFunctions_getArchivedDpes (string deviceType, int archiveType)
 
void cpcExportGenericFunctions_getCategories (string sDP, dyn_string dpes, dyn_string &dsDpParameters, dyn_string &exceptionInfo)
 
string cpcExportGenericFunctions_getAcknowledgeAlarmValue (string sDP, string dpe=".ProcessInput.PosSt")
 
void cpcExportGenericFunctions_getAcknowledgeAlarm (string sDP, string alarmDP, dyn_string &dsDpParameters, dyn_string &exceptionInfo)
 
void cpcExportGenericFunctions_get5AlertLimits (string sDP, dyn_string &dsDpParameters)
 
void cpcExportGenericFunctions_get5AlertClasses (string sDP, dyn_string &dsClasses, dyn_string &exceptionInfo, string dpe=".ProcessInput.PosSt")
 
string cpcExportGenericFunctions_get5AlertAcknowledgeAlarmValue (string sDP, dyn_string &exceptionInfo)
 
void cpcExportGenericFunctions_get5AlertAcknowledgeAlarm (string sDP, string alarmDP, dyn_string &dsDpParameters, dyn_string &exceptionInfo)
 
void cpcExportGenericFunctions_getAlarmActive (string sDP, dyn_string &dsDpParameters, string dpe=".ProcessInput.PosSt")
 
string dynJoin (dyn_string array, string separator)
 
void cpcExportGenericFunctions_updateConversionParameters (string dp, string dpe, dyn_string exceptionInfo)
 
void cpcExportGenericFunctions_updateAlarmParameters (string dp, string dpe, string deviceTypeName, dyn_string exceptionInfo)
 

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

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
void cpcExportGenericFunctions_getUnit ( string  sDp,
dyn_string &  dsDpParameters,
string  dpe = ".ProcessInput.PosSt" 
)
void cpcExportGenericFunctions_getFormat ( string  sDp,
dyn_string &  dsDpParameters,
string  dpe = ".ProcessInput.PosSt" 
)
void cpcExportGenericFunctions_getSimpleFormat ( string  sDp,
dyn_string &  dsDpParameters,
string  dpe = ".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
dpename of format's dpe, ProcessInput.PosSt by default

Referenced by CPC_ControllerConfig_ExportConfig(), and CPC_MassFlowControllerConfig_ExportConfig().

void cpcExportGenericFunctions_getRange ( string  sDp,
dyn_string &  dsDpParameters,
dyn_string &  exceptionInfo,
string  dpe = ".ProcessInput.PosSt" 
)
void cpcExportGenericFunctions_getOutRange ( string  sDp,
dyn_string &  dsDpParameters,
dyn_string &  exceptionInfo,
string  dpe = ".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
exceptionInfoexception info
dpename of out range's dpe, ProcessInput.PosSt by default

Referenced by CPC_Word2AnalogStatusConfig_ExportConfig().

void cpcExportGenericFunctions_getDeadband ( string  sDp,
dyn_string &  dsDpParameters,
dyn_string &  exceptionInfo,
string  dpe = ".ProcessInput.PosSt" 
)
void cpcExportGenericFunctions_getDefaultValue ( string  sDp,
dyn_string &  dsDpParameters,
string  dfltElementName = "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
dfltElementNamedpe name, "DfltVal" by default

Referenced by CPC_AnalogParameterConfig_ExportConfig(), and CPC_WordParameterConfig_ExportConfig().

void cpcExportGenericFunctions_getBoolDefaultValue ( string  sDp,
dyn_string &  dsDpParameters,
string  dfltElementName = "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
dfltElementNamedpe name, "DfltVal" by default

Referenced by CPC_DigitalParameterConfig_ExportConfig().

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

Referenced by CPC_AnalogParameterConfig_ExportConfig(), CPC_ControllerConfig_ExportConfig(), CPC_DigitalParameterConfig_ExportConfig(), and CPC_WordParameterConfig_ExportConfig().

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

Referenced by CPC_ControllerConfig_ExportConfig().

void cpcExportGenericFunctions_getKeyDeviceConfiguration ( string  sDp,
dyn_string &  dsDpParameters,
string  key,
dyn_string &  exceptionInfo 
)

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
keykey in device configuration
exceptionInfoexception info

Referenced by CPC_AnalogAlarmConfig_ExportConfig(), CPC_AnalogInputConfig_ExportConfig(), CPC_AnalogOutputConfig_ExportConfig(), CPC_ControllerConfig_ExportConfig(), CPC_DigitalAlarmConfig_ExportConfig(), CPC_DigitalInputConfig_ExportConfig(), CPC_DigitalOutputConfig_ExportConfig(), CPC_LocalConfig_ExportConfig(), and CPC_MassFlowControllerConfig_ExportConfig().

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

Referenced by CPC_AnaDigConfig_ExportConfig(), CPC_AnaDOConfig_ExportConfig(), CPC_AnalogAlarmConfig_ExportConfig(), CPC_AnalogConfig_ExportConfig(), CPC_DigitalAlarmConfig_ExportConfig(), CPC_DigitalInputConfig_ExportConfig(), CPC_DigitalOutputConfig_ExportConfig(), CPC_LocalConfig_ExportConfig(), CPC_MassFlowControllerConfig_ExportConfig(), CPC_OnOffConfig_ExportConfig(), CPC_ProcessControlObjectConfig_ExportConfig(), and CPC_SteppingMotorConfig_ExportConfig().

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

Referenced by CPC_ProcessControlObjectConfig_ExportConfig().

void cpcExportGenericFunctions_getAutonomous ( string  sDP,
dyn_string &  dsDpParameters,
string  dpe = ".ProcessInput.PosSt" 
)

Add autonomous flag to the device's output

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
sDPcurrent dp name
dsDpParametersobject's output
dpename of autonomous's dpe, ProcessInput.PosSt by default
void cpcExportGenericFunctions_getArchiveNameForDpes ( string  sDp,
string  defaultValue,
dyn_string  dsDpes,
dyn_string &  dsDpParameters 
)
dyn_string cpcExportGenericFunctions_getArchivedDpes ( string  deviceType,
int  archiveType 
)
void cpcExportGenericFunctions_getCategories ( string  sDP,
dyn_string  dpes,
dyn_string &  dsDpParameters,
dyn_string &  exceptionInfo 
)

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
dsDpParametersobject's output
exceptionInfoexception info

Referenced by CPC_AnalogAlarmConfig_ExportConfig(), CPC_AnalogInputConfig_ExportConfig(), CPC_AnalogOutputConfig_ExportConfig(), CPC_DigitalAlarmConfig_ExportConfig(), CPC_DigitalInputConfig_ExportConfig(), CPC_DigitalOutputConfig_ExportConfig(), and CPC_LocalConfig_ExportConfig().

string cpcExportGenericFunctions_getAcknowledgeAlarmValue ( string  sDP,
string  dpe = ".ProcessInput.PosSt" 
)
void cpcExportGenericFunctions_getAcknowledgeAlarm ( string  sDP,
string  alarmDP,
dyn_string &  dsDpParameters,
dyn_string &  exceptionInfo 
)

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
alarmDPname of acknowledgeable's dpe
dsDpParametersobject's output
exceptionInfoexception info

References cpcExportGenericFunctions_getAcknowledgeAlarmValue().

Referenced by CPC_AnalogAlarmConfig_ExportConfig(), CPC_DigitalAlarmConfig_ExportConfig(), CPC_DigitalInputConfig_ExportConfig(), CPC_DigitalOutputConfig_ExportConfig(), and CPC_LocalConfig_ExportConfig().

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

Referenced by CPC_AnalogInputConfig_ExportConfig(), and CPC_AnalogOutputConfig_ExportConfig().

void cpcExportGenericFunctions_get5AlertClasses ( string  sDP,
dyn_string &  dsClasses,
dyn_string &  exceptionInfo,
string  dpe = ".ProcessInput.PosSt" 
)

Fetch classes of 5-range alert

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

Referenced by cpcExportGenericFunctions_get5AlertAcknowledgeAlarmValue().

string cpcExportGenericFunctions_get5AlertAcknowledgeAlarmValue ( string  sDP,
dyn_string &  exceptionInfo 
)

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
exceptionInfoexception info

References CPC_CONFIG_ALARM_ACK_POSTFIX, and cpcExportGenericFunctions_get5AlertClasses().

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

void cpcExportGenericFunctions_get5AlertAcknowledgeAlarm ( string  sDP,
string  alarmDP,
dyn_string &  dsDpParameters,
dyn_string &  exceptionInfo 
)

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
alarmDPname of acknowledgeable's dpe
dsDpParametersobject's output
exceptionInfoexception info

References cpcExportGenericFunctions_get5AlertAcknowledgeAlarmValue().

Referenced by CPC_AnalogInputConfig_ExportConfig(), and CPC_AnalogOutputConfig_ExportConfig().

void cpcExportGenericFunctions_getAlarmActive ( string  sDP,
dyn_string &  dsDpParameters,
string  dpe = ".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
dpename of alarm dpe, ProcessInput.PosSt by default

Referenced by CPC_AnalogInputConfig_ExportConfig(), and CPC_AnalogOutputConfig_ExportConfig().

string dynJoin ( dyn_string  array,
string  separator 
)

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
arraydata to process
separatoritem's separator
Returns
result string

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

void cpcExportGenericFunctions_updateConversionParameters ( string  dp,
string  dpe,
dyn_string  exceptionInfo 
)

updates CPC_CONFIG_CONVERSION parameter based on _msg_conv dpe config

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
dpdatapoint name
dpedatapoint element
exceptionInfofor errors

References cpcGenericDpFunctions_setDeviceProperty().

Referenced by CPC_AnalogStatusConfig_ExportConfig().