unCPC6
WinCC-OA implementation of UNICOS CPC
 All Files Functions Variables Pages
cpcGenericAnimation.ctl File Reference

This library contains generic functions for device animation's routine. More...

Functions

dyn_string cpcGenericAnimation_WidgetDPEs (string deviceName, string frontEnd)
 
dyn_string cpcGenericAnimation_WidgetLockDPEs (string deviceName)
 
void cpcGenericAnimation_WidgetRegisterCB (string sDp, bool bSystemConnected)
 
void cpcGenericAnimation_WidgetLockCallBack (dyn_string dpes, dyn_bool values)
 
void cpcGenericAnimation_WidgetConnect (string deviceName, string frontEnd)
 
void cpcGenericAnimation_WidgetDisconnect (string deviceName, string frontEnd)
 
void cpcGenericAnimation_WidgetAnimationCB (dyn_string dpes, dyn_anytype values)
 
void cpcGenericAnimation_WidgetDisconnection (string deviceName)
 
dyn_string cpcGenericAnimation_FaceplateDPEs (string deviceName, string frontEnd)
 
dyn_string cpcGenericAnimation_FaceplateLockDPEs (string deviceName)
 
void cpcGenericAnimation_FaceplateStatusRegisterCB (string sDp, bool bSystemConnected)
 
void cpcGenericAnimation_FaceplateLockCallBack (dyn_string dpes, dyn_bool values)
 
void cpcGenericAnimation_FaceplateConnect (string deviceName)
 
void cpcGenericAnimation_FaceplateStatusDisconnection ()
 
void cpcGenericAnimation_FaceplateDisconnect (string deviceName)
 
dyn_string cpcGenericAnimation_ButtonDPEs (string deviceName)
 
mapping cpcGenericAnimation_ButtonConfig (string deviceName)
 
dyn_string cpcGenericAnimation_ButtonList (string deviceName)
 
void cpcGenericAnimation_ButtonRegisterCB (string sDp, bool bSystemConnected)
 
void cpcGenericAnimation_ButtonAnimationCB (dyn_string dpes, dyn_mixed values)
 
void cpcGenericAnimation_ButtonDisconnection ()
 
void cpcGenericAnimation_ButtonUserAccess (string sDpName, string sDpType, dyn_string &dsAccess)
 
string cpcGenericAnimation_DevicePrefix (string deviceName)
 

Detailed Description

This library contains generic functions for device animation's routine.

Those files generify routine of register/create/receive callback. The routine is implemented for widget, faceplate and buttons.

Basic structure:

  • ...DPEs specifies list of DPEs that are used for animation
  • ...LockDPEs specifies list DPEs with alert handlers that can be modified (interlocks should not be in this list)
  • ...RegisterCB does standart routine on callback registration; according to the LockDPE list it connects to ...LockCallBack() or ...Connect()
  • ...LockCallBack intermediate callback for LockDPEs; connects to ...Connect()
  • ...Connect calls ...InitStatics() and dpConnect to ...AnimationCB()
  • ...Disconnection does dpDisconnect for DPEs
  • ...Disconnect in charge of disconnect animation
Author
Alexey Merezhin (EN-ICE-PLC)
Constraints
None
Usage
Public
PVSS managers
UI

Function Documentation

dyn_string cpcGenericAnimation_WidgetDPEs ( string  deviceName,
string  frontEnd 
)

Fetch widget DPEs from the device.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
deviceNamedevice name
frontEndfront-end name

References cpcGenericAnimation_DevicePrefix().

Referenced by cpcGenericAnimation_WidgetConnect(), and cpcGenericAnimation_WidgetDisconnect().

void cpcGenericAnimation_WidgetRegisterCB ( string  sDp,
bool  bSystemConnected 
)

widget register callback Does not work. Need to extend unGenericObject_WidgetInit to pass sDpType parameter. Otherwise impossible to call disconnection function if system is never being connected.

Todo:
update unCore for this
Constraints
None
Usage
Public
PVSS managers
Ui, CTRL
Parameters
sDpthe DistributedControl system name DP name
bSystemConnectedthe state of the system name

References cpcGenericAnimation_WidgetConnect(), cpcGenericAnimation_WidgetDisconnect(), cpcGenericAnimation_WidgetDisconnection(), and cpcGenericAnimation_WidgetLockDPEs().

void cpcGenericAnimation_WidgetLockCallBack ( dyn_string  dpes,
dyn_bool  values 
)

dpConnect to the alert handler's lock properties

Constraints
None
Usage
Public
PVSS managers
Ui, CTRL
Parameters
dpeslock names
valueslock values

References cpcGenericAnimation_WidgetConnect(), cpcGenericAnimation_WidgetDisconnect(), and cpcGenericAnimation_WidgetDisconnection().

void cpcGenericAnimation_WidgetAnimationCB ( dyn_string  dpes,
dyn_anytype  values 
)

Widget animation routine.

This functions is an animation callback. It tries to animate a widget with following function respection an order (if first exists, than just with first):

  1. $DT$_WidgetAnimation_$WDIGET_TYPE$
  2. $DT$_WidgetAnimation
Constraints
None
Usage
Public
PVSS managers
UI
Parameters
dpesdpes names
valuesdpes values

References cpcGenericAnimation_DevicePrefix().

void cpcGenericAnimation_WidgetDisconnection ( string  deviceName)

Widget disconnection routine.

Todo:

update description

fix me!!!

Constraints
None
Usage
Public
PVSS managers
UI

References cpcGenericAnimation_DevicePrefix().

Referenced by cpcGenericAnimation_WidgetConnect(), cpcGenericAnimation_WidgetLockCallBack(), and cpcGenericAnimation_WidgetRegisterCB().

dyn_string cpcGenericAnimation_FaceplateDPEs ( string  deviceName,
string  frontEnd 
)

Fetch faceplate DPEs from the device.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
deviceNamedevice name
frontEndfront-end name

References cpcGenericAnimation_DevicePrefix().

Referenced by cpcGenericAnimation_FaceplateConnect(), and cpcGenericAnimation_FaceplateDisconnect().

dyn_string cpcGenericAnimation_FaceplateLockDPEs ( string  deviceName)

Fetch faceplate LockDPEs from the device.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
deviceNamedevice name

References cpcGenericAnimation_DevicePrefix().

Referenced by cpcGenericAnimation_FaceplateStatusRegisterCB().

void cpcGenericAnimation_FaceplateStatusRegisterCB ( string  sDp,
bool  bSystemConnected 
)

Faceplate register routine

Faceplate DistributedControl callback of the faceplate status panel.

Constraints
None
Usage
Public
PVSS managers
Ui, CTRL
Parameters
sDpthe DistributedControl system name DP name
bSystemConnectedthe state of the system name

References cpcGenericAnimation_FaceplateConnect(), cpcGenericAnimation_FaceplateDisconnect(), cpcGenericAnimation_FaceplateLockDPEs(), and cpcGenericAnimation_FaceplateStatusDisconnection().

void cpcGenericAnimation_FaceplateLockCallBack ( dyn_string  dpes,
dyn_bool  values 
)

Faceplate callback of the alert handler's lock properties

Constraints
None
Usage
Public
PVSS managers
Ui, CTRL
Parameters
dpeslock names
valueslock values

References cpcGenericAnimation_FaceplateConnect(), cpcGenericAnimation_FaceplateDisconnect(), and cpcGenericAnimation_FaceplateStatusDisconnection().

void cpcGenericAnimation_FaceplateConnect ( string  deviceName)

Faceplate connect routine.

Init animation statics (with $DT$_FaceplateInitStatics function) and does dpConnect for cpcGenericAnimation_FaceplateDPEs.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
deviceNamedevice name

References cpcGenericAnimation_DevicePrefix(), cpcGenericAnimation_FaceplateDPEs(), and cpcGenericAnimation_FaceplateStatusDisconnection().

Referenced by cpcGenericAnimation_FaceplateLockCallBack(), and cpcGenericAnimation_FaceplateStatusRegisterCB().

void cpcGenericAnimation_FaceplateStatusDisconnection ( )

Faceplate disconnection routine.

If device has $DT$_FaceplateStatusDisconnection that it will be triggered. Otherwise $DT$_FaceplateStatusAnimationCB will be called.

Constraints
None
Usage
Public
PVSS managers
UI

References cpcGenericAnimation_DevicePrefix().

Referenced by cpcGenericAnimation_FaceplateConnect(), cpcGenericAnimation_FaceplateLockCallBack(), and cpcGenericAnimation_FaceplateStatusRegisterCB().

void cpcGenericAnimation_FaceplateDisconnect ( string  deviceName)

Faceplate disconnect routine.

DP disconnect FaceplateDPEs from $DT$_FaceplateStatusAnimationCB

Constraints
None
Usage
Public
PVSS managers
Ui, CTRL
Parameters
deviceNamedevice name

References cpcGenericAnimation_DevicePrefix(), and cpcGenericAnimation_FaceplateDPEs().

Referenced by cpcGenericAnimation_FaceplateLockCallBack(), and cpcGenericAnimation_FaceplateStatusRegisterCB().

dyn_string cpcGenericAnimation_ButtonDPEs ( string  deviceName)

Fetch a list of dpe that need to be connected for button animation

Those DPEs should be defined in $DT$_ButtonDPEs function.

Constraints
None
Usage
Public
PVSS managers
Ui, CTRL
Parameters
deviceNamethe device name

References cpcGenericAnimation_DevicePrefix().

Referenced by cpcGenericAnimation_ButtonRegisterCB().

mapping cpcGenericAnimation_ButtonConfig ( string  deviceName)

Fetch a map of button properties for given device

This mapping is defined in $DT$_ButtonConfig function

Constraints
None
Usage
Public
PVSS managers
Ui, CTRL
Parameters
deviceNamethe device name

References cpcGenericAnimation_DevicePrefix().

Referenced by cpcGenericAnimation_ButtonList(), and cpcGenericAnimation_ButtonUserAccess().

void cpcGenericAnimation_ButtonRegisterCB ( string  sDp,
bool  bSystemConnected 
)

Button register routine

DistributedControl callback of the contextual device button panel.

Constraints
None
Usage
Public
PVSS managers
Ui, CTRL
Parameters
sDpthe DistributedControl system name DP name
bSystemConnectedthe state of the system name

References cpcGenericAnimation_ButtonDisconnection(), and cpcGenericAnimation_ButtonDPEs().

void cpcGenericAnimation_ButtonAnimationCB ( dyn_string  dpes,
dyn_mixed  values 
)

Button animation routine.

Triggers $DT$_ButtonSetState function.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
dpesdpes names
valuesdpes values

References cpcGenericAnimation_DevicePrefix().

void cpcGenericAnimation_ButtonDisconnection ( )

Button disconnection routine.

Proxy to cpcGenericObject_ButtonDisconnect

Constraints
None
Usage
Public
PVSS managers
UI

References cpcGenericAnimation_ButtonList(), and cpcGenericObject_ButtonDisconnect().

Referenced by cpcGenericAnimation_ButtonRegisterCB().

void cpcGenericAnimation_ButtonUserAccess ( string  sDpName,
string  sDpType,
dyn_string &  dsAccess 
)

Returns the list of allowed action on the device for a user logged in

Constraints
None
Usage
Public
PVSS managers
Ui, CTRL
Parameters
sDpNamethe device DP name
sDpTypethe device type
dsAccesslist of allowed action on the device

References CPC_ACCESS_RIGHTS_ADMIN, CPC_ACCESS_RIGHTS_EXPERT, CPC_ACCESS_RIGHTS_NOONE, CPC_ACCESS_RIGHTS_OPERATOR, and cpcGenericAnimation_ButtonConfig().