unRecipe 9.1.0
|
LIBRARY: unRecipeFunctions.ctl | |
Creation Date: April 2011 version 1.4.0 Modification History: 01/11/2011: Ivan
01/08/2012: Ivan
09/12/2013: Ivan
09/09/2014: Ivan
External Functions: Internal Functions: |
|
global mapping | unRecipeFaceplate_selectedRecipe |
void | unRecipeFunctions_writeDifferentOnlineValuesReport (dyn_int diDiffRowIndex, dyn_string dsDpNames, dyn_string dsAlias, dyn_anytype daRcpValues, dyn_anytype daOnlineValues) |
bool | _unRecipeFunctions_getRowStylesForValueComparison (dyn_anytype daValues1, dyn_anytype daValues2, dyn_int &diRowStyleIndex, dyn_int &diRowStyles, dyn_int &diDiffRowIndex) |
void | unRecipeFunctions_getOnlineValues (dyn_string dsDpNames, dyn_anytype &values, dyn_string &exceptionInfo, time t=0) |
void | _unRecipeFunctions_getTypeMapping (string sRecipeType, mapping &map, dyn_string &exceptionInfo) |
synchronized bool | _unRecipeFunctions_lockDevices (dyn_string dsDpNames, dyn_string &dsLockedDeviceDp, dyn_string &dsLockedDeviceAlias, dyn_string &exceptionInfo, bool isPeriodicSave=false) |
synchronized bool | _unRecipeFunctions_unlockDevices (dyn_string dsDpNames, dyn_string &exceptionInfo, bool isPeriodicSave=false) |
void | unRecipeFunctions_formatValues (dyn_string dsDpNames, dyn_string values, dyn_anytype &formattedValues, dyn_string &exceptionInfo) |
bool | _unRecipeFunctions_checkRecipeValues (dyn_string dsDps, dyn_anytype values, bool bShowErrorLines, dyn_string &exceptionInfo) |
int | unRecipeFunctions_checkRecipeValue (string sDpName, anytype value, dyn_string &exceptionInfo) |
mapping | _unRecipeFunctions_extractAnalogAlarms (dyn_string dsDps, dyn_anytype values) |
dyn_int | _unRecipeFunctions_checkAnalogAlarmThreshold (mapping analogAlarm) |
bool | _unRecipeFunctions_checkRecipeThresholds (dyn_string dsDps, dyn_anytype values, bool bShowErrorLines, dyn_string &exceptionInfo) |
void | _unRecipeFunctions_getRecipeObjectFromDp (string sRecipeDp, dyn_dyn_mixed &recipeObject, dyn_string &exceptionInfo) |
void | _unRecipeFunctions_orderRecipeInstanceElements (dyn_string dsDeviceOrder, dyn_dyn_mixed &recipeObject) |
void | unRecipeFunctions_getRecipeClassObject (string sRcpClassDp, dyn_mixed &recipeClassInfo, dyn_string &exceptionInfo) |
void | _unRecipeFunctions_getS7AddressDBNumber (string sDpe, string sDeviceType, string &sDb, dyn_string &exceptionInfo) |
void | unRecipeFunctions_getPlcStatus (dyn_string recipeElements, bool &bActive, dyn_string &statusMessage, dyn_string &exceptionInfo) |
mapping | unRecipeFunctions_getApplicationPcos (bool bLocalOnly=TRUE, bool bOnlyPcosWithRecipes=FALSE) |
dyn_string | unRecipeFunctions_getApplicationPcoList (mapping mApplicationPcos, string sApplication) |
void | unRecipeFunctions_getPcosWithRecipes (dyn_string &dsPcoNamesWithRecipes, dyn_string &dsPcoDpsWithRecipes, bool bLocalOnly=FALSE, string sApplication="*", dyn_string dsAllPcos=makeDynString(), dyn_string dsAllPcoDps=makeDynString()) |
void | _unRecipeFunctions_loadPcosWithRecipes (string sApplication) |
void | _unRecipeFunctions_getFilteredDevices (dyn_string dsSelectedDevType, dyn_string &dsRetDpName, dyn_string &dsRetAlias, dyn_string &dsRetAppl, bool bLocalOnly=FALSE, dyn_string dsSelectedApplication=makeDynString("*")) |
void | _unRecipeFunctions_getFilteredDevicesBySystemName (string sSystemName, dyn_string dsSelectedDevType, dyn_string &dsRetDpName, dyn_string &dsRetAlias, dyn_string &dsRetAppl, dyn_string dsSelectedApplication=makeDynString("*")) |
void | _unRecipeFunctions_getVisibleApplicationsList (dyn_string &dsApplications) synchronized(g_unicosHMI_dsApplicationList) |
void | _unRecipeFunctions_getPcoChildren (string sPcoDpName, dyn_string &children, dyn_string &exceptionInfo) |
bool | unRecipeFunctions_createRecipeFrontEnd (string sAppName, string sPrefix, bool bEvent, string sAnalog, string sBool, string sEvent, dyn_string &exceptionInfo) |
void | unRecipeFunctions_openFaceplate (string sAlias, dyn_string &exceptionInfo) |
cpcGenericObject_OpenRecipes (string deviceName) | |
UNICOS Copyright (C) CERN 2014 All rights reserved
void unRecipeFunctions_writeDifferentOnlineValuesReport | ( | dyn_int | diDiffRowIndex, |
dyn_string | dsDpNames, | ||
dyn_string | dsAlias, | ||
dyn_anytype | daRcpValues, | ||
dyn_anytype | daOnlineValues | ||
) |
Writes a report on the log window with the different values from the recipe and the PLC online values.
diDiffRowIndex | - [IN] Indexes of rows where there are different values |
dsDpNames | - [IN] Datapoint names of the recipe elements |
dsAlias | - [IN] Alias of the recipe elements |
daRcpValues | - [IN] Recipe values |
daOnlineValues | - [IN] PLC online values |
bool _unRecipeFunctions_getRowStylesForValueComparison | ( | dyn_anytype | daValues1, |
dyn_anytype | daValues2, | ||
dyn_int & | diRowStyleIndex, | ||
dyn_int & | diRowStyles, | ||
dyn_int & | diDiffRowIndex | ||
) |
Compares the value lists daValues1 and daValues2 and set:
daValues1 | - [IN] First list of values to compare. |
daValues2 | - [IN] Second list of values to compare. |
diRowStyleIndex | - [OUT] Row index for the styles. |
diRowStyles | - [OUT] Styles for the table rows. |
diDiffRowIndex | - [OUT] Index of the rows with different values. |
void unRecipeFunctions_getOnlineValues | ( | dyn_string | dsDpNames, |
dyn_anytype & | values, | ||
dyn_string & | exceptionInfo, | ||
time | t = 0 |
||
) |
Get the online values of a recipe instance.
dsDpNames | - [IN] DP Names of the elements which online values are required. |
values | - [OUT] Online formatted values corresponding to the recipe class DPEs. |
exceptionInfo | - [OUT] Standard exception handling variable. |
void _unRecipeFunctions_getTypeMapping | ( | string | sRecipeType, |
mapping & | map, | ||
dyn_string & | exceptionInfo | ||
) |
Get the DPEs associated to each device type in a recipe type.
sRecipeType | - [IN] Recipe type name. |
map | - [OUT] Mapping variable where Key=Device type name, Value=List containing the DPEs included in the recipe type for the specified key (device type). |
exceptionInfo | - [OUT] Standard exception handling variable. |
synchronized bool _unRecipeFunctions_lockDevices | ( | dyn_string | dsDpNames, |
dyn_string & | dsLockedDeviceDp, | ||
dyn_string & | dsLockedDeviceAlias, | ||
dyn_string & | exceptionInfo, | ||
bool | isPeriodicSave = false |
||
) |
Try to lock the devices specified.
dsDpNames | - [IN] DP names of the devices to lock. |
dsLockedDeviceDp | - [OUT] DP names of the devices that are already locked. |
dsLockedDeviceAlias | - [OUT] Alias of the devices that are already locked. |
exceptionInfo | - [OUT] Standard exception handling variable. |
isPeriodicSave | - [IN] Determines whether the function is running in the background or not. |
synchronized bool _unRecipeFunctions_unlockDevices | ( | dyn_string | dsDpNames, |
dyn_string & | exceptionInfo, | ||
bool | isPeriodicSave = false |
||
) |
Try to unlock the devices specified.
dsDpNames | - [IN] DP names of the devices to unlock. |
exceptionInfo | - [OUT] Standard exception handling variable. |
isPeriodicSave | - [IN] Determines whether the function is running in the background or not. |
void unRecipeFunctions_formatValues | ( | dyn_string | dsDpNames, |
dyn_string | values, | ||
dyn_anytype & | formattedValues, | ||
dyn_string & | exceptionInfo | ||
) |
Gets the formatted values of a set of DPEs.
dsDpNames | - [IN] List of dp names in the UNICOS format. |
values | - [IN] List of values for the specified dpNames. |
formattedValues | - [OUT] Formatted values. |
exceptionInfo | - [OUT] Standard exception handling variable. |
bool _unRecipeFunctions_checkRecipeValues | ( | dyn_string | dsDps, |
dyn_anytype | values, | ||
bool | bShowErrorLines, | ||
dyn_string & | exceptionInfo | ||
) |
Internal function to check if the recipe values are valid according to the defined ranges.
dsDps | - [IN] Datapoint elements of the recipe values. |
values | - [IN] Recipe values. |
bShowErrorLines | - [IN] TRUE if the values out of range must be highlighted in the table. |
exceptionInfo | - [OUT] Standard exception handling variable. |
int unRecipeFunctions_checkRecipeValue | ( | string | sDpName, |
anytype | value, | ||
dyn_string & | exceptionInfo | ||
) |
Check if the recipe value is valid according to the defined range.
sDpName | - [IN] Data point name of the recipe element. |
value | - [IN] Value of the recipe element. |
exceptionInfo | - [OUT] Standard exception handling routine. |
mapping _unRecipeFunctions_extractAnalogAlarms | ( | dyn_string | dsDps, |
dyn_anytype | values | ||
) |
Extract from the list all analog alarms and save it to a dictionary with keys: name: Contain the root name of the DPE (without properties) | -> property: Property of the alarm, HH, H, L, LL | -> value: Value of the alarm thresold | -> position: Position of the value in the array structure dsDps/values
dsDps | - [IN] Datapoint elements of the recipe values. |
values | - [IN] Recipe values. |
bShowErrorLines | - [IN] TRUE if the values out of range must be highlighted in the table. |
dyn_int _unRecipeFunctions_checkAnalogAlarmThreshold | ( | mapping | analogAlarm | ) |
Returns a list of positions with thresholds invalid with the rule HH >= H >= L >= LL The structure of the input map is: property: Property of the alarm, HH, H, L, LL | -> value: Value of the alarm thresold | -> position: Position of the value in the array structure dsDps/values The structure should be a subset of the mapping of _unRecipeFunctions_extractAnalogAlarms
analogAlarm | - [IN] Mapping containing one analog alarm |
bool _unRecipeFunctions_checkRecipeThresholds | ( | dyn_string | dsDps, |
dyn_anytype | values, | ||
bool | bShowErrorLines, | ||
dyn_string & | exceptionInfo | ||
) |
Check if the recipe thresholds are valid according to HH >= H >= L >= LL
dsDps | - [IN] Datapoint elements of the recipe values. |
values | - [IN] Recipe values. |
bShowErrorLines | - [IN] TRUE if the values out of range must be highlighted in the table. |
exceptionInfo | - [OUT] Standard exception handling variable. |
void _unRecipeFunctions_getRecipeObjectFromDp | ( | string | sRecipeDp, |
dyn_dyn_mixed & | recipeObject, | ||
dyn_string & | exceptionInfo | ||
) |
Get the recipe instance object.
sRecipeDp | - [IN] Datapoint name of the recipe instance. |
recipeObject | - [OUT] Recipe instance object from fwConfigDB. |
exceptionInfo | - [OUT] Standard exception handling variable. |
void unRecipeFunctions_getRecipeClassObject | ( | string | sRcpClassDp, |
dyn_mixed & | recipeClassInfo, | ||
dyn_string & | exceptionInfo | ||
) |
Get the recipe class object from the JCOP library.
sRcpClassDp | - [IN] Recipe class name. |
recipeClassInfo | - [OUT] Recipe class object returned from the JCOP library. |
exceptionInfo | - [OUT] Standard exception handling variable. |
void _unRecipeFunctions_getS7AddressDBNumber | ( | string | sDpe, |
string | sDeviceType, | ||
string & | sDb, | ||
dyn_string & | exceptionInfo | ||
) |
Gets the DB number of a S7 address for a DPE.
sDpe | - [IN] DPE which DB number is required. |
sDeviceType | - [IN] Device type name of the dpe. |
sDb | - [OUT] DB number of the DPE S7 address. |
exceptionInfo | - [OUT] Standard exception handling variable. |
void unRecipeFunctions_getPlcStatus | ( | dyn_string | recipeElements, |
bool & | bActive, | ||
dyn_string & | statusMessage, | ||
dyn_string & | exceptionInfo | ||
) |
Gets the PLC status of a recipe.
recipeElements | - [IN] List of DPEs. |
bActive | - [OUT] True if the PLCs are active, otherwise false. |
statusMessage | - [OUT] PLC status message. |
exceptionInfo | - [OUT] Standard exception handling variable. |
mapping unRecipeFunctions_getApplicationPcos | ( | bool | bLocalOnly = TRUE , |
bool | bOnlyPcosWithRecipes = FALSE |
||
) |
Gets a mapping where the key is the application name and the value is a dyn_string containing the PCOs in that application.
bLocalOnly | - [IN] TRUE if and only if the local applications must be included, otherwise FALSE. |
bOnlyPcosWithRecipes | - [IN] TRUE if and only if the PCOs with recipes must be included, otherwise FALSE. |
dyn_string unRecipeFunctions_getApplicationPcoList | ( | mapping | mApplicationPcos, |
string | sApplication | ||
) |
Gets the list of PCOs for the specified application.
mApplicationPcos | - [IN] Mapping where the key is the application name and the value is the list of PCOs for the application |
sApplication | - [IN] Application name or '*' to get the PCOs of all the applications |
void unRecipeFunctions_getPcosWithRecipes | ( | dyn_string & | dsPcoNamesWithRecipes, |
dyn_string & | dsPcoDpsWithRecipes, | ||
bool | bLocalOnly = FALSE , |
||
string | sApplication = "*" , |
||
dyn_string | dsAllPcos = makeDynString() , |
||
dyn_string | dsAllPcoDps = makeDynString() |
||
) |
Get the list of PCOs with recipes
dsPcoNamesWithRecipes | - [OUT] Alias of the PCOs with recipes found. |
dsPcoDpsWithRecipes | - [OUT] Dp names of the PCOs with recipes found. |
bLocalOnly | - [IN] TRUE if and only if the PCOs on the local application must be queried, otherwise FALSE. |
sApplication | - [IN] Applications where to look for the PCOs with recipes. |
dsAllPcos | - [IN] List of PCO aliases, if not provided it will search for the PCOs in the specified applications and systems. |
dsAllPcoDps | - [IN] List of PCO dp names, if not provided it will search for the PCO dpnames in the specified applications and systems. |
void _unRecipeFunctions_loadPcosWithRecipes | ( | string | sApplication | ) |
Load the PCO List in the PcoList combo box.
sApplication | - [IN] Application name where to load the PCOs from. |
void _unRecipeFunctions_getFilteredDevices | ( | dyn_string | dsSelectedDevType, |
dyn_string & | dsRetDpName, | ||
dyn_string & | dsRetAlias, | ||
dyn_string & | dsRetAppl, | ||
bool | bLocalOnly = FALSE , |
||
dyn_string | dsSelectedApplication = makeDynString("*") |
||
) |
Get the list of devices filtering the applications and the device types specified.
dsSelectedDevType | - [IN] List of selected device types. |
dsRetDpName | - [OUT] List of DP Names found. |
dsRetAlias | - [OUT] List of devices aliases found. |
dsRetAppl | - [OUT] List of applications of the found devices. |
bLocalOnly | - [IN] TRUE if only the devices from the local system must be returned, otherwise FALSE. |
dsSelectedApplication | - [IN] List of applications where to look for the devices. |
void _unRecipeFunctions_getVisibleApplicationsList | ( | dyn_string & | dsApplications | ) |
Get the list of visible applications.
dsApplications | - [OUT] List of visible applications. |
void _unRecipeFunctions_getPcoChildren | ( | string | sPcoDpName, |
dyn_string & | children, | ||
dyn_string & | exceptionInfo | ||
) |
Get all the PCOs that are children of the sPco device (recursive method, get all the PCOs in the hierarchy).
sPcoDpName | - [IN] Name of the PCO which children are requested. |
children | - [OUT] Contains the alias of all the PCO children of the sPcoDp device. |
exceptionInfo | - [OUT] Standard exception handling variable. |
bool unRecipeFunctions_createRecipeFrontEnd | ( | string | sAppName, |
string | sPrefix, | ||
bool | bEvent, | ||
string | sAnalog, | ||
string | sBool, | ||
string | sEvent, | ||
dyn_string & | exceptionInfo | ||
) |
Create the SOFT_FE for the recipes.
sAppName | - [IN] Application name. |
sPrefix | - [IN] Application prefix. |
bEvent | - [IN] TRUE=16 bit event type, FALSE=32 bit event type |
sAnalog | - [IN] Name of the analog archive file. |
sBool | - [IN] Name of the boolean archive file. |
sEvent | - [IN] Name of the event archive file. |
exceptionInfo | - [OUT] Standard exception handling variable. |
void unRecipeFunctions_openFaceplate | ( | string | sAlias, |
dyn_string & | exceptionInfo | ||
) |
Open the faceplate of a device provided the device alias.
sAlias | - [IN] Device alias |
exceptionInfo | - [OUT] Standard exception handling variable. |
cpcGenericObject_OpenRecipes | ( | string | deviceName | ) |
Open recipe window
deviceName | device name |