cpcFaceplate.ctl File Reference

This library contains generic functions for faceplate animation. More...

Functions

void cpcFaceplate_animateTextParameter (dyn_string dpes, dyn_string values, string paramName, string value)
void cpcFaceplate_animateTranslatedValue (dyn_string dpes, dyn_string values, string dpeName, string dpeUnit, string dpeFormat, mapping dict, string color)
void cpcFaceplate_animateInterlock (dyn_string dpes, dyn_string values, string bitName, string interlockName, string unAckBitName="UN_STSREG01_ALUNACK")
void cpcFaceplate_animateOnlineValue (dyn_string dpes, dyn_string values, string dpeName, string dpeUnit, string dpeFormat, string color)
void cpcFaceplate_animateAnalogValue (dyn_string dpes, dyn_string values, string dpeName, string refPrefix, string color)
void cpcFaceplate_animateStsRegBit (dyn_string dpes, dyn_string values, string bitName, bool enabled, string color)
void cpcFaceplate_animateStsRegNotBit (dyn_string dpes, dyn_string values, string bitName, bool enabled, string color)
void cpcFaceplate_animateRange (dyn_string dpes, dyn_string values, string dpeName, int rangeType, string dpeUnit, string dpeFormat)
void cpcFaceplate_animateNeedRestart (dyn_string dpes, dyn_string values)
void cpcFaceplate_animateMaskEvent (dyn_string dpes, dyn_string values)
void cpcFaceplate_fetchStsRegBitAndValidness (dyn_string dpes, dyn_string values, string bitName, bool &value, bool &invalid)
void cpcFaceplate_fetchAnimationCBOnlineValue (dyn_string dpes, dyn_string values, string dpeName, anytype &value, bool &invalid)
anytype cpcFaceplate_fetchAnimationCBValue (dyn_string dpes, dyn_string values, string dpeName)
bool cpcFaceplate_connectionValid (dyn_string values)

Detailed Description

This library contains generic functions for faceplate animation.

First two parameters are dpes and values, which should be transfered straight from callback. First two places in dpes/values are reserved for frontend statuses.

All animation functions check system validness before animation which reflects on color. Also they are capable to animate disconnection.

Functions are supposed to have corresponding field(s) in the faceplate named in a special way. Function description contains an information about required fields. Naming convention for graphical objects:

For bit animation bit position constant should be used (e.g. "UN_STSREG01_IOERRORW"). This constant contains 3 parts joined with underscore:

See also:
cpcGenericAnimation.ctl
Author:
Alexey Merezhin (EN-ICE-SIC)

©Copyright CERN 2013 - all rights reserved

Creation Date
03.10.2011
Modification History

10/10/2012: Alexey refactor function names and update documentation

08/02/2012: Alexey [UCPC-656] fixed collision in cpcFaceplate_fetchAnimationCBOnlineValue (use dot in the beginning of dpe pattern)

20/01/2012: Alexey cpcFaceplate_animateTextParameter, cpcFaceplate_animateTranslatedValue and cpcFaceplate_animateInterlock extracted cpcFaceplate_fetchStsRegBitAndValidness from cpcFaceplate_animateStsRegBit


Function Documentation

void cpcFaceplate_animateTextParameter ( dyn_string  dpes,
dyn_string  values,
string  paramName,
string  value 
)

Animate text parameter.

Faceplate should contain unFaceplate_DisplayColor.pnl or unFaceplate_DisplayNormal.pnl graphical object with the '$paramName$' name.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
dpes connected dpe names
values connected dpe values
paramName name of parameter to animate
value value of parameter to animate

Referenced by CPC_MassFlowController_FaceplateStatusAnimationCB().

void cpcFaceplate_animateTranslatedValue ( dyn_string  dpes,
dyn_string  values,
string  dpeName,
string  dpeUnit,
string  dpeFormat,
mapping  dict,
string  color 
)

Fetch value of dpe and animate a translation from dict.

Faceplate should contain unFaceplate_DisplayColor.pnl or unFaceplate_DisplayNormal.pnl graphical object with the '$dpeName$' name.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
dpes connected dpe names
values connected dpe values
dpeName name of dpe to animate
dpeUnit dpe unit
dpeFormat dpe format
dict mapping with translated values
color field color on valid state

References cpcFaceplate_fetchAnimationCBOnlineValue(), and cpcGenericObject_animateTranslatedValue().

Referenced by CPC_MassFlowController_FaceplateStatusAnimationCB(), and CPC_WordParameter_FaceplateStatusAnimationCB().

void cpcFaceplate_animateInterlock ( dyn_string  dpes,
dyn_string  values,
string  bitName,
string  interlockName,
string  unAckBitName = "UN_STSREG01_ALUNACK" 
)

Animate interlock.

Faceplate should contain unFaceplate_ColoredSquare.pnl graphical object with the '$interlockName$' name ('FuStopISt' for example).

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
dpes connected dpe names
values connected dpe values
bitName interlock bit constant in StsReg (e.g. UN_STSREG01_STARTAL); see detailed description for more info
interlockName interlock DPE name
unAckBitName AlUnAck (alarm un-acknowledge) bit constant as string

References cpcFaceplate_fetchAnimationCBValue(), cpcFaceplate_fetchStsRegBitAndValidness(), and cpcGenericObject_ColorBoxAnimateInterlock().

Referenced by CPC_AnaDig_FaceplateStatusAnimationCB(), CPC_AnaDO_FaceplateStatusAnimationCB(), CPC_Analog_FaceplateStatusAnimationCB(), CPC_AnalogAlarm_FaceplateStatusAnimationCB(), CPC_DigitalAlarm_FaceplateStatusAnimationCB(), CPC_MassFlowController_FaceplateStatusAnimationCB(), CPC_OnOff_FaceplateStatusAnimationCB(), and CPC_ProcessControlObject_FaceplateStatusAnimationCB().

void cpcFaceplate_animateOnlineValue ( dyn_string  dpes,
dyn_string  values,
string  dpeName,
string  dpeUnit,
string  dpeFormat,
string  color 
)

Animate analog value.

Faceplate should contain unFaceplate_DisplayColor.pnl or unFaceplate_DisplayNormal.pnl graphical object with the '$dpeName$' name ("PosSt" for example).

Todo:
: should be replaced with cpcFaceplate_animateAnalogValue
Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
dpes connected dpe names
values connected dpe values
dpeName name of dpe to animate
dpeUnit dpe unit
dpeFormat dpe format
color field color on valid state

References cpcFaceplate_fetchAnimationCBOnlineValue().

Referenced by CPC_AnaDig_FaceplateStatusAnimationCB(), CPC_AnaDO_FaceplateStatusAnimationCB(), CPC_Analog_FaceplateStatusAnimationCB(), CPC_AnalogInput_FaceplateStatusAnimationCB(), CPC_AnalogParameter_FaceplateStatusAnimationCB(), CPC_Controller_FaceplateStatusAnimationCB(), CPC_DigitalAlarm_FaceplateStatusAnimationCB(), and CPC_MassFlowController_FaceplateStatusAnimationCB().

void cpcFaceplate_animateAnalogValue ( dyn_string  dpes,
dyn_string  values,
string  dpeName,
string  refPrefix,
string  color 
)

Animate analog value.

Faceplate should contain unFaceplate_DisplayColor.pnl or unFaceplate_DisplayNormal.pnl graphical object with the '$dpeName$' name ("PosSt" for example).

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
dpes connected dpe names
values connected dpe values
dpeName name of dpe to animate
refPrefix prefix for unit and format in g_params
color field color on valid state

References cpcFaceplate_fetchAnimationCBOnlineValue().

Referenced by CPC_AnalogAlarm_FaceplateStatusAnimationCB().

void cpcFaceplate_animateStsRegBit ( dyn_string  dpes,
dyn_string  values,
string  bitName,
bool  enabled,
string  color 
)

Animate StsReg bit.

Function accept bit's constant name (e.g. "UN_STSREG01_IOERRORW") as bitName. Constant's value should correspond to bit position in StsReg dpe. Faceplate should contain unFaceplate_Colorbox.pnl graphical object named '$BIT_NAME$' ("IOERRORW" in given example).

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
dpes connected dpe names
values connected dpe values
bitName constant as a string; see detailed description for more info
enabled if it's enabled
color field color on valid state

References cpcFaceplate_fetchStsRegBitAndValidness().

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(), and CPC_WordParameter_FaceplateStatusAnimationCB().

void cpcFaceplate_animateStsRegNotBit ( dyn_string  dpes,
dyn_string  values,
string  bitName,
bool  enabled,
string  color 
)

Animate reverse StsReg bit.

Opposite animation (TRUE->FALSE) of cpcFaceplate_animateStsRegBit. As bitName should be used normal bit constant. Faceplate should contain unFaceplate_Colorbox.pnl graphical object named 'NOT_$BIT_NAME$' ("NOT_IOERRORW" in given example).

Constraints
None
Usage
Public
PVSS managers
UI
See also:
cpcFaceplate_animateStsRegBit
Parameters:
dpes connected dpe names
values connected dpe values
bitName constant as a string
enabled if it's enabled
color field color on valid state

References cpcFaceplate_fetchStsRegBitAndValidness().

Referenced by CPC_DigitalInput_FaceplateStatusAnimationCB(), and CPC_OnOff_FaceplateStatusAnimationCB().

void cpcFaceplate_animateRange ( dyn_string  dpes,
dyn_string  values,
string  dpeName,
int  rangeType,
string  dpeUnit,
string  dpeFormat 
)

Animate dpe's range.

For given dpe function fetch range properties from dpes/values and animate them accordingly. Faceplate should contain two unFaceplate_DisplayNormal.pnl graphical objects with the '$DPE_NAME$RangeMax' and '$DPE_NAME$RangeMin' names ("PosStRangeMax" and "PosStRangeMax" for "PosSt" dpe).

Constraints
None
Usage
Public
PVSS managers
UI
See also:
cpcFaceplate_animateStsRegBit
Parameters:
dpes connected dpe names
values connected dpe values
dpeName name of dpe with range configured to animate
rangeType range type, should be statically initialized
dpeUnit dpe unit
dpeFormat dpe format

References cpcFaceplate_fetchAnimationCBValue().

Referenced by CPC_AnaDig_FaceplateStatusAnimationCB(), CPC_AnaDO_FaceplateStatusAnimationCB(), CPC_Analog_FaceplateStatusAnimationCB(), CPC_AnalogInput_FaceplateStatusAnimationCB(), CPC_AnalogParameter_FaceplateStatusAnimationCB(), and CPC_WordParameter_FaceplateStatusAnimationCB().

void cpcFaceplate_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 cpcFaceplate_fetchStsRegBitAndValidness(), and cpcGenericObject_ColorBoxAnimate().

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

void cpcFaceplate_animateMaskEvent ( dyn_string  dpes,
dyn_string  values 
)
void cpcFaceplate_fetchStsRegBitAndValidness ( dyn_string  dpes,
dyn_string  values,
string  bitName,
bool &  value,
bool &  invalid 
)

Fetch value and validness of given bit.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
dpes connected dpe names
values connected dpe values
bitName constant as a string
value output
invalid output

References cpcConfigGenericFunctions_getConstantByName(), cpcFaceplate_fetchAnimationCBOnlineValue(), and cpcGenericObject_getBit().

Referenced by CPC_MassFlowController_FaceplateStatusAnimationCB(), cpcFaceplate_animateInterlock(), cpcFaceplate_animateNeedRestart(), cpcFaceplate_animateStsRegBit(), and cpcFaceplate_animateStsRegNotBit().

void cpcFaceplate_fetchAnimationCBOnlineValue ( dyn_string  dpes,
dyn_string  values,
string  dpeName,
anytype &  value,
bool &  invalid 
)

Fetch value and validness of given dpe. Returns as fast as both value and invalid are found.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
dpes connected dpe names
values connected dpe values
dpeName name of dpe
value output
invalid output

Referenced by CPC_AnalogAlarm_FaceplateStatusAnimationCB(), CPC_ProcessControlObject_animateOptionMode(), cpcFaceplate_animateAnalogValue(), cpcFaceplate_animateMaskEvent(), cpcFaceplate_animateOnlineValue(), cpcFaceplate_animateTranslatedValue(), and cpcFaceplate_fetchStsRegBitAndValidness().

anytype cpcFaceplate_fetchAnimationCBValue ( dyn_string  dpes,
dyn_string  values,
string  dpeName 
)

Fetch value of given dpe.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters:
dpes connected dpe names
values connected dpe values
dpeName name of dpe
Returns:
dpe value or CPC_FACEPLATE_MISSED_VALUE if dpe's not found in dpes/values

References CPC_FACEPLATE_MISSED_VALUE.

Referenced by CPC_AnalogAlarm_FaceplateStatusAnimationCB(), CPC_AnalogInput_FaceplateStatusAnimationCB(), CPC_Controller_FaceplateStatusAnimationCB(), CPC_DigitalAlarm_FaceplateStatusAnimationCB(), CPC_DigitalInput_FaceplateStatusAnimationCB(), CPC_DigitalParameter_FaceplateStatusAnimationCB(), CPC_Local_FaceplateStatusAnimationCB(), cpcFaceplate_animateInterlock(), and cpcFaceplate_animateRange().

bool cpcFaceplate_connectionValid ( dyn_string  values  ) 

Return front-end validness.

Constraints
None
Usage
Public
PVSS managers
UI
Todo:
rename me to cpcFaceplate_frontEndValid
Returns:
is front-end valid

Referenced by CPC_AnalogAlarm_FaceplateStatusAnimationCB(), CPC_DigitalAlarm_WidgetAnimation(), CPC_DigitalInput_FaceplateStatusAnimationCB(), CPC_Local_FaceplateStatusAnimationCB(), CPC_MassFlowController_FaceplateStatusAnimationCB(), and cpcFaceplate_animateMaskEvent().


Generated on 11 Jul 2013 for unCPC6 by  doxygen 1.6.1