Functions | |
unUnRcpClass_FaceplateStatusRegisterCB (string sDp, bool bSystemConnected) | |
unUnRcpClass_FaceplateStatusDisconnection () | |
unUnRcpClass_FaceplateConnect (string deviceName) | |
unUnRcpClass_FaceplateDisconnect (string deviceName) | |
unUnRcpClass_ButtonRegisterCB (string sDp, bool bSystemConnected) | |
unUnRcpClass_UserLoginGetButtonState (string deviceName, string sType, dyn_string &dsReturnData) | |
unUnRcpClass_ButtonSetState (string deviceName, string sDpType, dyn_string dsUserAccess, dyn_string dsData) | |
unUnRcpClass_ButtonDisconnection () | |
unUnRcpClass_ButtonUserAccess (string sDpName, string sDpType, dyn_string &dsAccess) | |
unUnRcpClass_ButtonAnimationCB (string sDpLock, bool bLocked, string sDpSelect, string sSelectedManager, string sDpState, string sState) | |
unUnRcpClass_WidgetRegisterCB (string sDp, bool bSystemConnected) | |
unUnRcpClass_WidgetDisconnection (string sWidgetType) | |
unUnRcpClass_WidgetConnect (string deviceName, string sFrontEnd) | |
unUnRcpClass_WidgetDisconnect (string deviceName, string sFrontEnd) | |
unUnRcpClass_WidgetCB (string sDpLocked, bool bLocked, string sDpSelectedManager, string sSelectedManager, string sDpState, string sState, string sDpFESystemIntegrityAlarmValue, int iFESystemIntegrityAlarmValue, string sDpFESystemIntegrityAlarmEnabled, bool bFESystemIntegrityAlarmEnabled) | |
unUnRcpClass_MenuConfiguration (string sDpName, string sDpType, dyn_string dsAccessOk, dyn_string &menuList) | |
unUnRcpClass_HandleMenu (string deviceName, string sDpType, dyn_string menuList, int iMenuAnswer) | |
unUnRcpClass_StateAnimation (bool bSystemConnected, string sWidgetType, int iFESystemIntegrityAlarmValue, bool bFESystemIntegrityAlarmEnabled) | |
unUnRcpClass_StateDisconnection (string sWidgetType) |
UNICOS Copyright (C) CERN 2013 All rights reserved
unUnRcpClass.ctl This library contains the widget, faceplate, etc. functions of UnRcpClass.
unUnRcpClass_FaceplateStatusRegisterCB | ( | string | sDp, | |
bool | bSystemConnected | |||
) |
faceplate DistributedControl callback of the faceplate status panel
sDp | input, the DistributedControl system name DP name | |
bSystemConnected | input, the state of the system name |
References unUnRcpClass_FaceplateConnect(), unUnRcpClass_FaceplateDisconnect(), and unUnRcpClass_FaceplateStatusDisconnection().
unUnRcpClass_FaceplateStatusDisconnection | ( | ) |
set the faceplate when the device system is disconnected
Referenced by unUnRcpClass_FaceplateConnect(), and unUnRcpClass_FaceplateStatusRegisterCB().
unUnRcpClass_FaceplateConnect | ( | string | deviceName | ) |
dpConnect to the device data
deviceName | input, the device DP name |
References unUnRcpClass_FaceplateStatusDisconnection().
Referenced by unUnRcpClass_FaceplateStatusRegisterCB().
unUnRcpClass_FaceplateDisconnect | ( | string | deviceName | ) |
dpDisconnect to the device data
deviceName | input, the device DP name |
Referenced by unUnRcpClass_FaceplateStatusRegisterCB().
unUnRcpClass_ButtonRegisterCB | ( | string | sDp, | |
bool | bSystemConnected | |||
) |
Contextual button DistributedControl callback of the contextual device button panel
sDp | input, the DistributedControl system name DP name | |
bSystemConnected | input, the state of the system name |
References unUnRcpClass_ButtonDisconnection().
unUnRcpClass_UserLoginGetButtonState | ( | string | deviceName, | |
string | sType, | |||
dyn_string & | dsReturnData | |||
) |
return the device data, this function is called when the user logs in and logs out
deviceName | input, the device DP name | |
sType | input, the device type | |
dsReturnData | output, the device data, [1] = lock state, [2] = lock by, [3] .. [6] device data |
unUnRcpClass_ButtonSetState | ( | string | deviceName, | |
string | sDpType, | |||
dyn_string | dsUserAccess, | |||
dyn_string | dsData | |||
) |
Set the state of the contextual button of the device
deviceName | input, the device DP name | |
sDpType | input, the device type | |
dsUserAccess | input, list of allowed action on the device | |
dsData | input, the device data [1] = lock state, [2] = lock by, [3] .. [6] device data |
References unUnRcpClass_ButtonUserAccess().
Referenced by unUnRcpClass_ButtonAnimationCB().
unUnRcpClass_ButtonDisconnection | ( | ) |
set the state of the device action button when the device system is disconnected
Referenced by unUnRcpClass_ButtonRegisterCB().
unUnRcpClass_ButtonUserAccess | ( | string | sDpName, | |
string | sDpType, | |||
dyn_string & | dsAccess | |||
) |
returns the list of allowed action on the device for a user logged in
sDpName | input, the device DP name | |
sDpType | input, the device type | |
dsAccess | input, list of allowed action on the device |
Referenced by unUnRcpClass_ButtonSetState().
unUnRcpClass_ButtonAnimationCB | ( | string | sDpLock, | |
bool | bLocked, | |||
string | sDpSelect, | |||
string | sSelectedManager, | |||
string | sDpState, | |||
string | sState | |||
) |
callback function on the device data
sDpLock | input, the lock DPE | |
bLocked | input, selected lock state of the device | |
sDpSelect | input, the select DPE | |
sSelectedManager | input, user and Ui that selected the device | |
sDp1 | input, the DPE1 | |
blobData | input, device data | |
sDp2 | input, the DPE2 | |
iData | input, device status data | |
sDpInvalid | input, the invalid DPE | |
bInvalid | input, data validity |
References unUnRcpClass_ButtonSetState().
unUnRcpClass_WidgetRegisterCB | ( | string | sDp, | |
bool | bSystemConnected | |||
) |
widget DistributedControl callback
sDp | input, the DistributedControl system name DP name | |
bSystemConnected | input, the state of the system name |
References unUnRcpClass_WidgetConnect(), unUnRcpClass_WidgetDisconnect(), and unUnRcpClass_WidgetDisconnection().
unUnRcpClass_WidgetDisconnection | ( | string | sWidgetType | ) |
set the widget when the system is disconnected
sWidgetType | input, the type of widget |
use the exec mechanism to allow multiple widget.
Referenced by unUnRcpClass_WidgetConnect(), and unUnRcpClass_WidgetRegisterCB().
unUnRcpClass_WidgetConnect | ( | string | deviceName, | |
string | sFrontEnd | |||
) |
dpConnect to the device data
deviceName | input, front-end device DP name | |
sFrontEnd | input, front-end device name |
References unUnRcpClass_WidgetDisconnection().
Referenced by unUnRcpClass_WidgetRegisterCB().
unUnRcpClass_WidgetDisconnect | ( | string | deviceName, | |
string | sFrontEnd | |||
) |
dpDisconnect to the device data
deviceName | input, front-end device DP name | |
sFrontEnd | input, front-end device name |
Referenced by unUnRcpClass_WidgetRegisterCB().
unUnRcpClass_WidgetCB | ( | string | sDpLocked, | |
bool | bLocked, | |||
string | sDpSelectedManager, | |||
string | sSelectedManager, | |||
string | sDpState, | |||
string | sState, | |||
string | sDpFESystemIntegrityAlarmValue, | |||
int | iFESystemIntegrityAlarmValue, | |||
string | sDpFESystemIntegrityAlarmEnabled, | |||
bool | bFESystemIntegrityAlarmEnabled | |||
) |
callback function on the device data
sDpLocked | input, the lock DPE | |
bLocked | input, the lock state | |
sDpSelectedManager | input, the selected manager DPE | |
sSelectedManager | input, the selected manager | |
sDpState | input, the recipe instance state DPE | |
sState | input, the recipe instance state value | |
sDpFESystemIntegrityAlarmValue | input, front-end device system integrity alarm DPE | |
iFESystemIntegrityAlarmValue | input, front-end device system integrity alarm value | |
sDpFESystemIntegrityAlarmEnabled | input, front-end device system integrity enable DPE | |
bFESystemIntegrityAlarmEnabled | input, front-end device system integrity enable value |
use the exec mechanism to allow multiple widget.
unUnRcpClass_MenuConfiguration | ( | string | sDpName, | |
string | sDpType, | |||
dyn_string | dsAccessOk, | |||
dyn_string & | menuList | |||
) |
pop-up menu
sDpName | input, device DP name | |
sDpType | input, device type | |
dsAccessOk | input, the access control | |
menuList | output, pop-up menu to show, dyn_string to be given to the popupMenu function |
e.g.: device menu enable/disabled depending on the device access right int pos, iMenu=UN_POPUPMENU_MIN; string sAccess, sOperAction, sExpAction, sAdminAction, sMenu; dyn_string exceptionInfo, dsArchiveName; dyn_bool dbPermissions;
pos = dynContains(menuList, "PUSH_BUTTON, Device configuration, 10, 1"); if(pos > 0) { get the access rigth on the device unGenericDpFunctions_getAccessControlPriviledgeRigth(sDpName, g_dsDomainAccessControl, dbPermissions, sOperAction, sExpAction, sAdminAction, exceptionInfo); sAccess = "0"; if(dbPermissions[4]) { sAccess = "1"; }
sprintf(sMenu, "%d", (iMenu+1)); dynInsertAt(menuList, "SEPARATOR", pos); dynInsertAt(menuList, "PUSH_BUTTON, device menu, "+sMenu+", "+sAccess, pos); dynInsertAt(menuList, "SEPARATOR", pos); }
e.g.: add all the device actions dyn_string dsUserAccess; int pos,i, len, iMenu=UN_POPUPMENU_MIN; string sMenu;
pos = dynContains(menuList, "PUSH_BUTTON, Device configuration, 10, 1"); if(pos > 0) { get the allowed device actions for the user logged in unUnRcpClass_ButtonUserAccess(sDpName, "UnRcpClass", dsUserAccess); remove Select if it is in the list len = dynContains(dsUserAccess, UN_POPUPMENU_SELECT_TEXT); if(len > 0) dynRemove(dsUserAccess, len); len = dynlen(dsUserAccess); if(len > 0) dynInsertAt(menuList, "SEPARATOR", pos);
add all the device actions for(i=1;i<=len;i++) { sprintf(sMenu, "%d", (iMenu+1)); iMenu++; dynInsertAt(menuList, "PUSH_BUTTON, "+dsUserAccess[i]+", "+sMenu+", 1", pos); } if(len > 0) dynInsertAt(menuList, "SEPARATOR", pos); }
e.g.: add all the device actions depending on the current device value dyn_string dsUserAccess; int pos,i, len, iMenu=UN_POPUPMENU_MIN; string sMenu, sAccess, sMenuText; int iData; bool bSelected; bool bActionOk; dyn_string dsButtons = makeDynString("..", "..", "..");
pos = dynContains(menuList, "PUSH_BUTTON, Device configuration, 10, 1"); if(pos > 0) { get the allowed device actions for the user logged in unUnRcpClass_ButtonUserAccess(sDpName, "UnRcpClass", dsUserAccess); bSelected = dynContains(menuList, "PUSH_BUTTON, Deselect, 1, 1"); dpGet(sDpName+".ProcessInput.iData", iData); remove Select if it is in the list len = dynContains(dsUserAccess, UN_POPUPMENU_SELECT_TEXT); if(len > 0) dynRemove(dsUserAccess, len); len = dynlen(dsButtons); if(dynlen(dsUserAccess) > 0) dynInsertAt(menuList, "SEPARATOR", pos);
add the device actions for(i=1;i<=len;i++) { sprintf(sMenu, "%d", (iMenu+1)); iMenu++; sAccess = "0"; bActionOk = (dynContains(dsUserAccess, dsButtons[i]) > 0); // User access switch(dsButtons[i]) { case "..": bActionOk = bActionOk & bSelected & (iData == ".."); sMenuText = "Action .."; break; default: bActionOk = false; sMenuText = ""; break; } if(bActionOk) sAccess = "1"; if(sMenuText != "") dynInsertAt(menuList, "PUSH_BUTTON, "+sMenuText+", "+sMenu+", "+sAccess, pos); } if(dynlen(dsUserAccess) > 0) dynInsertAt(menuList, "SEPARATOR", pos); }
unUnRcpClass_HandleMenu | ( | string | deviceName, | |
string | sDpType, | |||
dyn_string | menuList, | |||
int | iMenuAnswer | |||
) |
handle the answer of the popup menu
deviceName | input, device DP name | |
sDpType | input, device type | |
menuList | input, the access control | |
iMenuAnswer | input, selected menu value |
e.g.: handle the device actions find the corresponding device action text dsTemp = dynPatternMatch("PUSH_BUTTON, *, 1", menuList); len = dynlen(dsTemp); for(i=1;i<=len;i++) { dsSplit = strsplit(dsTemp[i], ","); sscanf(dsSplit[3], "%d", iMenu); if(iMenu == iMenuAnswer) { switch(strltrim(dsSplit[2], " ")) { case "..": do the action break; } } }
unUnRcpClass_StateAnimation | ( | bool | bSystemConnected, | |
string | sWidgetType, | |||
int | iFESystemIntegrityAlarmValue, | |||
bool | bFESystemIntegrityAlarmEnabled | |||
) |
animate the device State widget !!!!! function trigger by exec call, $-param and variable of the widget cannot be used, all the necessary data must be given to the function. The use of global var (global keyword declaration) is allowed
blobData | input, device data | |
bSystemConnected | input, connection state of the system, true=system connected/false=system not connected | |
sWidgetType | input, the type of widget | |
iFESystemIntegrityAlarmValue | input, front-end device system integrity alarm value | |
bFESystemIntegrityAlarmEnabled | input, front-end device system integrity enable value |
!!!!!!! all parameters must be given: function launched by exec
unUnRcpClass_StateDisconnection | ( | string | sWidgetType | ) |
animate the the device State widget when the system is disconnected !!!!! function trigger by exec call, $-param and variable of the widget cannot be used, all the necessary data must be given to the function. The use of global var (global keyword declaration) is allowed
sWidgetType | input, the type of widget |