unRecipe 9.1.0
unRcpFunctions_activation.ctl File Reference

LIBRARY: unRecipeFunctions_activation.ctl

Author
: Ivan Prieto Barreiro (EN-ICE-SIC)

Creation Date: April 2011

version 1.4.0

Modification History:

20/10/2014: Ivan

  • v1.4.0 : The file contains the functions used for recipe activation.

External Functions: .

Internal Functions:

global mapping gHeaderMap
 
global mapping gManRegAddrMap
 
global mapping gManRegValMap
 
global mapping gReqAddrMap
 
global mapping gReqValMap
 
global mapping unRecipe_unRecipe_pidManRegBits
 
global mapping unRecipe_aalarmManRegBits
 
global mapping unRecipe_dalarmManRegBits
 
global mapping unRecipe_recipeActivationInfo
 
void _unRecipeFunctions_initializeManRegBits ()
 
dyn_int _unRecipeFunctions_getHeaderBuffer (string sPlcName)
 
dyn_int _unRecipeFunctions_getManRegAddrBuffer (string sPlcName)
 
dyn_int _unRecipeFunctions_getManRegValBuffer (string sPlcName)
 
dyn_int _unRecipeFunctions_getReqAddrBuffer (string sPlcName)
 
dyn_float _unRecipeFunctions_getReqValBuffer (string sPlcName)
 
void _unRecipeFunctions_removeRecipeBuffers (string sPlcName)
 
int unRecipeFunctions_activateRecipe (string sRcpInstanceDp, dyn_string &exceptionInfo)
 
void _unRecipeFunctions_resetRecipeActivation (int iCode, string sRcpInstanceDp, string sRcpName, string sMessage)
 
void _unRecipeFunctions_removeRecipeHeaderBuffers (dyn_anytype daPlcNames)
 
bool unRecipeFunctions_unlockRecipeBuffers (dyn_anytype daPlcNames, dyn_string &exceptionInfo)
 
int _unRecipeFunctions_getElementsByPLC (dyn_string dsElements, dyn_anytype dsValues, mapping &plcDpes, dyn_string &exceptionInfo)
 
bool _unRecipeFunctions_getRecipeBuffersName (string plcName, string &dpName, dyn_string &exceptionInfo)
 
synchronized int _unRecipeFunctions_canActivateRecipeInPlcs (string sRcpInstanceDp, dyn_anytype dsPlcNames, dyn_string &dsBusyPlcs, dyn_string &exceptionInfo)
 
void unRecipeFunctions_getRecipeActivationTimeout (dyn_anytype plcNames, time &tExpirationTime, int &iTimeoutSec, dyn_string &exceptionInfo)
 
int _unRecipeFunctions_activateRecipeByPLC (mapping plcDpes, string sRcpInstanceDp, dyn_string &exceptionInfo)
 
synchronized void _unRecipeFunctions_createRecipeActivationInfo (dyn_anytype plcNames, string sRcpInstanceDp)
 
synchronized bool _unRecipeFunctions_incrementNumPlcsReadyToActivate (string sPlcName, string sRcpInstanceDp)
 
synchronized bool _unRecipeFunctions_incrementNumPlcsActivatedRecipe (string sPlcName, string sRcpInstanceDp)
 
synchronized bool _unRecipeFunctions_addPlcToRecipeActivationInfo (int index, string sPlcName, string sRcpInstanceDp)
 
int _unRecipeFunctions_waitUntilActivationIsCompleted (string sRcpInstanceDp, time tEnd, dyn_string &exceptionInfo)
 
int _unRecipeFunctions_checRecipeActivation (string sRcpInstanceDp)
 
bool _unRecipeFunctions_activateRecipe (string plcName, string plcType, string sRcpInstanceDp, dyn_string dpes, dyn_string values, dyn_string &exceptionInfo)
 
void _unRecipeFunctions_sendRecipeHeader (string sPlcName, dyn_string &exceptionInfo, bool bWaitForDpSet=TRUE)
 
void _unRecipeFunctions_checkRecipeStatusBufferCB (string sRecipeStatusDp, int recipeStatus, string sRecipeState, string sState)
 
void _unRecipeFunctions_recipeActivationStatusError (string sPlcName, string sRecipeStatusDp, string sRecipeStateDp)
 
void _unRecipeFunctions_recipeActivationStatusNewIdReceived (string sPlcName, string sBuffersDpName, string sRcpInstanceDp)
 
void _unRecipeFunctions_recipeActivationStatusCrcOk (string sPlcName, string sBuffersDpName, string sRcpInstanceDp)
 
void _unRecipeFunctions_recipeActivationStatusDone (string sPlcName, string sRecipeStatusDp, string sRecipeStateDp, string sRcpInstanceDp)
 
void _unRecipeFunctions_recipeActivationWrongOnlineValues (string sErrDpe)
 
void _unRecipeFunctions_recipeActivationUpdateMetaInfo (dyn_dyn_mixed recipeObject, string sRcpDp)
 
bool _unRecipeFunctions_checkRecipeStatusBufferData (string sBuffersDpName, dyn_string &exceptionInfo)
 
void _unRecipeFunctions_cancelRecipeActivation (string sPlcName, string sBuffersDpName, string sRecipeState, string sReason, bool bDisconnect=true, bool bTerminate=false)
 
synchronized void unRecipeFunctions_cancelRecipeActivation (string sRecipeDpName, dyn_string &exceptionInfo, string sReason="", bool bTerminate=FALSE)
 
void _unRecipeFunctions_createBuffersData (string sPlcName, dyn_string dpes, dyn_string values, dyn_string &exceptionInfo)
 
void _unRecipeFunctions_addDigitalParameterToBuffers (int &numDevices, string sDeviceName, string sValue, dyn_int &diManRegAddr, dyn_int &diManRegVal, dyn_string &exceptionInfo)
 
void _unRecipeFunctions_addXParameterToBuffers (int &numDevices, string sDeviceName, string sDeviceType, string sValue, int iArmBit, int iNewMrBit, dyn_int &diManRegAddr, dyn_int &diManRegVal, dyn_int &diReqAddr, dyn_float &dfReqVal, dyn_string &exceptionInfo)
 
void _unRecipeFunctions_addMultiDpeDeviceToBuffers (int &numDevices, string sDeviceName, string sDpeName, string sDeviceType, string sValue, mapping &deviceMap, mapping manRegBitsMap, int iArmBit, dyn_string &exceptionInfo)
 
void _unRecipeFunctions_fillRecipeHeaderBuffer (dyn_int &recipeHeaderBuffer, int iNumDPar, int iNumWPar, int iNumAPar, int iNumAAlarm, int iNumPid, int iNumDAlarm)
 
void _unRecipeFunctions_fillRecipeBuffer (dyn_anytype &buffer, dyn_anytype dparValues, dyn_anytype wparValues, dyn_anytype aparValues, dyn_anytype aalarmValues, dyn_anytype pidValues, dyn_anytype dalarmValues)
 
void _unRecipeFunctions_sendData (string plcName, dyn_string &exceptionInfo)
 
void _unRecipeFunctions_processMultiDpeDevices (mapping map, dyn_int &manRegAddresses, dyn_int &manRegValues, dyn_int &reqAddresses, dyn_float &reqValues)
 
void _unRecipeFunctions_createRecipeHeaderDBNumber (string sPlcName, dyn_string dsDpes, dyn_string &exceptionInfo)
 
synchronized void unRecipeFunctions_activateRecipes (dyn_string dsRcpDps)
 
void _unRecipeFunctions_recipeStateCB (dyn_string dsDpList, dyn_string dsValues)
 
void unRecipeFunctions_checkRecipeStatus (dyn_string dsRcpDps)
 

Detailed Description

UNICOS Copyright (C) CERN 2014 All rights reserved

Function Documentation

◆ _unRecipeFunctions_initializeManRegBits()

void _unRecipeFunctions_initializeManRegBits ( )
private

Initialization of the ManReg bit positions used in the recipes by the different device types.

◆ _unRecipeFunctions_getHeaderBuffer()

dyn_int _unRecipeFunctions_getHeaderBuffer ( string  sPlcName)
private

Get the recipe header buffer for the specified PLC.

Parameters
sPlcName- [IN] The PLC name which recipe header buffer is required.
Returns
dyn_int containing the values of the recipe header buffer for the specified PLC.

◆ _unRecipeFunctions_getManRegAddrBuffer()

dyn_int _unRecipeFunctions_getManRegAddrBuffer ( string  sPlcName)
private

Get the recipe ManRegAddress buffer for the specified PLC.

Parameters
sPlcName- [IN] The PLC name which recipe ManRegAddress buffer is required.
Returns
dyn_int containing the values of the recipe ManRegAddress buffer for the specified PLC.

◆ _unRecipeFunctions_getManRegValBuffer()

dyn_int _unRecipeFunctions_getManRegValBuffer ( string  sPlcName)
private

Get the recipe ManRegValues buffer for the specified PLC.

Parameters
sPlcName- [IN] The PLC name which recipe ManRegValues buffer is required.
Returns
dyn_int containing the values of the recipe ManRegValues buffer for the specified PLC.

◆ _unRecipeFunctions_getReqAddrBuffer()

dyn_int _unRecipeFunctions_getReqAddrBuffer ( string  sPlcName)
private

Get the recipe ReqAddress buffer for the specified PLC.

Parameters
sPlcName- [IN] The PLC name which recipe ReqAddress buffer is required.
Returns
dyn_int containing the values of the recipe ReqAddress buffer for the specified PLC.

◆ _unRecipeFunctions_getReqValBuffer()

dyn_float _unRecipeFunctions_getReqValBuffer ( string  sPlcName)
private

Get the recipe ReqValues buffer for the specified PLC.

Parameters
sPlcName- [IN] The PLC name which recipe ReqValues buffer is required.
Returns
dyn_float containing the values of the recipe ReqValues buffer for the specified PLC.

◆ _unRecipeFunctions_removeRecipeBuffers()

void _unRecipeFunctions_removeRecipeBuffers ( string  sPlcName)
private

Remove all the recipe buffers associated to the specified PLC.

Parameters
sPlcName- [IN] The PLC name which recipe buffers must be removed.

◆ unRecipeFunctions_activateRecipe()

int unRecipeFunctions_activateRecipe ( string  sRcpInstanceDp,
dyn_string &  exceptionInfo 
)

Activate a recipe.

Parameters
sRcpInstanceDp- [IN] Data point name of the recipe which activation is triggered.
exceptionInfo- [OUT] Standard exception handling variable.
Returns
Integer value to indicate the activation result (see the RCP_ACT_RETVAL_ constants).

◆ _unRecipeFunctions_resetRecipeActivation()

void _unRecipeFunctions_resetRecipeActivation ( int  iCode,
string  sRcpInstanceDp,
string  sRcpName,
string  sMessage 
)
private

Reset the recipe activation after an error or a successful activation.

Parameters
iCode- [IN] Error code during the recipe activation.
sRcpInstanceDp- [IN] Datapoint name of the recipe instance being activated.
sRcpName- [IN] Name of the recipe being activated.
sMessage- [IN] Message to display in the log.

◆ _unRecipeFunctions_removeRecipeHeaderBuffers()

void _unRecipeFunctions_removeRecipeHeaderBuffers ( dyn_anytype  daPlcNames)
private

Remove the recipe header buffers associated to the specified PLC names.

Parameters
daPlcNames- [IN] The PLC names which recipe header buffers must be removed.

◆ unRecipeFunctions_unlockRecipeBuffers()

bool unRecipeFunctions_unlockRecipeBuffers ( dyn_anytype  daPlcNames,
dyn_string &  exceptionInfo 
)

Unlock the recipe buffers used during the recipe activation.

Parameters
daPlcNames- [IN] The PLC names which recipe header buffers must be unlocked.
exceptionInfo- [OUT] Standard exception handling variable.
Returns
TRUE if the recipe buffers were successfully unlocked, otherwise false.

◆ _unRecipeFunctions_getElementsByPLC()

int _unRecipeFunctions_getElementsByPLC ( dyn_string  dsElements,
dyn_anytype  dsValues,
mapping &  plcDpes,
dyn_string &  exceptionInfo 
)
private

Get the recipe elements according to the PLC where the elements are located.

Parameters
dsElements- [IN] Recipe data point elements.
dsValues- [IN] Recipe values.
plcDpes- [OUT] Map containing the recipe elements and values for each PLC.
exceptionInfo- [OUT] Standard exception handling variable.

◆ _unRecipeFunctions_getRecipeBuffersName()

bool _unRecipeFunctions_getRecipeBuffersName ( string  plcName,
string &  dpName,
dyn_string &  exceptionInfo 
)
private

Get the recipe buffers DPE name for an specific PLC.

Parameters
plcName- [IN] PLC name.
dpName- [OUT] Name of the DPE where the recipe buffers of the PLC are located.
exceptionInfo- [OUT] Standard exception handling variable.

◆ _unRecipeFunctions_canActivateRecipeInPlcs()

synchronized int _unRecipeFunctions_canActivateRecipeInPlcs ( string  sRcpInstanceDp,
dyn_anytype  dsPlcNames,
dyn_string &  dsBusyPlcs,
dyn_string &  exceptionInfo 
)
private

Check if a recipe can be activated in the specified PLCs. The recipe can't be activated in a PLC if there is other recipe being activated in that PLC (i.e. the recipe buffer is locked).

Parameters
sRcpInstanceDp- [IN] DPE name of the recipe instance.
dsPlcNames- [IN] List of PLC names.
dsBusyPlcs- [OUT] List of busy PLCs.
exceptionInfo- [OUT] Standard exception handling variable.
Returns
Integer < 0 if the recipe can not be activated in the PLCs, otherwise 0

◆ unRecipeFunctions_getRecipeActivationTimeout()

void unRecipeFunctions_getRecipeActivationTimeout ( dyn_anytype  plcNames,
time &  tExpirationTime,
int &  iTimeoutSec,
dyn_string &  exceptionInfo 
)

Get the time when the recipe activation must be cancelled (if the activation wasn't completed).

Parameters
plcNames- [IN] The list of PLC names where the recipe will be activated.
tExpirationTime- [OUT] The time when the recipe activation must be cancelled.
iTimeoutSec- [OUT] Timeout value in seconds.
exceptionInfo- [OUT] Standard exception handling variable.

◆ _unRecipeFunctions_activateRecipeByPLC()

int _unRecipeFunctions_activateRecipeByPLC ( mapping  plcDpes,
string  sRcpInstanceDp,
dyn_string &  exceptionInfo 
)
private

Triggers the recipe activation in all the PLCs containing recipe elements.

Parameters
plcDpes- [IN] DPE name of the PLCs where the recipe must be activated.
sRcpInstanceDp- [IN] DPE name of the recipe instance.
exceptionInfo- [OUT] Standard exception handling variable.

◆ _unRecipeFunctions_createRecipeActivationInfo()

synchronized void _unRecipeFunctions_createRecipeActivationInfo ( dyn_anytype  plcNames,
string  sRcpInstanceDp 
)
private

Creates a matrix containing the necessary information to activate a recipe and stores it in the map unRecipeActivationInfo. Row 1: List of PLCS containing recipe elements. Row 2: List containing the names of the PLCs that are ready to activate the recipe. Row 3: List of PLC names where the recipe has been activated.

◆ _unRecipeFunctions_incrementNumPlcsReadyToActivate()

synchronized bool _unRecipeFunctions_incrementNumPlcsReadyToActivate ( string  sPlcName,
string  sRcpInstanceDp 
)
private

Increment the number of PLCs ready to activate the recipe. When all the PLCs are ready the recipe activation is triggered in all of them.

Parameters
sPlcName- [IN] The name of the PLC ready to activate the recipe.
sRcpInstanceDp- [IN] The data point of the recipe instance to be activated.
Returns
TRUE if all the PLCs containing recipe elements are ready to activate, otherwise FALSE.

◆ _unRecipeFunctions_incrementNumPlcsActivatedRecipe()

synchronized bool _unRecipeFunctions_incrementNumPlcsActivatedRecipe ( string  sPlcName,
string  sRcpInstanceDp 
)
private

Increment the number of PLCs ready to activate the recipe. When all the PLCs are ready the recipe activation is triggered in all of them.

Parameters
sPlcName- [IN] The name of the PLC where the recipe has been activated.
sRcpInstanceDp- [IN] The data point of the recipe instance activated in the PLC.
Returns
TRUE if the recipe has been activated in all the PLCs containing recipe elements, otherwise FALSE.

◆ _unRecipeFunctions_addPlcToRecipeActivationInfo()

synchronized bool _unRecipeFunctions_addPlcToRecipeActivationInfo ( int  index,
string  sPlcName,
string  sRcpInstanceDp 
)
private

Adds the PLC name to the unRecipe_recipeActivationInfo in the index specified as a parameter.

Parameters
index- [IN] Index where to add the PLC name in the recipe activation info matrix.
sPlcName- [IN] The PLC name to add in the recipe activation info matrix.
sRcpInstanceDp- [IN] DPE name of the recipe instance.
Returns
TRUE if the number of PLCs added in the matrix row is equal to the number of PLCs containing recipe elements, otherwise FALSE.

◆ _unRecipeFunctions_waitUntilActivationIsCompleted()

int _unRecipeFunctions_waitUntilActivationIsCompleted ( string  sRcpInstanceDp,
time  tEnd,
dyn_string &  exceptionInfo 
)
private

Wait until the recipe activation is completed or the timeout expires.

Parameters
sRcpInstanceDp- [IN] DPE name of the recipe instance.
tEnd- [IN] Expiration time for the recipe activation.
exceptionInfo- [OUT] Standard exception handling variable.

◆ _unRecipeFunctions_activateRecipe()

bool _unRecipeFunctions_activateRecipe ( string  plcName,
string  plcType,
string  sRcpInstanceDp,
dyn_string  dpes,
dyn_string  values,
dyn_string &  exceptionInfo 
)
private

Activates a recipe in a PLC.

Parameters
plcName- [IN] PLC name.
plcType- [IN] PLC type.
sRcpInstanceDp- [IN] DPE name of the recipe instance.
dpes- [IN] List of recipe DPEs for the PLC.
values- [IN] List of values for the recipe DPEs.
exceptionInfo- [OUT] Standard exception handling variable.
Returns
TRUE if the recipe activation was initiated correctly, otherwise FALSE.

◆ _unRecipeFunctions_sendRecipeHeader()

void _unRecipeFunctions_sendRecipeHeader ( string  sPlcName,
dyn_string &  exceptionInfo,
bool  bWaitForDpSet = TRUE 
)
private

Send the recipe header buffer to the PLC.

Parameters
sPlcName- [IN] PLC Name.
exceptionInfo- [OUT] Standard error handling variable.
bWaitForDpSet- [IN] TRUE if the dp set operation on the recipe buffers must be synchronous, otherwise FALSE.

◆ _unRecipeFunctions_checkRecipeStatusBufferCB()

void _unRecipeFunctions_checkRecipeStatusBufferCB ( string  sRecipeStatusDp,
int  recipeStatus,
string  sRecipeState,
string  sState 
)

Callback function executed during the recipe activation when the recipe status has changed.

Parameters
sRecipeStatusDp- [IN] DP Name of the recipe buffer status.
recipeStatus- [IN] Value of the recipe buffer status.
sRecipeState- [IN] DP Name of the recipe state.
sState- [IN] Value of the recipe state.
Reviewed:
2018-09-12 Callback

◆ _unRecipeFunctions_recipeActivationStatusError()

void _unRecipeFunctions_recipeActivationStatusError ( string  sPlcName,
string  sRecipeStatusDp,
string  sRecipeStateDp 
)
private

Function executed during the recipe activation when the recipe status is in error.

Parameters
sPlcName- [IN] Name of the PLC where the recipe is being activated.
sRecipeStatusDp- [IN] Dp name of the recipe status buffer.
sRecipeStateDp- [IN] Dp name of the recipe state.

◆ _unRecipeFunctions_recipeActivationStatusNewIdReceived()

void _unRecipeFunctions_recipeActivationStatusNewIdReceived ( string  sPlcName,
string  sBuffersDpName,
string  sRcpInstanceDp 
)
private

Function executed during the recipe activation when the PLC confirms that a new recipe activation has been triggered.

Parameters
sPlcName- [IN] Name of the PLC where the recipe is being activated.
sBuffersDpName- [IN] Dp name of the recipe buffers.
sRcpInstanceDp- [IN] Dp name of the recipe instance.

◆ _unRecipeFunctions_recipeActivationStatusCrcOk()

void _unRecipeFunctions_recipeActivationStatusCrcOk ( string  sPlcName,
string  sBuffersDpName,
string  sRcpInstanceDp 
)
private

Function executed during the recipe activation when the PLC confirms that the CRC value is Ok.

Parameters
sPlcName- [IN] Name of the PLC where the recipe is being activated.
sBuffersDpName- [IN] Dp name of the recipe buffers.
sRcpInstanceDp- [IN] Dp name of the recipe instance.

◆ _unRecipeFunctions_recipeActivationStatusDone()

void _unRecipeFunctions_recipeActivationStatusDone ( string  sPlcName,
string  sRecipeStatusDp,
string  sRecipeStateDp,
string  sRcpInstanceDp 
)
private

Function executed during the recipe activation when the PLC confirms that the recipe activation is completed.

Parameters
sPlcName- [IN] Name of the PLC where the recipe is being activated.
sRecipeStatusDp- [IN] Dp name of the recipe status buffer.
sRecipeStateDp- [IN] Dp name of the recipe state.
sRcpInstanceDp- [IN] Dp name of the recipe instance.

◆ _unRecipeFunctions_recipeActivationWrongOnlineValues()

void _unRecipeFunctions_recipeActivationWrongOnlineValues ( string  sErrDpe)
private

Function executed after the recipe activation when the online values are different than the recipe values.

Parameters
sErrDpe- [IN] Dp name of the first recipe element which value doesn't match the PLC online value.

◆ _unRecipeFunctions_recipeActivationUpdateMetaInfo()

void _unRecipeFunctions_recipeActivationUpdateMetaInfo ( dyn_dyn_mixed  recipeObject,
string  sRcpDp 
)
private

Function to update the recipe activation meta-info when the recipe activation was completed successfully.

Parameters
recipeObject- [IN] Recipe object.
sRcpDp- [IN] Datapoint name of the recipe instance.

◆ _unRecipeFunctions_checkRecipeStatusBufferData()

bool _unRecipeFunctions_checkRecipeStatusBufferData ( string  sBuffersDpName,
dyn_string &  exceptionInfo 
)
private

Checks the data in the recipe status buffer to verify:

  • The received data corresponds to the data in the recipe header buffer.
  • The timestamp received is synchronized with the PLC: PVSS Time +/- PLC Delay = received timestamp
Parameters
sBuffersDpName- [IN] DpName of the recipe buffers.
exceptionInfo- [OUT] Standard exception handling variable.

◆ _unRecipeFunctions_cancelRecipeActivation()

void _unRecipeFunctions_cancelRecipeActivation ( string  sPlcName,
string  sBuffersDpName,
string  sRecipeState,
string  sReason,
bool  bDisconnect = true,
bool  bTerminate = false 
)
private

Cancel the activation of a recipe.

Parameters
sPlcName- [IN] Name of the PLC where the recipe is being activated.
sBuffersDpName- [IN] DP Name of the recipe buffers for the specified PLC.
sRecipeState- [IN] Recipe state.
sReason- [IN] Reason for the cancellation.
bDisconnect- [IN] Flag to specify if the dpDisconnect of the recipe status must be done.
bTerminate- [IN] TRUE if the function has been called from a panel termination.

◆ unRecipeFunctions_cancelRecipeActivation()

synchronized void unRecipeFunctions_cancelRecipeActivation ( string  sRecipeDpName,
dyn_string &  exceptionInfo,
string  sReason = "",
bool  bTerminate = FALSE 
)

Cancel the activation of a recipe.

Parameters
sRecipeDpName- [IN] Datapoint name of the recipe which cancellation is requested.
exceptionInfo- [OUT] Standard exception handling variable.
sReason- [IN] String containing the reason of the cancellation.
bTerminate- [IN] TRUE if the function has been called from a panel termination.

◆ _unRecipeFunctions_createBuffersData()

void _unRecipeFunctions_createBuffersData ( string  sPlcName,
dyn_string  dpes,
dyn_string  values,
dyn_string &  exceptionInfo 
)
private

Create the recipe buffer data for a recipe activation.

Parameters
sPlcName- [IN] Name of the PLC where the recipe is about to be activated.
dpes- [IN] Datapoint names of the recipe elements.
values- [IN] Values of the recipe elements.
exceptionInfo- [OUT] Standard exception handling variable.

◆ _unRecipeFunctions_addDigitalParameterToBuffers()

void _unRecipeFunctions_addDigitalParameterToBuffers ( int &  numDevices,
string  sDeviceName,
string  sValue,
dyn_int &  diManRegAddr,
dyn_int &  diManRegVal,
dyn_string &  exceptionInfo 
)
private

Add the address and value of a digital parameter device in the recipe buffers.

Parameters
numDevices- [IN/OUT] Number of digital parameter devices included in the recipe.
sDeviceName- [IN] Device name.
sValue- [IN] Value for the device in the recipe.
diManRegAddr- [OUT] Temporary buffer for the manual register address.
diManRegVal- [OUT] Temporary buffer for the manual register value.
exceptionInfo- [OUT] Standard exception handling variable.

◆ _unRecipeFunctions_addXParameterToBuffers()

void _unRecipeFunctions_addXParameterToBuffers ( int &  numDevices,
string  sDeviceName,
string  sDeviceType,
string  sValue,
int  iArmBit,
int  iNewMrBit,
dyn_int &  diManRegAddr,
dyn_int &  diManRegVal,
dyn_int &  diReqAddr,
dyn_float &  dfReqVal,
dyn_string &  exceptionInfo 
)
private

Add the addresses and values of a word parameter or analog parameter device in the recipe buffers.

Parameters
numDevices- [IN/OUT] Number of digital parameter devices included in the recipe.
sDeviceName- [IN] Device name.
sDeviceType- [IN] Device type.
sValue- [IN] Value for the device in the recipe.
iArmBit- [IN] Position of the 'Armed' bit of the device in the Manual Register.
iNewMrBit- [IN] Position of the 'New Manual Request' bit of the device in the Manual Register.
diManRegAddr- [OUT] Temporary buffer for the manual register address.
diManRegVal- [OUT] Temporary buffer for the manual register value.
diReqAddr- [OUT] Temporary buffer for the requested value address.
dfReqVal- [OUT] Temporary buffer for the requested value.
exceptionInfo- [OUT] Standard exception handling variable.

◆ _unRecipeFunctions_addMultiDpeDeviceToBuffers()

void _unRecipeFunctions_addMultiDpeDeviceToBuffers ( int &  numDevices,
string  sDeviceName,
string  sDpeName,
string  sDeviceType,
string  sValue,
mapping &  deviceMap,
mapping  manRegBitsMap,
int  iArmBit,
dyn_string &  exceptionInfo 
)
private

Add the addresses and values of an analog alarm, controller device, or digital alarm in the recipe buffers.

Parameters
numDevices- [IN/OUT] Number of digital parameter devices included in the recipe.
sDeviceName- [IN] Device name.
sDpeName- [IN] Datapoint element name.
sDeviceType- [IN] Device type.
sValue- [IN] Value for the device in the recipe.
deviceMap- [IN/OUT] Map where key=device name, Value=Matrix: (1,1) -> ManReg Address (1,2) -> ManReg value (2,1) -> Requested address (2,2) -> Requested value
manRegBitsMap- [IN]
iArmBit- [IN] Position of the 'Armed' bit of the device in the Manual Register.
exceptionInfo- [OUT] Standard exception handling variable.

◆ _unRecipeFunctions_fillRecipeHeaderBuffer()

void _unRecipeFunctions_fillRecipeHeaderBuffer ( dyn_int &  recipeHeaderBuffer,
int  iNumDPar,
int  iNumWPar,
int  iNumAPar,
int  iNumAAlarm,
int  iNumPid,
int  iNumDAlarm 
)
private

Fill the contents of the recipe header buffer.

Parameters
recipeHeaderBuffer- [OUT] Recipe header buffer.
iNumDPar- [IN] Number of digital parameter devices included in the recipe.
iNumWPar- [IN] Number of word parameter devices included in the recipe.
iNumAPar- [IN] Number of analog parameter devices included in the recipe.
iNumAAlarm- [IN] Number of analog alarm devices included in the recipe.
iNumPid- [IN] Number of controller devices included in the recipe.
iNumDAlarm- [IN] Number of digital alarm devices included in the recipe.

◆ _unRecipeFunctions_fillRecipeBuffer()

void _unRecipeFunctions_fillRecipeBuffer ( dyn_anytype &  buffer,
dyn_anytype  dparValues,
dyn_anytype  wparValues,
dyn_anytype  aparValues,
dyn_anytype  aalarmValues,
dyn_anytype  pidValues,
dyn_anytype  dalarmValues 
)
private

Fill the contents of a recipe buffer.

Parameters
buffer- [OUT] Buffer where to add the recipe values.
dparValues- [IN] Values of the digital parameter device.
wparValues- [IN] Values of the word parameter device.
aparValues- [IN] Values of the analog parameter device.
aalarmValues- [IN] Values of the analog alarm device.
pidValues- [IN] Values of the controller device.
dalarmValues- [IN] Values of the digital alarm device.

◆ _unRecipeFunctions_sendData()

void _unRecipeFunctions_sendData ( string  plcName,
dyn_string &  exceptionInfo 
)
private

Send the contents of the recipe buffers to a PLC.

Parameters
plcName- [IN] The PLC name.
exceptionInfo- [OUT] Standard exception handling variable.

◆ _unRecipeFunctions_createRecipeHeaderDBNumber()

void _unRecipeFunctions_createRecipeHeaderDBNumber ( string  sPlcName,
dyn_string  dsDpes,
dyn_string &  exceptionInfo 
)
private

Insert the DB number for each recipe device type in the recipe header buffer (Siemens only).

Parameters
sPlcName- [IN] PLC Name.
dsDpes- [IN] List of DPEs of a recipe.
exceptionInfo- [OUT] Standard exception handling variable.

◆ unRecipeFunctions_activateRecipes()

synchronized void unRecipeFunctions_activateRecipes ( dyn_string  dsRcpDps)

Activate a list of recipes. This method must be called from a panel containing a 'RcpTable' with the list of recipes.

Parameters
dsRcpDps- [IN] List of datapoints of the recipes to activate.

◆ _unRecipeFunctions_recipeStateCB()

void _unRecipeFunctions_recipeStateCB ( dyn_string  dsDpList,
dyn_string  dsValues 
)

Callback function executed when the recipe state has been modified.

Parameters
dsDpList- [IN] List of recipe state datapoints.
dsValues- [IN] List of recipe state values.
Reviewed:
2018-09-12 Callback

◆ unRecipeFunctions_checkRecipeStatus()

void unRecipeFunctions_checkRecipeStatus ( dyn_string  dsRcpDps)

Check the status of a list of recipes. This method must be called from a panel containing a 'RcpTable' with the list of recipes.

Parameters
dsRcpDps- [IN] List of datapoints of the recipes to verify its activation.