Applicable Versions
NetSim Standard 
NetSim Pro 


Applicable Releases
v9v10v11v12v13


The range for the parameters is usually defined in the standard. If values are set beyond the prescribed range, then the protocol working may exhibit unpredictable behavior. 


That said, if you want to force this, code modification (highlighted in red) is to be done in the init function of 802_15_4.c as shown below for the parameter MacMinBE -


_declspec (dllexport) int fn_NetSim_Zigbee_Init(struct stru_NetSim_Network *NETWORK_Formal,\

 NetSim_EVENTDETAILS *pstruEventDetails_Formal,char *pszAppPath_Formal,\

 char *pszWritePath_Formal,int nVersion_Type,void **fnPointer)

{

 NETSIM_ID i;

 pstruEventDetails=pstruEventDetails_Formal;

 NETWORK=NETWORK_Formal;

 pszAppPath =pszAppPath_Formal;

 pszIOPath = pszWritePath_Formal;


 //Added code .... to set the Max Backoff exponent for a sensor of device id 17

 i=fn_NetSim_GetDeviceIdByConfigId(17);

 WSN_MAC(i)->nMacMinBE=20;


 fn_NetSim_Zigbee_Init_F(NETWORK_Formal,pstruEventDetails_Formal,pszAppPath_Formal,\

 pszWritePath_Formal,nVersion_Type,fnPointer);

 return 0;

}


Note:

From NetSim v12 onwards, if the user encounters the following error pop-up with message Schema error, click on "proceed" to continue the simulation

    

Related articles:

how-to-obtain-custom-metrics-in-netsim-results-window-

how-to-add-new-parameters-to-existing-protocols-in-netsim-