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) |
void | cpcGenericObject_WidgetDIDOAnimation (bool bLocked, string sSelectedManager, bit32 bit32StsReg01, bool bStsReg01Invalid, bool bBoolAlert, bool bIsAlarmActive, int iActState, bool bAckPossible, int iSystemIntegrityAlarmValue, bool bSystemIntegrityAlarmEnabled) |
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_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_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) |
This library contains generic functions for CPC objects.
©Copyright CERN 2013 - all rights reserved
13/09/2012: Alexey [UCPC-931] allows to open alarm list from the right click menu
16/05/2012: Alexey [UCPC-787] cpcGenericObject_WidgetAnimationDoubleStsReg: widget doesn't blink on AlSt
29/02/2012: Alexey ported unGenericObject_WidgetDisplayValueAnimation
14/02/2012: Alexey [UCPC-665] don't animate letters in widget when stsreg is invalid
09/02/2012: Alexey [UCPC-646] disable diagnostic popup item when device has it empty
20/01/2012: Alexey removed cpcGenericObject_DisplayValueOrLabel as unused added cpcGenericObject_animateTranslatedValue
13/12/2011: Alexey [UCPC-630] grayed info popup item when needed
12/12/2011: Alexey added AA 'mask PVSS alarm' handler
24/11/2011: Alexey fixed 'Manual IO Error Block' menu item text
23/11/2011: Alexey removed cpcGenericObject_HandleAlarmMaskMenu, cpcGenericObject_addMaskToMenu moved cpcGenericObject_HandleEventMaskMenu to the cpcGenericObject_HandleUnicosMenu [UCPC-603] cloned cpcGenericObject_addDefaultUnicosActionToMenu and cpcGenericObject_addTrendActionToMenu; clean up menu builders and handlers
31/10/2011: Alexey [UCPC-593] used cpcGenericObject_GetAnimationFunction and cpcGenericObject_WidgetDisconnection instead of core
28/10/2011: Alexey [UCPC-434] added damper animation method
20/10/2011: Alexey [UCPC-572] Analog/OnOff/Anadig/AnaDO: blink when unack without specific alert cpcGenericObject_translateAlarmAcronym works with types in a format "type:alias"
04/10/2011: Alexey added isAlertExists to cpcGenericObject_ColorBoxAnimateWarning and cpcGenericObject_ColorBoxAnimateAlarm
03/10/2011: Alexey added Mail/SMS handle in the cpcGenericObject_HandleUnicosMenu removed cpcGenericObject_WidgetAIAOAnimation extended cpcGenericObject_CheckboxAnimate with enabled option added cpcGenericObject_ColorBoxAnimate [UCPC-562] added cpcGenericObject_GetAnalogAlarmType, cpcGenericObject_isAlarmWithMail (instead of unProcessAlarm_isDpConfigured) and cpcGenericObject_getBit to process StsReg as float not bit32
30/09/2011: Alexey [UCPC-567] added interlock status to the cpcGenericObject_WidgetAnimationDoubleStsReg; updated cpcGenericObject_WidgetAnimation
21/09/2011: Alexey [UCPC-546] added cpcGenericObject_ColorBoxAnimateAlarm and refactored cpcGenericObject_ColorBoxAnimateWarning
20/09/2011: Alexey [UCPC-548] added cpcGenericObject_CheckboxAnimate
16/09/2011: Alexey [UCPC-525] use cpcConfigGenericFunctions_setMaskEvent in cpcGenericObject_HandleEventMaskMenu
14/09/2011: Alexey [UCPC-534] cpcGenericObject_translateAlarmAcronym process types as a dyn_string
13/09/2011: Alexey [UCPC-531] added cpcGenericObject_StsRegConstantNameToValue moved cpcGenericObject_WidgetAnimateManualRestart into cpcGenericObject_WidgetAnimationDoubleStsReg changed on/off constants to string in the cpcGenericObject_WidgetAnimationDoubleStsReg
25/08/2011: Alexey [UCPC-387] added multiple type to the cpcGenericObject_translateAlarmAcronym
10/08/2011: Alexey [UCPC-460] added MaskISt popup item removed Mail-SMS from generic as related only to the DA fixed cpcGenericObject_addUnicosActionToMenu rights granting
04/08/2011: Alexey [UCPC-454] fixed Deblock PLC Alarm popup's condition
02/08/2011: Alexey [UCPC-437] display H/L thresholds as warnings
27/07/2011: Alexey [UCPC-387] added cpcGenericObject_translateAlarmAcronym
13/07/2011: Alexey use widget-specific animation function in cpcGenericObject_WidgetAnimateManualRestart
05/07/2011: Alexey [UCPC-323] moved ManRestart animation from cpcGenericObject_WidgetAnimationDoubleStsReg to cpcGenericObject_WidgetAnimateManualRestart
28/06/2011: Alexey added cpcGenericObject_WidgetControlStateAnimation; use it in cpcGenericObject_WidgetAnimation
27/06/2011: Alexey [UCPC-323] color Field objects widget with orange when NeedRestart bit is on
23/06/2011: Alexey [UCPC-206] moved cpcGenericObject_getCtrlLink from unAnaDig; now it returns links to stsreg01 dpes added cpcGenericObject_WidgetCtrlAnimationCB which animated control object letters (used in Analog/AnaDig) [UCPC-328] added cpcGenericObject_ColorBoxAnimateInterlock
2011/05/25 Alexey display 'Manual IO Error Block' in widget in Input/Output objects
2011/05/20 Alexey made cpcGenericObject_notifyUsers to simplify use notification (refactor cpcGenericObject_SendBinaryOrder to use it) notify about mask/unmask events and ioErrorBlocking
2011/05/19 Alexey made getIOErrorBlocking function for getting number of IOErrorBlocking menu item
2011/05/17 amerezhi cloned unGenericObject_WidgetDIDOAnimation and unGenericObject_WidgetAIAOAnimation functions cloned cpcGenericObject_WidgetAnimation, cpcGenericObject_WidgetAnimationDoubleStsReg and cpcGenericObject_WidgetAlarmTextAnimationDoubleStsReg functions created wrapping cpcGenericObject_HandleUnicosMenu function ported cpcGenericObject_addUnicosActionToMenu
23/11/10 quique [UCPC-33] WordStatus bit description not correctly shown; Function: cpcGenericObject_GetLabelsFromString()
22/10/10 amerezhi: merged with ABCO version:
28/01/2010: Herve
Revision 1.18 2008/11/12 09:17:39 gthomas -removed _isRoot function
Revision 1.17 2008/09/12 13:45:08 gthomas Fixed variable typo in cpcGenericObject_DisplayValueOrLabel fct.
Revision 1.16 2008/09/04 14:48:11 gthomas -moved back to version 1.12
Revision 1.15 2008/06/13 12:29:47 aabadz Modifications asked by UNICOS for their version 4.X
Revision 1.14 2008/06/09 14:54:26 aabadz Result after move some constants, only use use inside this file, from gcsObjects_declarations.
Revision 1.13 2008/05/26 12:18:19 gthomas Merged files with modifications made by ABCO on xS and xP (GCS-ABCO-v4-1) to be used with PVSS 3.6 QT
Revision 1.12 2008/01/22 14:46:36 aabadz Fixed:
Revision 1.11 2008/01/15 09:50:13 aabadz Changes after code review and before tests
Revision 1.10 2007/10/30 16:21:58 gthomas Introduced the CVS keyword $Log to track changes made in the library
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 | |||
) |
Animate AC / WC widget
References CPC_WIDGET_TEXT_CONTROL_FORCED, CPC_WIDGET_TEXT_CONTROL_MANUAL, CPC_WIDGET_TEXT_INVALID, CPC_WIDGET_TEXT_OLD_DATA, CPC_WIDGET_TEXT_WARNING_DEFAULT, CPC_WIDGET_TEXT_WARNING_ERROR, and CPC_WIDGET_TEXT_WARNING_SIMU.
void cpcGenericObject_StringToMapping | ( | string | data, | |
mapping & | pairs | |||
) |
Split a string like "key1=value1,key2=value2" into the mapping
data | Input string with labels information | |
pairs | Result mappint |
Referenced by CPC_MassFlowController_FaceplateInitStatics(), CPC_WordParameter_FaceplateInitStatics(), CPC_WordParameter_WidgetInitStatics(), CPC_WordStatus_FaceplateInitStatics(), and CPC_WordStatus_WidgetInitStatics().
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.
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
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
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().
void cpcGenericObject_WidgetDIDOAnimation | ( | bool | bLocked, | |
string | sSelectedManager, | |||
bit32 | bit32StsReg01, | |||
bool | bStsReg01Invalid, | |||
bool | bBoolAlert, | |||
bool | bIsAlarmActive, | |||
int | iActState, | |||
bool | bAckPossible, | |||
int | iSystemIntegrityAlarmValue, | |||
bool | bSystemIntegrityAlarmEnabled | |||
) |
Animate DI DO widget body
References CPC_STSREG01_AUIHFOMOST, CPC_STSREG01_MIOERBRST, CPC_WIDGET_TEXT_ALARM_MASKED, CPC_WIDGET_TEXT_CONTROL_AUIHFOMOST, CPC_WIDGET_TEXT_CONTROL_FORCED, CPC_WIDGET_TEXT_INVALID, CPC_WIDGET_TEXT_OLD_DATA, CPC_WIDGET_TEXT_WARNING_ALARM_BLOCKED, CPC_WIDGET_TEXT_WARNING_DEFAULT, CPC_WIDGET_TEXT_WARNING_ERROR, and CPC_WIDGET_TEXT_WARNING_SIMU.
Referenced by CPC_DigitalInput_WidgetAnimation().
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
bSystemIntegrityAlarmEnabled | '$FRONT_END_DP$.alarm' value | |
iSystemIntegrityAlarmValue | '$FRONT_END_DP$.enabled' value |
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.
instead of dataInvalid iterate through ':_online.._invalid' dpes to construct this value
move to cpcWidget
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
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.
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 .
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(), 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 .
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
value | original value | |
format | dpe format | |
unit | dpe 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
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 | |||
) |
Handle the result of the pop-up menu for the UNICOS device
deviceName | the device dp name | |
sDpType | the device dp type | |
menuList | list of requested action | |
menuAnswer | selected action from the menuList | |
exceptionInfo | the error is returned here |
References CPC_MANREG01_MALBSETRST, CPC_MANREG01_MIOERBSETRST, CPC_POPUPMENU_ALARMS_NUMBER, CPC_POPUPMENU_BLOCK_PLC_NUMBER, CPC_POPUPMENU_HIERARCHY_NUMBER, CPC_POPUPMENU_MANUAL_IO_ERROR_NUMBER, CPC_POPUPMENU_MASK_ALST_NUMBER, CPC_POPUPMENU_MASK_IST_NUMBER, CPC_POPUPMENU_MASKEVENT_NUMBER, CPC_POPUPMENU_UNMASKEVENT_NUMBER, cpcConfigGenericFunctions_setMaskEvent(), cpcGenericObject_notifyUsers(), cpcGenericObject_OpenAlarmsPanel(), cpcGenericObject_OpenHierarchy(), cpcGenericObject_OpenRecipes(), and cpcGenericObject_SendBinaryOrder().
Referenced by CPC_AnaDig_HandleMenu(), CPC_AnaDO_HandleMenu(), CPC_Analog_HandleMenu(), CPC_AnalogAlarm_HandleMenu(), CPC_AnalogInput_HandleMenu(), CPC_AnalogParameter_HandleMenu(), CPC_AnalogStatus_HandleMenu(), CPC_Controller_HandleMenu(), CPC_DigitalAlarm_HandleMenu(), CPC_DigitalInput_HandleMenu(), CPC_DigitalParameter_HandleMenu(), CPC_Local_HandleMenu(), CPC_MassFlowController_HandleMenu(), CPC_OnOff_HandleMenu(), CPC_ProcessControlObject_HandleMenu(), CPC_Word2AnalogStatus_HandleMenu(), CPC_WordParameter_HandleMenu(), and CPC_WordStatus_HandleMenu().
void cpcGenericObject_addUnicosActionToMenu | ( | string | deviceName, | |
string | sDpType, | |||
dyn_string | dsMenuConfig, | |||
dyn_string | dsAccessOk, | |||
dyn_string & | menuList | |||
) |
Add the UNICOS action to the UNICOS device
deviceName | the device dp name | |
sDpType | the device dp type | |
dsMenuConfig | list of requested action | |
dsAccessOk | list of authorized action | |
menuList | output menu |
References CPC_POPUPMENU_ACK_NUMBER, CPC_POPUPMENU_BLOCK_PLC_NUMBER, CPC_POPUPMENU_MANUAL_IO_ERROR_BLOCK, CPC_POPUPMENU_MANUAL_IO_ERROR_NUMBER, CPC_POPUPMENU_MASK_ALST_NUMBER, CPC_POPUPMENU_MASK_ALST_TEXT, CPC_POPUPMENU_MASK_IST_NUMBER, CPC_POPUPMENU_MASK_IST_TEXT, CPC_POPUPMENU_MASK_POSST_NUMBER, CPC_POPUPMENU_MASKEVENT_NUMBER, CPC_POPUPMENU_UNMASKEVENT_NUMBER, CPC_STSREG01_AUIHMBST, CPC_STSREG01_MALBRST, and CPC_STSREG01_MIOERBRST.
Referenced by CPC_AnaDig_MenuConfiguration(), CPC_AnaDO_MenuConfiguration(), CPC_Analog_MenuConfiguration(), CPC_AnalogAlarm_MenuConfiguration(), CPC_AnalogInput_MenuConfiguration(), CPC_AnalogParameter_MenuConfiguration(), CPC_Controller_MenuConfiguration(), CPC_DigitalAlarm_MenuConfiguration(), CPC_DigitalInput_MenuConfiguration(), CPC_DigitalParameter_MenuConfiguration(), CPC_Local_MenuConfiguration(), CPC_MassFlowController_MenuConfiguration(), CPC_OnOff_MenuConfiguration(), CPC_ProcessControlObject_MenuConfiguration(), and CPC_WordParameter_MenuConfiguration().
void cpcGenericObject_addDefaultUnicosActionToMenu | ( | string | deviceName, | |
string | sDpType, | |||
dyn_string | dsMenuConfig, | |||
dyn_string | dsAccessOk, | |||
dyn_string & | menuList | |||
) |
Add the UNICOS default action to the UNICOS device: faceplate, diagnostic and Info
deviceName | the device dp name | |
sDpType | the device dp type | |
dsMenuConfig | list of requested action | |
dsAccessOk | list of authorized action | |
menuList | output menu |
References CPC_POPUPMENU_ALARMS_NUMBER, CPC_POPUPMENU_ALARMS_TEXT, CPC_POPUPMENU_DEVICELINK_NUMBER, CPC_POPUPMENU_FACEPLATE_NUMBER, CPC_POPUPMENU_HIERARCHY_NUMBER, CPC_POPUPMENU_RECIPES_TEXT, and cpcGenericObject_getLinkedAlarms().
Referenced by CPC_AnaDig_MenuConfiguration(), CPC_AnaDO_MenuConfiguration(), CPC_Analog_MenuConfiguration(), CPC_AnalogAlarm_MenuConfiguration(), CPC_AnalogInput_MenuConfiguration(), CPC_AnalogParameter_MenuConfiguration(), CPC_AnalogStatus_MenuConfiguration(), CPC_Controller_MenuConfiguration(), CPC_DigitalAlarm_MenuConfiguration(), CPC_DigitalInput_MenuConfiguration(), CPC_DigitalParameter_MenuConfiguration(), CPC_Local_MenuConfiguration(), CPC_MassFlowController_MenuConfiguration(), CPC_OnOff_MenuConfiguration(), CPC_ProcessControlObject_MenuConfiguration(), CPC_Word2AnalogStatus_MenuConfiguration(), CPC_WordParameter_MenuConfiguration(), and CPC_WordStatus_MenuConfiguration().
void cpcGenericObject_notifyUsers | ( | string | deviceName, | |
string | sKey, | |||
dyn_string | exceptionInfo | |||
) |
Notify users about success or failed operation
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.
deviceName | device name | |
sType | device type | |
dsReturnData | data |
dyn_string cpcGenericObject_getCtrlLink | ( | string | sSystemName, | |
dyn_string | dsDeviceName | |||
) |
Get the list of Controller
sSystemName | system name | |
dsDeviceName | list of devices |
Referenced by CPC_AnaDig_WidgetInitStatics(), CPC_AnaDO_WidgetInitStatics(), CPC_Analog_WidgetInitStatics(), and CPC_MassFlowController_WidgetInitStatics().
void cpcGenericObject_animateTranslatedValue | ( | string | sShape, | |
mapping | dict, | |||
string | unit, | |||
string | format, | |||
anytype | value, | |||
string | color, | |||
bool | invalid | |||
) |
Animate value translated
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 |
Referenced by cpcFaceplate_animateTranslatedValue().
void cpcGenericObject_DisplayText | ( | string | value, | |
string | sShape, | |||
string | sForeCol, | |||
bool | bInvalid | |||
) |
Animate text value
move to the cpcFaceplate
unify params order
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
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 UN_STSREG01_ALUNACK value) | |
bInvalid | is dpe invalid |
Referenced by cpcFaceplate_animateInterlock().
void cpcGenericObject_ColorBoxAnimate | ( | string | sShape, | |
int | iCommandbit, | |||
int | iEnableBit, | |||
string | sOneBackCol, | |||
bool | bInvalid, | |||
string | sZeroBackCol = "unFaceplate_Unactive" | |||
) |
Animate boolean (bit) value
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_DigitalInput_FaceplateStatusAnimationCB(), CPC_Local_FaceplateStatusAnimationCB(), CPC_MassFlowController_FaceplateStatusAnimationCB(), and cpcFaceplate_animateNeedRestart().
void cpcGenericObject_ColorBoxDisable | ( | string | sShape | ) |
Disable colorbox
sShape | graphical object name |
void cpcGenericObject_CheckboxAnimate | ( | string | sShape, | |
bool | state, | |||
bool | enabled = true | |||
) |
Animate checkbox
sShape | graphical object name | |
state | boolean state | |
enabled | is it enabled |
Referenced by CPC_AnaDig_FaceplateStatusAnimationCB(), CPC_AnaDO_FaceplateStatusAnimationCB(), CPC_Analog_FaceplateStatusAnimationCB(), CPC_AnalogAlarm_FaceplateStatusAnimationCB(), CPC_AnalogInput_FaceplateStatusAnimationCB(), CPC_DigitalAlarm_FaceplateStatusAnimationCB(), CPC_DigitalInput_FaceplateStatusAnimationCB(), CPC_DigitalParameter_FaceplateStatusAnimationCB(), CPC_MassFlowController_FaceplateStatusAnimationCB(), and CPC_OnOff_FaceplateInitStatics().
cpcGenericObject_ButtonDisconnect | ( | dyn_string | dsShapes | ) |
Animate faceplate buttons disconnection
dsShapes | buttons (graphical objects) to disconnect |
Referenced by cpcGenericAnimation_ButtonDisconnection().
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)
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
name | bit name (position constant) | |
bit32StsReg01 | StsReg01 value | |
bit32StsReg02 | StsReg02 value |
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
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
acronyms | types of 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 :
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().
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 :
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_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:
sDpe | dpe | |
iAlertType | alert type | |
exceptionInfo | for errors |
Referenced by CPC_AnalogInput_FaceplateInitStatics(), and CPC_AnalogInput_WidgetInitStatics().
bool cpcGenericObject_isAlarmWithMail | ( | string | dpName, | |
int | alertType | |||
) |
Return is alarm configured with Mail/SMS
dpName | dpe | |
alertType | alert type |
Referenced by CPC_AnalogAlarm_FaceplateInitStatics(), CPC_AnalogInput_FaceplateInitStatics(), CPC_DigitalAlarm_FaceplateInitStatics(), and CPC_DigitalInput_FaceplateInitStatics().
bool cpcGenericObject_getBit | ( | int | value, | |
int | bitPosition | |||
) |
Is bit set in StsReg value
value | (StsReg) value | |
bitPosition | bit position |
Referenced by cpcFaceplate_fetchStsRegBitAndValidness().
void cpcGenericObject_WidgetDisconnection | ( | string | sWidgetType, | |
string | sDpType | |||
) |
Animate widget disconnection
sWidgetType | widget type | |
sDpType | object |
Referenced by CPC_AnaDig_WidgetDisconnection(), CPC_AnaDO_WidgetDisconnection(), CPC_Analog_WidgetDisconnection(), CPC_Controller_WidgetDisconnection(), CPC_DigitalInput_WidgetDisconnection(), CPC_Local_WidgetDisconnection(), CPC_MassFlowController_WidgetDisconnection(), CPC_OnOff_WidgetDisconnection(), and CPC_ProcessControlObject_WidgetDisconnection().
string cpcGenericObject_GetAnimationFunction | ( | string | sWidgetType | ) |
Return widget animation function for a given widget type
Referenced by CPC_Local_WidgetAnimation(), CPC_ProcessControlObject_WidgetAnimation(), and cpcGenericObject_WidgetAnimationDoubleStsReg().
void cpcGenericObject_OpenHierarchy | ( | string | deviceName | ) |
Open hierarchy window for a device
deviceName | device name |
Referenced by cpcGenericObject_HandleUnicosMenu().
void cpcGenericObject_OpenAlarmsPanel | ( | string | deviceName | ) |
Open alarm window for a device
deviceName | device name |
Referenced by cpcGenericObject_HandleUnicosMenu().
cpcGenericObject_OpenRecipes | ( | string | deviceName | ) |
Open recipe window
deviceName | device name |
Referenced by cpcGenericObject_HandleUnicosMenu().
dyn_int cpcGenericObject_getMaxWidgetSize | ( | dyn_string | objects | ) |
Returns max width and max height withing objects widgets
objects | list of objects |
References cpcGenericObject_getDeviceWidget().
string cpcGenericObject_getDeviceWidget | ( | string | device | ) |
Returns a widget associated with device.
device | device name |
Referenced by cpcGenericObject_getMaxWidgetSize().
dyn_string cpcGenericObject_getLinkedAlarms | ( | string | device, | |
dyn_string & | exceptionInfo | |||
) |
Return a list of alarms linked to object
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
device | device name | |
childrenType | dp type to fileter children with | |
exceptionInfo | for errors |
References CPC_CONFIG_CHILDREN_KEY.
cpcGenericObject_selectDevice | ( | string | deviceName, | |
string | deviceType | |||
) |
Cloned from UN_INFOS/unWidget_SelectArea.pnl TODO: move to unCore