PreviousNext
MenuActivated
Help > Custom DPA Handler > Events > MenuActivated

This event is raised only at TR-7xG [N] when Online, ReadyToBond or StandBy DPA Menus are about to be activated. The userReg1 variable at the entry is the menu to be activated (DMENU_Online,  DMENU_ReadyToBond or DMENU_StandBy). On exit userReg1 variable must contain flags for enabling or disabling the implementation of the optional menu items (or 0, if the menu is not customized). See DpaApiMenu parameter flags for details. The event must return TRUE to be processed, otherwise, the menu is not customized.

 

Also the fields _DpaMessage.PerNodeGetDpaMenuInfo_Response.User[1 or 2]Name might be filled with the zero-terminated names of the DPA Menu custom items. The field FlagsExt in the same structure can be assigned to DMENU_Ext_Item_Unimplemented_Reset. The structure _DpaMessage.PerNodeGetDpaMenuInfo_Response is reset before the event is raised.

 

The event may return FALSE, and userReg1 = DMENU_Ext_DoNotOpen to disable opening the menu at all.

 

Example

 

case DpaEvent_MenuActivated:

  switch ( userReg1 )

  {

    case DMENU_Online:

if ( PeripheralRam[0] )

{

  userReg1 = DMENU_Ext_DoNotOpen;

         return FALSE;

}

 

      _DpaMessage.PerNodeGetDpaMenuInfo_Response.User1Name[0] = 'U';

      _DpaMessage.PerNodeGetDpaMenuInfo_Response.User1Name[1] = 's';

      _DpaMessage.PerNodeGetDpaMenuInfo_Response.User1Name[2] = 'e';

      _DpaMessage.PerNodeGetDpaMenuInfo_Response.User1Name[3] = 'r';

      _DpaMessage.PerNodeGetDpaMenuInfo_Response.User1Name[4] = '1 ';

      userReg1 = DMENU_Item_Implemented_GoBeaming | DMENU_Item_Implemented_User1;

      return TRUE;

 

    case DMENU_ReadyToBond:

      _DpaMessage.PerNodeGetDpaMenuInfo_Response.FlagsExt =

        DMENU_Ext_Item_Unimplemented_Reset;

      userReg1 = DMENU_Item_Unimplemented_UnbondFactorySettingsAndRestart;

      return TRUE;

  }

 

return FALSE;

 

See example CustomDpaHandler-DpaMenu for more details.