unCPC6 9.1.1
WinCC-OA implementation of UNICOS CPC
Loading...
Searching...
No Matches
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, 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()

◆ 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()

◆ cpcExportGenericFunctions_getMetainfo()

◆ cpcExportGenericFunctions_getUnit()

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

◆ cpcExportGenericFunctions_getFormat()

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

◆ 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

Referenced by CPC_ControllerConfig_ExportConfig(), and CPC_MassFlowControllerConfig_ExportConfig().

◆ cpcExportGenericFunctions_getRange()

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

◆ 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

Referenced by CPC_Word2AnalogStatusConfig_ExportConfig().

◆ cpcExportGenericFunctions_getDeadband()

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

◆ cpcExportGenericFunctions_getArchive()

◆ cpcExportGenericFunctions_getMaskEvent()

◆ 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

Referenced by CPC_AnalogParameterConfig_ExportConfig(), and CPC_WordParameterConfig_ExportConfig().

◆ 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

Referenced by CPC_DigitalParameterConfig_ExportConfig().

◆ 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

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

◆ 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

Referenced by CPC_ControllerConfig_ExportConfig().

◆ 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

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().

◆ 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

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().

◆ 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

Referenced by CPC_ProcessControlObjectConfig_ExportConfig().

◆ 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 
)

◆ cpcExportGenericFunctions_getArchivedDpes()

dyn_string cpcExportGenericFunctions_getArchivedDpes ( string  sDeviceType,
int  iArchiveType 
)

◆ 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

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

◆ cpcExportGenericFunctions_getAcknowledgeAlarmValue()

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

◆ 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().

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

◆ 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

Referenced by CPC_AnalogInputConfig_ExportConfig(), and CPC_AnalogOutputConfig_ExportConfig().

◆ 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_ButtonSetState(), CPC_AnalogInput_FaceplateInitStatics(), CPC_AnalogOutput_ButtonSetState(), CPC_AnalogStatus_ButtonSetState(), CPC_AnalogStatus_FaceplateInitStatics(), CPC_WordStatus_ButtonSetState(), and cpcExportGenericFunctions_get5AlertAcknowledgeAlarm().

◆ cpcExportGenericFunctions_get5AlertAcknowledgeAlarm()

void cpcExportGenericFunctions_get5AlertAcknowledgeAlarm ( string  sDp,
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().

Referenced by CPC_AnalogInputConfig_ExportConfig(), and CPC_AnalogOutputConfig_ExportConfig().

◆ 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

Referenced by CPC_AnalogInputConfig_ExportConfig(), and CPC_AnalogOutputConfig_ExportConfig().

◆ 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().

Referenced by CPC_AnalogStatusConfig_ExportConfig().