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) |
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) |
synchronized bool | _unRecipeFunctions_unlockDevices (dyn_string dsDpNames, dyn_string &exceptionInfo) |
public void | unRecipeFunctions_formatValues (dyn_string dsDpNames, dyn_string values, dyn_anytype &formattedValues, dyn_string &exceptionInfo) |
public bool | _unRecipeFunctions_checkRecipeValues (dyn_string dsDps, dyn_anytype values, bool bShowErrorLines, dyn_string &exceptionInfo) |
int | unRecipeFunctions_checkRecipeValue (string sDpName, anytype value, dyn_string &exceptionInfo) |
void | _unRecipeFunctions_getRecipeObjectFromDp (string sRecipeDp, dyn_dyn_mixed &recipeObject, dyn_string &exceptionInfo) |
private 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) |
public mapping | unRecipeFunctions_getApplicationPcos (bool bLocalOnly=TRUE, bool bOnlyPcosWithRecipes=FALSE) |
public dyn_string | unRecipeFunctions_getApplicationPcoList (mapping mApplicationPcos, string sApplication) |
public void | unRecipeFunctions_getPcosWithRecipes (dyn_string &dsPcoNamesWithRecipes, dyn_string &dsPcoDpsWithRecipes, bool bLocalOnly=FALSE, string sApplication="*", dyn_string dsAllPcos=makeDynString(), dyn_string dsAllPcoDps=makeDynString()) |
public void | _unRecipeFunctions_loadPcosWithRecipes (string sApplication) |
public void | _unRecipeFunctions_getFilteredDevices (dyn_string dsSelectedDevType, dyn_string &dsRetDpName, dyn_string &dsRetAlias, dyn_string &dsRetAppl, bool bLocalOnly=FALSE, dyn_string dsSelectedApplication=makeDynString("*")) |
public 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) |
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 |
References unRecipeFunctions_writeInRecipeLog().
Referenced by unRecipeFunctions_compareOnlineValues(), and unRecipeFunctions_editRecipeValuesAndShowDifferences().
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. |
Referenced by unRecipeFunctions_compareOnlineValues(), and unRecipeFunctions_editRecipeValuesAndShowDifferences().
void unRecipeFunctions_getOnlineValues | ( | dyn_string | dsDpNames, | |
dyn_anytype & | values, | |||
dyn_string & | exceptionInfo | |||
) |
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. |
References unRecipeFunctions_formatValues(), and unRecipeFunctions_getOnlineValueDpes().
Referenced by _unRecipeFunctions_setOnlineValuesForNewDpes(), unRecipeFunctions_adoptOnlineValues(), unRecipeFunctions_compareOnlineValues(), and unRecipeFunctions_displayOnlineValues().
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. |
Referenced by unRecipeFunctions_addRecipeClassDevices().
synchronized bool _unRecipeFunctions_lockDevices | ( | dyn_string | dsDpNames, | |
dyn_string & | dsLockedDeviceDp, | |||
dyn_string & | dsLockedDeviceAlias, | |||
dyn_string & | exceptionInfo | |||
) |
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. |
References _unRecipeFunctions_unlockDevices(), unRecipeFunctions_handleDpGetSetError(), and unRecipeFunctions_writeInRecipeLog().
Referenced by _unRecipeFunctions_canActivateRecipeInPlcs(), _unRecipeFunctions_saveRecipeClassToDb(), and _unRecipeFunctions_saveRecipeInstanceToDb().
synchronized bool _unRecipeFunctions_unlockDevices | ( | dyn_string | dsDpNames, | |
dyn_string & | exceptionInfo | |||
) |
Try to unlock the devices specified.
dsDpNames | - [IN] DP names of the devices to unlock. | |
exceptionInfo | - [OUT] Standard exception handling variable. |
References unRecipeFunctions_handleDpGetSetError(), and unRecipeFunctions_writeInRecipeLog().
Referenced by _unRecipeFunctions_finalizeSaveRecipeToDb(), _unRecipeFunctions_lockDevices(), and unRecipeFunctions_unlockRecipeBuffers().
public 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. |
References unRecipeFunctions_getInstanceRange(), unRecipeFunctions_getOnlineValueDpes(), and unRecipeFunctions_getRangeElementFromPVSSDPE().
Referenced by _unRecipeFunctions_cellEditionFinished(), _unRecipeFunctions_highlightEditedValue(), _unRecipeFunctions_saveRecipeValues(), SOFT_FE_UnRcpInstance_setConfig(), unRecipeDbFunctions_getRecipeInstanceDbValues(), unRecipeFunctions_activateRecipe(), unRecipeFunctions_getOnlineValues(), and unRecipeFunctions_loadRecipeInstanceData().
public 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. |
References unRecipeFunctions_checkRecipeValue().
Referenced by unRecipeFunctions_activateRecipe(), unRecipeFunctions_checkRecipeValues(), unRecipeFunctions_displayDbValues(), unRecipeFunctions_displayOnlineValues(), unRecipeFunctions_editRecipeInstance(), unRecipeFunctions_loadRecipeInstanceData(), and unRecipeFunctions_loadSingleRecipeFromDb().
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. |
References unRecipeFunctions_getDeviceRange(), and unRecipeFunctions_getRangeValues().
Referenced by _unRecipeFunctions_cellEditionFinished(), and _unRecipeFunctions_checkRecipeValues().
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. |
Referenced by _unRecipeFunctions_cellEditionFinished(), _unRecipeFunctions_deleteRecipeInstances(), _unRecipeFunctions_dpConnectRcpValuesCB(), _unRecipeFunctions_highlightEditedValue(), _unRecipeFunctions_loadHistoryTableInfo(), _unRecipeFunctions_loadPropertiesTableInfo(), _unRecipeFunctions_saveRecipeInstanceToDb(), unRecipeFunctions_adoptOnlineValues(), unRecipeFunctions_checkRecipeStatus(), unRecipeFunctions_compareOnlineValues(), unRecipeFunctions_connectPlcStatus(), unRecipeFunctions_deleteRecipeInstance(), unRecipeFunctions_disconnectPlcStatus(), unRecipeFunctions_duplicateRecipeInstance(), unRecipeFunctions_exportMultipleRecipes(), unRecipeFunctions_loadRecipeInstanceData(), unRecipeFunctions_saveAsDeviceDefaultValues(), unRecipeFunctions_saveAsInitialRecipe(), and unRecipeFunctions_saveRecipeInstance().
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. |
References unRecipeFunctions_normalizeDp().
Referenced by _unRecipeFunctions_createRecipeInstance(), _unRecipeFunctions_getExistingClassOrCreateNewClassFromDb(), _unRecipeFunctions_isRecipeClassDefinitionValid(), _unRecipeFunctions_loadPropertiesTableInfo(), SOFT_FE_UnRcpClass_ExportConfig(), SOFT_FE_UnRcpInstance_setConfig(), unRecipeFunctions_applyRecipeClassModifications(), unRecipeFunctions_checkRecipeStatus(), and unRecipeFunctions_loadRecipeClassData().
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. |
Referenced by _unRecipeFunctions_createRecipeHeaderDBNumber().
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. |
Referenced by unRecipeFunctions_activateRecipe(), unRecipeFunctions_checkRecipeStatus(), and unRecipeFunctions_getRecipeStatus().
public 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. |
References _unRecipeFunctions_getFilteredDevices(), unRecipeFunctions_getPcosWithRecipes(), and unRecipeFunctions_mappingInsertValue().
public 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 |
public 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. |
References _unRecipeFunctions_getFilteredDevices().
Referenced by _unRecipeFunctions_loadPcosWithRecipes(), and unRecipeFunctions_getApplicationPcos().
public void _unRecipeFunctions_loadPcosWithRecipes | ( | string | sApplication | ) |
Load the PCO List in the PcoList combo box.
sApplication | - [IN] Application name where to load the PCOs from. |
References unRecipeFunctions_getPcosWithRecipes().
Referenced by unRecipeFunctions_selectPcoRecipes().
public 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. |
Referenced by _unRecipeFunctions_getRecipeInstancesOfClass(), unRecipeFunctions_addRecipeClassDevices(), unRecipeFunctions_getApplicationPcos(), unRecipeFunctions_getPcoList(), unRecipeFunctions_getPcosWithRecipes(), and unRecipeFunctions_getRecipeClasses().
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. |
References cpcGenericObject_getLinkedObjects(), and unRecipeFunctions_normalizeDp().
Referenced by unRecipeFunctions_getInitialRecipesFromPcoHierarchy(), and unRecipeFunctions_getLastActivatedRecipesFromPcoHierarchy().
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. |
Referenced by _unRecipeFunctions_createPredefinedRecipeInstance(), and _unRecipeFunctions_createRecipeClass().
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. |