cpcExportGenericFunctions.ctl File Reference

This library contains generic exportation functions. More...

Functions

void cpcExportGenericFunctions_processAddress (string sDp, string deviceType, string dpeName, bool isInput, dyn_string &dsDpParameters)
string DRV_CMW_convertToUnicosAddress (string sDeviceDpeName, string sDeviceType)
void cpcExportGenericFunctions_processCMWAddress (string sDp, string deviceType, string dpe, bool isInput, dyn_string &dsDpParameters)
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)

©Copyright CERN 2013 - all rights reserved

Creation Date
06/04/2006
Constraints
None
Usage
Public
PVSS managers
UI, CTRL

Function Documentation

void cpcExportGenericFunctions_processAddress ( string  sDp,
string  deviceType,
string  dpeName,
bool  isInput,
dyn_string &  dsDpParameters 
)
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

void cpcExportGenericFunctions_processCMWAddress ( string  sDp,
string  deviceType,
string  dpe,
bool  isInput,
dyn_string &  dsDpParameters 
)

Add CMW DPE address to the device's output

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
sDp current dp name
deviceType device type
dpe dpe name (without path)
isInput should be true if it's in ProcessInput and false if it's in ProcessOutput
dsDpParameters object's output

References CPC_CMW_ADDRESS_CONFIG_SEPARATOR.

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

Add format without log_scale flag to the device's output

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
sDp current dp name
dsDpParameters object's output
dpe name 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" 
)

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

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
sDp current dp name
dsDpParameters object's output
exceptionInfo exception info
dpe name of range's dpe, ProcessInput.PosSt by default

Referenced by CPC_AnaDigConfig_ExportConfig(), CPC_AnaDOConfig_ExportConfig(), CPC_AnalogConfig_ExportConfig(), CPC_AnalogInputConfig_ExportConfig(), CPC_AnalogOutputConfig_ExportConfig(), CPC_AnalogParameterConfig_ExportConfig(), CPC_AnalogStatusConfig_ExportConfig(), CPC_ControllerConfig_ExportConfig(), CPC_SteppingMotorConfig_ExportConfig(), CPC_Word2AnalogStatusConfig_ExportConfig(), CPC_WordParameterConfig_ExportConfig(), and CPC_WordStatusConfig_ExportConfig().

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:
sDp current dp name
dsDpParameters object's output
exceptionInfo exception info
dpe name 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_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" 
)

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:
sDp current dp name
dsDpParameters object's output
dfltElementName dpe 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:
sDp current dp name
dsDpParameters object's output
dfltElementName dpe 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:
sDp Current DP name
sElementName The DPE name
dsDpParameters A dyn_string to which the value of the DPE is appended; the output of the function
sPrintFormat Optional sprintf() format used to print the DPE value; default is "", i.e. no custom formatting
sConfigDetailAttrib Optional 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:
sDp current dp name
dsDpParameters object'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:
sDp current dp name
dsDpParameters object's output
key key in device configuration
exceptionInfo exception 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:
sDP current dp name
sObject device type; don't used
dsDpElements an array of alarm dpes
dsDpParameters object'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:
sDP current dp name
dsDpParameters object'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:
sDP current dp name
dsDpParameters object's output
dpe name 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:
sDP current dp name
dsDpParameters object's output
exceptionInfo exception 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:
sDP current dp name
alarmDP name of acknowledgeable's dpe
dsDpParameters object's output
exceptionInfo exception 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:
sDP current dp name
dsDpParameters object'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:
sDP current dp name
dsClasses output
exceptionInfo exception info
dpe name 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:
sDP current dp name
exceptionInfo exception 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:
sDP current dp name
alarmDP name of acknowledgeable's dpe
dsDpParameters object's output
exceptionInfo exception 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:
sDP current dp name
dsDpParameters object's output
dpe name 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:
array data to process
separator item'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:
dp datapoint name
dpe datapoint element
exceptionInfo for errors

References cpcGenericDpFunctions_setDeviceProperty().

Referenced by CPC_AnalogStatusConfig_ExportConfig().


Generated on 18 Jun 2018 for unCPC6 by  doxygen 1.6.1