Master functions are the functions that modify/overload the functionality of the other functions. They are characterized by the text "Master" in the function's name.
They are divided into two groups:

  • Set - sets and cancels the overloading/modification
  • Get - gets the current status of overloading

The functions for the setting - %HI_Set...Master... - use the method of overloading + disabling the feature and cancel the overloading. They disable access to the objects or their parts, without affecting the operation of the script which controls the behaviour of objects. The previous, overloaded functions work as if they were not overloaded. Also when they get the object statuses, they receive the values as if the objects were not overloaded.
For example: The visible object became hidden by using the %HI_SetMasterVisible function, but the %HI_GetVisible function gets the information that the object is visible.

The functions %HI_Get...Master... get the current status of the overloaded object that has been set by %HI_Set...Master... functions.

In this table below you can see the behaving of the objects when using the functions %HI_SetMasterVisible, %HI_GetMasterVisible, %HI_SetVisible, %HI_GetVisible.

%HI_SetMasterVisible / %HI_GetMasterVisible%HI_SetVisible / %HI_GetVisibleVisibility
True / TrueTrue / TrueThe object is visible.
True / TrueFalse / FalseThe object is hidden.
False / FalseTrue / TrueThe object is hidden.
False / FalseFalse / FalseThe object is hidden.

The behaving of the Master functions is configured to allow easy adjusting of the debugged scripts to the change of external conditions, e.g. the change of user and disabling some of the activities.


Example of use

The picture contains a button to switch to the history of the picture. The function  %HI_SetEnable enables you to press this button. Other users, whose access to the history is disabled, log on to the D2000 HI. The usage of this button is disabled by the %HI_SetMasterEnable function for this user (%HI_SetEnable is overloaded by %HI_SetMasterEnable). After the user with the right to use this button has logged on to the application, he may use the functionality as defined by %HI_SetEnable. During blocking, %HI_GetEnable returns the value for the object as if it would not be disabled by %HI_SetMasterEnable. The overloading method does not influence the behavior that has been configured in the script and therefore this feature can be easily implemented to the previous scripts.

 ENTRY OnLogOn(IN TEXT _userName, IN BOOL _bLogOn)
  IF _userName="Operator1" THEN
 
   ; Operator1 cannot see the history
   %HI_SetMasterEnable(_BtnStartHistorie,@FALSE)
  ELSIF ! _bLogOn THEN
 
   ; the access to history is disabled if no one is logged on
   %HI_SetMasterEnable(_BtnStartHistorie,@FALSE)
  ELSE
 
   ; the access to history is not disabled by Master function
   %HI_SetMasterEnable(_BtnStartHistorie,@TRUE)
  ENDIF
 END OnLogOn 

List of Master functions and overloaded functions


Napíšte komentár