cpcGenericObject.ctl File Reference

This library contains generic functions for CPC objects. More...

Functions

void cpcGenericObject_WidgetXC_Animation (bool bLocked, string sSelectedManager, bit32 bit32StsReg01, bool bStsReg01Invalid, string sDpPosOV, int iPosOV, bool bInvalidBody, bool bInvalidLetter, int iSystemIntegrityAlarmValue, bool bSystemIntegrityAlarmEnabled, string sEvtMask, int iMask, bool lookupForLabel)
void cpcGenericObject_StringToMapping (string data, mapping &pairs)
void cpcConfigGenericFunctions_getPlcDpName (string sSystemName, string sPlcName, string &sPlcDpName, dyn_string &exceptionInfo)
void cpcGenericObject_SendBinaryOrder (string sDpName, string regName, int iManRegBit, string sKey, dyn_string &exceptionInfo)
void cpcGenericObject_SendManRegPulse (string sDpName, string regName, unsigned bitPosition, dyn_string &exceptionInfo, bool &alreadySent)
bool cpcGenericObject_SystemInvalid (bool bSystemIntegrityAlarmEnabled, int iSystemIntegrityAlarmValue)
void cpcGenericObject_WidgetValidnessAnimation (bool bSystemIntegrityAlarmEnabled, int iSystemIntegrityAlarmValue, bool dataInvalid, string &letter, string &color)
void cpcGenericObject_WidgetStsRegBitAnimation (bit32 bit32StsReg01, bool bStsReg01Invalid, bit32 bit32StsReg02, bool bStsReg02Invalid, dyn_int bits, dyn_int location, dyn_string letters, dyn_string colors, string &letter, string &color)
void cpcGenericObject_WidgetAlarmTextAnimationDoubleStsReg (bit32 bit32StsReg01, bit32 bit32StsReg02, dyn_int diBits, dyn_string dsLetters, dyn_int diBits2, dyn_string dsLetters2, string &letter, string &color)
void cpcGenericObject_WidgetAnimationDoubleStsReg (string sWidgetType, string sDpType, bool bLocked, string sSelectedManager, bit32 bit32StsReg01, bit32 bit32StsReg02, dyn_int diWarningBits, dyn_int diWarningBits2, dyn_string dsWarningLetters, dyn_string dsWarningLetters2, dyn_int diAlarmBits, dyn_string dsAlarmLetters, dyn_int diAlarmBits2, dyn_string dsAlarmLetters2, int iStartIStState, int iTStopIStState, int iFuStopIStState, int iAlSt, dyn_string diControlBitNames, string onBitConstant, string offBitConstant, int iAlUnackBitPosition, bool bInvalidLetter, bool bInvalidBody, int iSystemIntegrityAlarmValue, bool bSystemIntegrityAlarmEnabled)
void cpcGenericObject_WidgetAnimation (string sWidgetType, string sDpType, bool bLocked, string sSelectedManager, bit32 bit32StsReg01, dyn_int diWarningBits, dyn_string dsWarningLetters, dyn_int diAlarmBits, dyn_string dsAlarmLetters, dyn_string diControlBitNames, string onBitConstant, string offBitConstant, int iAlUnackBitPosition, bool bInvalidLetter, bool bInvalidBody, int iSystemIntegrityAlarmValue, bool bSystemIntegrityAlarmEnabled)
string cpcGenericObject_FormatValueWithUnit (float value, string format, string unit)
void cpcGenericObject_WidgetDisplayValueAnimation (string sShape, string sUnit, string sFormat, float fValue, string sColor, bool bInvalid)
void cpcGenericObject_HandleUnicosMenu (string deviceName, string sDpType, dyn_string menuList, int menuAnswer, dyn_string &exceptionInfo)
void cpcGenericObject_SendAllowToRestart (string deviceName, dyn_string &exceptionInfo)
void cpcGenericObject_addUnicosActionToMenu (string deviceName, string sDpType, dyn_string dsMenuConfig, dyn_string dsAccessOk, dyn_string &menuList)
void cpcGenericObject_addDefaultUnicosActionToMenu (string deviceName, string sDpType, dyn_string dsMenuConfig, dyn_string dsAccessOk, dyn_string &menuList)
void cpcGenericObject_notifyUsers (string deviceName, string sKey, dyn_string exceptionInfo)
void cpcGenericObject_UserCBGetButtonState (string deviceName, string sType, dyn_string &dsReturnData)
dyn_string cpcGenericObject_getCtrlLink (string sSystemName, dyn_string dsDeviceName)
void cpcGenericObject_animateTranslatedValue (string sShape, mapping dict, string unit, string format, anytype value, string color, bool invalid)
void cpcGenericObject_DisplayText (string value, string sShape, string sForeCol, bool bInvalid)
void cpcGenericObject_ColorBoxAnimateInterlock (string sShape, int pvssAlarmState, bool alarmState, bool alarmAck, bool bInvalid)
void cpcGenericObject_ColorBoxAnimate (string sShape, int iCommandbit, int iEnableBit, string sOneBackCol, bool bInvalid, string sZeroBackCol="unFaceplate_Unactive")
void cpcGenericObject_ColorBoxDisable (string sShape)
void cpcGenericObject_CheckboxAnimate (string sShape, bool state, bool enabled=true)
 cpcGenericObject_ButtonDisconnect (dyn_string dsShapes)
void cpcGenericObject_WidgetControlStateAnimation (bit32 bit32StsReg01, bit32 bit32StsReg02, dyn_string d_sBits, string &letter, string &color)
int cpcGenericObject_StsRegConstantNameToValue (string name, bit32 bit32StsReg01, bit32 bit32StsReg02)
void cpcGenericObject_SendBigPulse (string sDpName, string sDpe, bit32 value, dyn_string &exceptionInfo)
string cpcGenericObject_translateAlarmAcronym (dyn_string acronyms)
void cpcGenericObject_ColorBoxAnimateWarning (string sShape, int iAlarmState, bool isAlertExists, bool isAlertActive, bool isAlertInvalid)
void cpcGenericObject_ColorBoxAnimateAlarm (string sShape, int iAlarmState, bool isAlertExists, bool isAlertActive, bool isAlertInvalid, string activeColor="unFaceplate_AlarmActive", string notAckColor="unFaceplate_AlarmNotAck")
dyn_bool cpcGenericObject_GetAnalogAlarmType (string sDpe, int &iAlertType, dyn_string &exceptionInfo)
bool cpcGenericObject_isAlarmWithMail (string dpName, int alertType)
bool cpcGenericObject_isInMailSMS (string dpName)
bool cpcGenericObject_getBit (int value, int bitPosition)
void cpcGenericObject_WidgetDisconnection (string sWidgetType, string sDpType)
string cpcGenericObject_GetAnimationFunction (string sWidgetType)
void cpcGenericObject_OpenHierarchy (string deviceName)
void cpcGenericObject_OpenAlarmsPanel (string deviceName)
 cpcGenericObject_OpenRecipes (string deviceName)
dyn_int cpcGenericObject_getMaxWidgetSize (dyn_string objects)
string cpcGenericObject_getDeviceWidget (string device)
dyn_string cpcGenericObject_getLinkedAlarms (string device, dyn_string &exceptionInfo)
dyn_string cpcGenericObject_getLinkedObjects (string device, string childrenType, dyn_string &exceptionInfo)
 cpcGenericObject_selectDevice (string deviceName, string deviceType)
 cpcGenericObject_WidgetWarningAnimationDoubleStsReg (bit32 bit32StsReg01, bit32 bit32StsReg02, dyn_int diBits, dyn_int diBits2, dyn_string dsLetters, dyn_string dsLetters2, string &letter, string &color)
void cpcGenericObject_animateNeedRestart (dyn_string dpes, dyn_string values)
void cpcGenericObject_animateMaskEvent (dyn_string dpes, dyn_string values)

Detailed Description

This library contains generic functions for CPC objects.

Author:
Nikolay Kulman (IT-CO-FE)
Francisco Mico (IT-CO-FE)
Alexey Merezhin (EN-ICE-PLC)

©Copyright CERN 2013 - all rights reserved

Creation Date
08.07.2003
Constraints
None
Usage
Public
PVSS managers
UI, CTRL

Function Documentation

void cpcGenericObject_WidgetXC_Animation ( bool  bLocked,
string  sSelectedManager,
bit32  bit32StsReg01,
bool  bStsReg01Invalid,
string  sDpPosOV,
int  iPosOV,
bool  bInvalidBody,
bool  bInvalidLetter,
int  iSystemIntegrityAlarmValue,
bool  bSystemIntegrityAlarmEnabled,
string  sEvtMask,
int  iMask,
bool  lookupForLabel 
)
void cpcGenericObject_StringToMapping ( string  data,
mapping &  pairs 
)

Split a string like "key1=value1,key2=value2" into the mapping

Constraints
None
Usage
Public
PVSS managers
UI
Todo:
merge with splitCommaSeparatedString
Parameters:
data Input string with labels information
pairs Result mappint
Returns:
If function finishedf successfully

Referenced by CPC_MassFlowController_FaceplateInitStatics(), CPC_WordParameter_FaceplateInitStatics(), CPC_WordParameter_WidgetInitStatics(), CPC_WordStatus_FaceplateInitStatics(), CPC_WordStatus_WidgetInitStatics(), and CPC_WordStatusConfig_setCustomConfig().

void cpcConfigGenericFunctions_getPlcDpName ( string  sSystemName,
string  sPlcName,
string &  sPlcDpName,
dyn_string &  exceptionInfo 
)

Returns the full name of the PLC data point. Checks that PLC name is not empty and that PLC dp exists inside DB.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
sSystemName The name of the distributed system (can be empty if not set).
sPlcName The name of the plc.
sPlcDpName The full name of the plc dp.
exceptionInfo The list of exceptions.
void cpcGenericObject_SendBinaryOrder ( string  sDpName,
string  regName,
int  iManRegBit,
string  sKey,
dyn_string &  exceptionInfo 
)

Send a binary order to the PLC. Example : auto mode request etc.

Port of unGenericObject_SendBinaryOrder. Extended to support ManReg02

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
sDpName device name
regName ManReg name (e.g. "ManReg01")
iManRegBit bit position in ManReg
sKey catalogue key
exceptionInfo The list of exceptions.

References cpcGenericObject_notifyUsers(), and cpcGenericObject_SendManRegPulse().

Referenced by cpcGenericObject_HandleUnicosMenu().

void cpcGenericObject_SendManRegPulse ( string  sDpName,
string  regName,
unsigned  bitPosition,
dyn_string &  exceptionInfo,
bool &  alreadySent 
)

Send a pulse on a specified bit of ManReg

Port of unGenericObject_SendManRegPulse. Extended to support ManReg02

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
sDpName device name
regName ManReg name (e.g. "ManReg01")
bitPosition bit position in ManReg
exceptionInfo The list of exceptions.
alreadySent is bit already sent

Referenced by cpcGenericObject_SendBinaryOrder().

bool cpcGenericObject_SystemInvalid ( bool  bSystemIntegrityAlarmEnabled,
int  iSystemIntegrityAlarmValue 
)

Return front-end validness.

c_unSystemIntegrity_no_alarm_value (0) no alarm PLC is running, c_unSystemIntegrity_alarm_value_level1 (10): alarm PLC is not correctly running

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
bSystemIntegrityAlarmEnabled '$FRONT_END_DP$.alarm' value
iSystemIntegrityAlarmValue '$FRONT_END_DP$.enabled' value
Returns:
true if system invalid, otherwise false

Referenced by CPC_Controller_WidgetAnimation(), CPC_DigitalParameter_WidgetAnimation(), and cpcGenericObject_WidgetValidnessAnimation().

void cpcGenericObject_WidgetValidnessAnimation ( bool  bSystemIntegrityAlarmEnabled,
int  iSystemIntegrityAlarmValue,
bool  dataInvalid,
string &  letter,
string &  color 
)

Standart animation for the widget' letter

If system is invalid, then letter is "O" with "unDataNotValid" color. If data is invalid, then letter is "N" with "unDataNotValid" color. Function does not assign any other value/color.

Todo:

instead of dataInvalid iterate through ':_online.._invalid' dpes to construct this value

move to cpcWidget

Constraints
None
Usage
Public
PVSS managers
UI

References CPC_WIDGET_TEXT_INVALID, CPC_WIDGET_TEXT_OLD_DATA, and cpcGenericObject_SystemInvalid().

Referenced by CPC_AnalogAlarm_WidgetAnimation(), CPC_AnalogInput_WidgetAnimation(), CPC_AnalogParameter_WidgetAnimation(), CPC_AnalogStatus_WidgetAnimation(), CPC_DigitalAlarm_WidgetAnimation(), CPC_DigitalParameter_WidgetAnimation(), CPC_Local_WidgetAnimation(), CPC_Word2AnalogStatus_WidgetAnimation(), CPC_WordParameter_WidgetAnimation(), CPC_WordStatus_FaceplateStatusAnimationCB(), and CPC_WordStatus_WidgetAnimation().

void cpcGenericObject_WidgetStsRegBitAnimation ( bit32  bit32StsReg01,
bool  bStsReg01Invalid,
bit32  bit32StsReg02,
bool  bStsReg02Invalid,
dyn_int  bits,
dyn_int  location,
dyn_string  letters,
dyn_string  colors,
string &  letter,
string &  color 
)

Function sets color and value associated with last enabled bit in StsReg

Todo:
move to cpcWidget
Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
bit32StsReg01 StsReg01 value
bStsReg01Invalid is StsReg02 invalid
bit32StsReg02 StsReg02 value
bStsReg02Invalid is StsReg02 invalid
bits list of bits (positions)
location where's bit - 1 for StsReg01, 2 for StsReg02
letters list of bit's letters (associated by position in the array)
colors list of bit's colors (associated by position in the array)
letter result letter
color result color

Referenced by CPC_AnalogAlarm_WidgetAnimation().

void cpcGenericObject_WidgetAlarmTextAnimationDoubleStsReg ( bit32  bit32StsReg01,
bit32  bit32StsReg02,
dyn_int  diBits,
dyn_string  dsLetters,
dyn_int  diBits2,
dyn_string  dsLetters2,
string &  letter,
string &  color 
)

Animate the alarm part of the widget

diBits and dsLetters must have the same length. dyn arrays must be defined in priority order: lowest -> highest priority. diBits2 and dsLetters2 must have the same length. dyn arrays must be defined in priority order: lowest -> highest priority.

Todo:
move to cpcWidget
Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
bit32StsReg01 StsReg01 value
bit32StsReg02 StsReg02 value
diBits bit positions
dsLetters associated letters to be displayed
diBits2 bit positions
dsLetters2 associated letters to be displayed
letter the letter to be displayed
color the color to be used

Referenced by cpcGenericObject_WidgetAnimationDoubleStsReg().

void cpcGenericObject_WidgetAnimationDoubleStsReg ( string  sWidgetType,
string  sDpType,
bool  bLocked,
string  sSelectedManager,
bit32  bit32StsReg01,
bit32  bit32StsReg02,
dyn_int  diWarningBits,
dyn_int  diWarningBits2,
dyn_string  dsWarningLetters,
dyn_string  dsWarningLetters2,
dyn_int  diAlarmBits,
dyn_string  dsAlarmLetters,
dyn_int  diAlarmBits2,
dyn_string  dsAlarmLetters2,
int  iStartIStState,
int  iTStopIStState,
int  iFuStopIStState,
int  iAlSt,
dyn_string  diControlBitNames,
string  onBitConstant,
string  offBitConstant,
int  iAlUnackBitPosition,
bool  bInvalidLetter,
bool  bInvalidBody,
int  iSystemIntegrityAlarmValue,
bool  bSystemIntegrityAlarmEnabled 
)

Animate widget

di$...$Bits and ds$...$Letters must have the same length. dyn arrays must be defined in priority order: lowest -> highest priority .

Todo:
move to cpcWidget
Constraints
None
Usage
Internal
PVSS managers
UI
Parameters:
sWidgetType widget type = dpType + widgetType. ex: AnaDigHeater
sDpType object
bLocked for select animation
sSelectedManager for select animation
bit32StsReg01 status register
bit32StsReg02 status register (empty in case of not using the stsReg02)
diWarningBits warning bit positions in status register.
diWarningBits2 warning bit positions in status register. (empty in case of not using the stsReg02)
dsWarningLetters associated warning letters to be displayed.
dsWarningLetters2 associated warning letters to be displayed. (empty in case of not using the stsReg02)
diAlarmBits alarm bit positions in status register (StsReg01).
dsAlarmLetters associated alarm letters to be displayed (StsReg01).
diAlarmBits2 alarm bit positions in status register (StsReg02).
dsAlarmLetters2 associated alarm letters to be displayed (StsReg02).
iStartIStState start interlock dpe value
iTStopIStState temporal stop interlock dpe value
iFuStopIStState full stop interlock dpe value
iAlSt alarm dpe value
diControlBitNames list of StsReg constants for controls
onBitConstant on bit constant name
offBitConstant off bit constant name
iAlUnackBitPosition alarm unack status bit position in status register
bInvalidLetter true if invalid letter as to be shown
bInvalidBody invalid animation on body ?
iSystemIntegrityAlarmValue the value of the systemIntegrity alarm for the PLC:
bSystemIntegrityAlarmEnabled the systemIntegrity alarm is enabled

References CPC_StsReg02_NEEDRESTART, CPC_WIDGET_TEXT_ALARM_FUSTOPIST, CPC_WIDGET_TEXT_ALARM_TSTOPIST, CPC_WIDGET_TEXT_CONTROL_FORCED, CPC_WIDGET_TEXT_INVALID, CPC_WIDGET_TEXT_MANUAL_RESTART, CPC_WIDGET_TEXT_OLD_DATA, cpcGenericObject_GetAnimationFunction(), cpcGenericObject_StsRegConstantNameToValue(), cpcGenericObject_WidgetAlarmTextAnimationDoubleStsReg(), and cpcGenericObject_WidgetControlStateAnimation().

Referenced by CPC_AnaDig_WidgetAnimation(), CPC_AnaDO_WidgetAnimation(), CPC_Analog_WidgetAnimation(), CPC_MassFlowController_WidgetAnimation(), CPC_OnOff_WidgetAnimation(), CPC_SteppingMotor_WidgetAnimation(), and cpcGenericObject_WidgetAnimation().

void cpcGenericObject_WidgetAnimation ( string  sWidgetType,
string  sDpType,
bool  bLocked,
string  sSelectedManager,
bit32  bit32StsReg01,
dyn_int  diWarningBits,
dyn_string  dsWarningLetters,
dyn_int  diAlarmBits,
dyn_string  dsAlarmLetters,
dyn_string  diControlBitNames,
string  onBitConstant,
string  offBitConstant,
int  iAlUnackBitPosition,
bool  bInvalidLetter,
bool  bInvalidBody,
int  iSystemIntegrityAlarmValue,
bool  bSystemIntegrityAlarmEnabled 
)

Animate widget

di$...$Bits and ds$...$Letters must have the same length. dyn arrays must be defined in priority order: lowest -> highest priority .

Todo:
move to cpcWidget
Constraints
None
Usage
Internal
PVSS managers
UI
Parameters:
sWidgetType widget type = dpType + widgetType. ex: AnaDigHeater
sDpType object
bLocked for select animation
sSelectedManager for select animation
bit32StsReg01 status register
diWarningBits warning bit positions in status register.
dsWarningLetters associated warning letters to be displayed.
diAlarmBits alarm bit positions in status register.
dsAlarmLetters associated alarm letters to be displayed.
diControlBitNames list of StsReg constants for controls
onBitConstant on bit constant name
offBitConstant off bit constant name
iAlUnackBitPosition alarm unack status bit position in status register
bInvalidLetter true if invalid letter as to be shown
bInvalidBody invalid animation on body ?
iSystemIntegrityAlarmValue the value of the systemIntegrity alarm for the PLC:
bSystemIntegrityAlarmEnabled the systemIntegrity alarm is enabled

References cpcGenericObject_WidgetAnimationDoubleStsReg().

Referenced by CPC_Controller_WidgetAnimation().

string cpcGenericObject_FormatValueWithUnit ( float  value,
string  format,
string  unit 
)

Returns formatted value concatenated with unit

Constraints
None
Usage
Internal
PVSS managers
UI
Parameters:
value original value
format dpe format
unit dpe unit
Returns:
formatted value with unit

Referenced by CPC_AnalogStatus_WidgetAnimation(), CPC_Controller_WidgetAnimation(), CPC_Word2AnalogStatus_WidgetAnimation(), and CPC_WordParameter_WidgetAnimation().

void cpcGenericObject_WidgetDisplayValueAnimation ( string  sShape,
string  sUnit,
string  sFormat,
float  fValue,
string  sColor,
bool  bInvalid 
)

Animation of widget display values

Todo:
move to cpcWidget
Constraints
None
Usage
Internal
PVSS managers
UI
Parameters:
sShape display values shapes
sUnit dpe unit
sFormat dpe format
fValue dpe value
sColor animation color
bInvalid is dpe invalid

Referenced by CPC_AnalogAlarm_WidgetAnimation(), CPC_AnalogParameter_WidgetAnimation(), and CPC_MassFlowController_WidgetAnimation().

void cpcGenericObject_HandleUnicosMenu ( string  deviceName,
string  sDpType,
dyn_string  menuList,
int  menuAnswer,
dyn_string &  exceptionInfo 
)
void cpcGenericObject_addUnicosActionToMenu ( string  deviceName,
string  sDpType,
dyn_string  dsMenuConfig,
dyn_string  dsAccessOk,
dyn_string &  menuList 
)
void cpcGenericObject_addDefaultUnicosActionToMenu ( string  deviceName,
string  sDpType,
dyn_string  dsMenuConfig,
dyn_string  dsAccessOk,
dyn_string &  menuList 
)
void cpcGenericObject_notifyUsers ( string  deviceName,
string  sKey,
dyn_string  exceptionInfo 
)

Notify users about success or failed operation

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
deviceName device name
sKey message key. unCPCOperator.cat msg catalog should contain $KEY$OK and $KEY$FAILED messages
exceptionInfo 'OK' message if it's emtpy.

Referenced by cpcGenericObject_HandleUnicosMenu(), and cpcGenericObject_SendBinaryOrder().

void cpcGenericObject_UserCBGetButtonState ( string  deviceName,
string  sType,
dyn_string &  dsReturnData 
)

Function called before the button set state when a user logs in. Common function for all the UNICOS device types.

Constraints
This library works with an unicos button panel and need global variables declared in this panel
  • g_dsUserAccess, dyn_string, button identifier is added to this variable if user access
  • $sDpName, string, the device DP name
  • g_sFaceplateButtonType, string, faceplate type
Usage
Public
PVSS managers
UI
Parameters:
deviceName device name
sType device type
dsReturnData data
dyn_string cpcGenericObject_getCtrlLink ( string  sSystemName,
dyn_string  dsDeviceName 
)

Get the list of Controller

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
sSystemName system name
dsDeviceName list of devices

Referenced by CPC_AnaDig_WidgetInitStatics(), CPC_AnaDO_WidgetInitStatics(), CPC_Analog_WidgetInitStatics(), CPC_MassFlowController_WidgetInitStatics(), and CPC_SteppingMotor_WidgetInitStatics().

void cpcGenericObject_animateTranslatedValue ( string  sShape,
mapping  dict,
string  unit,
string  format,
anytype  value,
string  color,
bool  invalid 
)

Animate value translated

Todo:
move to the unFaceplate
See also:
unFaceplate_animateTranslatedValue
Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
sShape graphical object name
dict dictionary mapping
unit value's unit
format value's format
value value to translate/animate
color animation color
invalid is dpe invalid
void cpcGenericObject_DisplayText ( string  value,
string  sShape,
string  sForeCol,
bool  bInvalid 
)

Animate text value

Todo:

move to the unFaceplate

unify params order

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
value value to translate/animate
sShape graphical object name
sForeCol animation color
bInvalid is dpe invalid

Referenced by CPC_AnalogAlarm_FaceplateInitStatics(), CPC_DigitalAlarm_FaceplateInitStatics(), and CPC_ProcessControlObject_animateOptionMode().

void cpcGenericObject_ColorBoxAnimateInterlock ( string  sShape,
int  pvssAlarmState,
bool  alarmState,
bool  alarmAck,
bool  bInvalid 
)

Animate interlock

Todo:
move to the unFaceplate
Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
sShape graphical object name
pvssAlarmState state of pvss alert (value of ":_alert_hdl.._act_state" property of dpe)
alarmState state in StsReg
alarmAck is alarm acknowledged (normally it's a CPC_StsReg01_ALUNACK value)
bInvalid is dpe invalid
void cpcGenericObject_ColorBoxAnimate ( string  sShape,
int  iCommandbit,
int  iEnableBit,
string  sOneBackCol,
bool  bInvalid,
string  sZeroBackCol = "unFaceplate_Unactive" 
)

Animate boolean (bit) value

Todo:
move to the unFaceplate
Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
sShape graphical object name
iCommandbit bit value
iEnableBit is bit enabled
sOneBackCol active color
bInvalid is dpe invalid
sZeroBackCol inactive color

Referenced by CPC_AnalogInput_FaceplateStatusAnimationCB(), CPC_AnalogStatus_FaceplateStatusAnimationCB(), CPC_DigitalInput_FaceplateStatusAnimationCB(), CPC_Local_FaceplateStatusAnimationCB(), CPC_MassFlowController_FaceplateStatusAnimationCB(), and cpcGenericObject_animateNeedRestart().

void cpcGenericObject_ColorBoxDisable ( string  sShape  ) 

Disable colorbox

Todo:
move to the unFaceplate
Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
sShape graphical object name
void cpcGenericObject_CheckboxAnimate ( string  sShape,
bool  state,
bool  enabled = true 
)
cpcGenericObject_ButtonDisconnect ( dyn_string  dsShapes  ) 

Animate faceplate buttons disconnection

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
dsShapes buttons (graphical objects) to disconnect
void cpcGenericObject_WidgetControlStateAnimation ( bit32  bit32StsReg01,
bit32  bit32StsReg02,
dyn_string  d_sBits,
string &  letter,
string &  color 
)

Control state animation

Based on constant's name convention, function find an active bit and set according letter (CPC_WIDGET_TEXT_CONTROL_$BIT_NAME$) and color (unWidget_ControlStateManualLocal or unWidget_ControlStateForced if letter == CPC_WIDGET_TEXT_CONTROL_FORCED)

Todo:
move to cpcWidget
Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
bit32StsReg01 StsReg01 value
bit32StsReg02 StsReg02 value
d_sBits list of bit constants
letter result letter
color result color

References CPC_WIDGET_TEXT_CONTROL_FORCED, cpcConfigGenericFunctions_getConstantByName(), and cpcConfigGenericFunctions_getStringConstantByName().

Referenced by CPC_ProcessControlObject_WidgetAnimation(), and cpcGenericObject_WidgetAnimationDoubleStsReg().

int cpcGenericObject_StsRegConstantNameToValue ( string  name,
bit32  bit32StsReg01,
bit32  bit32StsReg02 
)

Retrieve an online value of a bit

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
name bit name (position constant)
bit32StsReg01 StsReg01 value
bit32StsReg02 StsReg02 value
Returns:
a bit value from StsReg

References cpcConfigGenericFunctions_getConstantByName().

Referenced by cpcGenericObject_WidgetAnimationDoubleStsReg().

void cpcGenericObject_SendBigPulse ( string  sDpName,
string  sDpe,
bit32  value,
dyn_string &  exceptionInfo 
)

Send a pulse with a specified number

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
sDpName object name
sDpe Dpe name
value the pulse value of ManReg
exceptionInfo details of any exceptions are returned here
string cpcGenericObject_translateAlarmAcronym ( dyn_string  acronyms  ) 

Translate interlock acronyms

Todo:
move to unFaceplate
Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
acronyms types of linked interlocks
Returns:
human representation for linked interlocks

References dynJoin().

Referenced by CPC_AnalogAlarm_FaceplateInitStatics(), and CPC_DigitalAlarm_FaceplateInitStatics().

void cpcGenericObject_ColorBoxAnimateWarning ( string  sShape,
int  iAlarmState,
bool  isAlertExists,
bool  isAlertActive,
bool  isAlertInvalid 
)

Animate warning colorBoxes

Color :

  • if alert hdl does not exist, backcolor = "unAlarmDoesNotExist"
  • else if bInvalid = true, backcolor = "unDataNotValid"
  • else if alarm unack., backcolor = "unFaceplate_AlarmNotAck"
  • else if alarm active and ack., backcolor = "unFaceplate_AlarmActive"
  • else backcolor = "unFaceplate_Unactive"
Todo:
move to unFaceplate
Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
sShape colorbox shape name
iAlarmState act state alarm
isAlertExists is alert exist
isAlertActive is alert active
isAlertInvalid is alert invalid

References cpcGenericObject_ColorBoxAnimateAlarm().

Referenced by CPC_AnalogInput_FaceplateStatusAnimationCB(), and CPC_AnalogStatus_FaceplateStatusAnimationCB().

void cpcGenericObject_ColorBoxAnimateAlarm ( string  sShape,
int  iAlarmState,
bool  isAlertExists,
bool  isAlertActive,
bool  isAlertInvalid,
string  activeColor = "unFaceplate_AlarmActive",
string  notAckColor = "unFaceplate_AlarmNotAck" 
)

Animate alarm colorBoxes

Color :

  • if alert hdl does not exist, backcolor = "unAlarmDoesNotExist"
  • else if bInvalid = true, backcolor = "unDataNotValid"
  • else if alarm unack., backcolor = "unFaceplate_AlarmNotAck"
  • else if alarm active and ack., backcolor = "unFaceplate_AlarmActive"
  • else backcolor = "unFaceplate_Unactive"
Todo:
move to unFaceplate
Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
sShape colorbox shape name
iAlarmState act state alarm
isAlertExists is alert exist
isAlertActive is alert active
isAlertInvalid is alert invalid
activeColor active color, default is "unFaceplate_AlarmActive"
notAckColor not acknowledge color, default is "unFaceplate_AlarmNotAck"

Referenced by CPC_AnalogInput_FaceplateStatusAnimationCB(), CPC_AnalogStatus_FaceplateStatusAnimationCB(), CPC_DigitalInput_FaceplateStatusAnimationCB(), CPC_Local_FaceplateStatusAnimationCB(), and cpcGenericObject_ColorBoxAnimateWarning().

dyn_bool cpcGenericObject_GetAnalogAlarmType ( string  sDpe,
int &  iAlertType,
dyn_string &  exceptionInfo 
)

Retrieve 5 ranges alarm type

Return in iAlertType:

  1. DPCONFIG_ALERT_NONBINARYSIGNAL if Unicos 5 ranges alert_hdl is correct (and if sDpe is analogic)
  2. DPCONFIG_ALERT_BINARYSIGNAL for boolean sDpe
  3. DPCONFIG_NONE if no alert_hdl is defined or if alert_hdl is a bad analogic alarm
Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
sDpe dpe
iAlertType alert type
exceptionInfo for errors

Referenced by CPC_AnalogInput_FaceplateInitStatics(), CPC_AnalogInput_WidgetInitStatics(), CPC_AnalogStatus_FaceplateInitStatics(), and CPC_AnalogStatus_WidgetInitStatics().

bool cpcGenericObject_isAlarmWithMail ( string  dpName,
int  alertType 
)

Return is alarm configured with Mail/SMS

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
dpName dpe
alertType alert type
bool cpcGenericObject_isInMailSMS ( string  dpName  ) 
bool cpcGenericObject_getBit ( int  value,
int  bitPosition 
)

Is bit set in StsReg value

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
value (StsReg) value
bitPosition bit position
void cpcGenericObject_WidgetDisconnection ( string  sWidgetType,
string  sDpType 
)
string cpcGenericObject_GetAnimationFunction ( string  sWidgetType  ) 

Return widget animation function for a given widget type

Constraints
None
Usage
Public
PVSS managers
UI

Referenced by CPC_Local_WidgetAnimation(), CPC_ProcessControlObject_WidgetAnimation(), and cpcGenericObject_WidgetAnimationDoubleStsReg().

void cpcGenericObject_OpenHierarchy ( string  deviceName  ) 

Open hierarchy window for a device

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
deviceName device name

Referenced by cpcGenericObject_HandleUnicosMenu().

void cpcGenericObject_OpenAlarmsPanel ( string  deviceName  ) 

Open alarm window for a device

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
deviceName device name

Referenced by cpcGenericObject_HandleUnicosMenu().

cpcGenericObject_OpenRecipes ( string  deviceName  ) 

Open recipe window

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
deviceName device name

Referenced by cpcGenericObject_HandleUnicosMenu().

dyn_int cpcGenericObject_getMaxWidgetSize ( dyn_string  objects  ) 

Returns max width and max height withing objects widgets

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
objects list of objects

References cpcGenericObject_getDeviceWidget().

string cpcGenericObject_getDeviceWidget ( string  device  ) 

Returns a widget associated with device.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
device device name

Referenced by cpcGenericObject_getMaxWidgetSize().

dyn_string cpcGenericObject_getLinkedAlarms ( string  device,
dyn_string &  exceptionInfo 
)

Return a list of alarms linked to object

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
device device name
exceptionInfo for errors

References CPC_CONFIG_CHILDREN_KEY.

Referenced by cpcGenericObject_addDefaultUnicosActionToMenu().

dyn_string cpcGenericObject_getLinkedObjects ( string  device,
string  childrenType,
dyn_string &  exceptionInfo 
)

Returns device's childrens filtered by type

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
device device name
childrenType dp type to fileter children with
exceptionInfo for errors

References CPC_CONFIG_CHILDREN_KEY.

Referenced by _unRecipeFunctions_getPcoChildren().

cpcGenericObject_selectDevice ( string  deviceName,
string  deviceType 
)

Cloned from UN_INFOS/unWidget_SelectArea.pnl TODO: move to unCore

Constraints
None
Usage
Public
PVSS managers
UI
void cpcGenericObject_animateNeedRestart ( dyn_string  dpes,
dyn_string  values 
)

Animate 'allow restart needed' bit.

Faceplate should contain unFaceplate_Colorbox.pnl graphical object named "NEEDRESTART".

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
dpes connected dpe names
values connected dpe values

References cpcGenericObject_ColorBoxAnimate().

Referenced by CPC_AnaDig_FaceplateStatusAnimationCB(), CPC_AnaDO_FaceplateStatusAnimationCB(), CPC_Analog_FaceplateStatusAnimationCB(), CPC_OnOff_FaceplateStatusAnimationCB(), CPC_ProcessControlObject_FaceplateStatusAnimationCB(), and CPC_SteppingMotor_FaceplateStatusAnimationCB().

void cpcGenericObject_animateMaskEvent ( dyn_string  dpes,
dyn_string  values 
)

Generated on 18 Jun 2018 for unCPC6 by  doxygen 1.6.1