unCPC6
6.6.2
WinCC-OA implementation of UNICOS CPC
|
This library contains generic functions for CPC objects. More...
Functions | |
void | cpcGenericObject_StringToMapping (string data, mapping &pairs) |
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_ColorBoxAnimate (string sShape, int iCommandbit, int iEnableBit, string sOneBackCol, bool bInvalid, string sZeroBackCol="unFaceplate_Unactive") |
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) |
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_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) |
bool | valueInsideRange (anytype key, anytype value, string dpe, dyn_string &exceptionInfo) |
int | cpcGenericObject_setDefaultValue (string deviceName, mapping defDpeValues, dyn_string &exceptionInfo) |
This library contains generic functions for CPC objects.
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(), CPC_WordStatus_WidgetInitStatics(), and CPC_WordStatusConfig_setCustomConfig().
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().
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(), 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 .
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_SteppingMotor_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_FACEPLATE_BUTTON_ALLOW_RESTART, CPC_POPUPMENU_ACK_NUMBER, CPC_POPUPMENU_ALLOW_TO_RESTART_TEXT, 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, CPC_StsReg01_MIOERBRST, and cpcGenericDpFunctions_getDeviceProperty().
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_SteppingMotor_MenuConfiguration(), CPC_WordParameter_MenuConfiguration(), and CPC_WordStatus_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_SteppingMotor_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(), 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
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
move to the unFaceplate
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_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_AnalogStatus_FaceplateStatusAnimationCB(), CPC_DigitalInput_FaceplateStatusAnimationCB(), CPC_Local_FaceplateStatusAnimationCB(), CPC_MassFlowController_FaceplateStatusAnimationCB(), and cpcGenericObject_animateNeedRestart().
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_AnalogStatus_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 |
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(), 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 :
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:
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
dpName | dpe |
alertType | alert type |
bool cpcGenericObject_isInMailSMS | ( | string | dpName | ) |
Function returns true if dpe is in any Mail/SMS category
Referenced by CPC_AnalogAlarm_FaceplateInitStatics(), CPC_AnalogInput_FaceplateInitStatics(), CPC_AnalogStatus_FaceplateInitStatics(), CPC_DigitalAlarm_FaceplateInitStatics(), and CPC_DigitalInput_FaceplateInitStatics().
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.
void cpcGenericObject_animateNeedRestart | ( | dyn_string | dpes, |
dyn_string | values | ||
) |
Animate 'allow restart needed' bit.
Faceplate should contain unFaceplate_Colorbox.pnl graphical object named "NEEDRESTART".
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 | ||
) |
Animate mask event.
Faceplate should contain unFaceplate_Colorbox.pnl graphical object named "eventState".
dpes | connected dpe names |
values | connected dpe values |
Referenced by CPC_AnaDig_FaceplateStatusAnimationCB(), CPC_AnaDO_FaceplateStatusAnimationCB(), CPC_Analog_FaceplateStatusAnimationCB(), CPC_AnalogAlarm_FaceplateStatusAnimationCB(), CPC_AnalogInput_FaceplateStatusAnimationCB(), CPC_AnalogParameter_FaceplateStatusAnimationCB(), CPC_Controller_FaceplateStatusAnimationCB(), CPC_DigitalAlarm_FaceplateStatusAnimationCB(), CPC_DigitalInput_FaceplateStatusAnimationCB(), CPC_DigitalParameter_FaceplateStatusAnimationCB(), CPC_Local_FaceplateStatusAnimationCB(), CPC_MassFlowController_FaceplateStatusAnimationCB(), CPC_OnOff_FaceplateStatusAnimationCB(), CPC_ProcessControlObject_FaceplateStatusAnimationCB(), CPC_SteppingMotor_FaceplateStatusAnimationCB(), and CPC_WordParameter_FaceplateStatusAnimationCB().
bool valueInsideRange | ( | anytype | key, |
anytype | value, | ||
string | dpe, | ||
dyn_string & | exceptionInfo | ||
) |
Check if given value is in the range of specified dpe
Note: only Min-Max range is supported; if there is no config or config of another nature, value is accepted as in range
key | name of the value; for logging purpose |
value | value to be checked |
dpe | Data Point Element holding the pvRange configuration |
exceptionInfo | for exception handling |
Referenced by cpcGenericObject_setDefaultValue().
int cpcGenericObject_setDefaultValue | ( | string | deviceName, |
mapping | defDpeValues, | ||
dyn_string & | exceptionInfo | ||
) |
For given device set its default values specified in defDpeValues mapping (DefDPEname:value)
Function checks if all Def DPEs exist for specified deviceName (e.g. deviceName.ProcessOutput.DefDPEName) and if provided values are in correct ranges (if applicable) If any of the DefDpes does not exist or any value is outside valid range, no changes will be applied to the system
deviceName | name of the device |
defDpeValues | Mapping between Def DPE names and values to be set on them |
exceptionInfo | for exception handling |
References valueInsideRange().