I just broke the simulator, again.
This is the code:
print #1 "before offending statement"
Get_IPAddr 1
print #1 "after offending statement"
[/font][/color]
The Get_IPAddr 1 hangs the simulator and the second print #1 statement never executes. I assume that the implementation of Get_IPAddr crashed Java.
Get_SubNet, Get_Gateway, Get_SMTP and Get_DNS crash the simulator, also.
I didn't try the Set_xxxx statements to see if they crash the simulator.
The work around is to set a RELAY when running in simulation. In the custom functions that have these types of statements, test to see if this RELAY is set and then don't attempt to execute the offending statements.
print #1 "before offending statement"
if !TestIO(Simulation) ' Execute the following ONLY if not running in simulation.
Get_IPAddr 1
endif
print #1 "after offending statement"
[/font][/color]
I think that a possible workaround for simulation is to use the status(5) function. On physical hardware, this function returns a non-zero value related to firmware revision. On the simulator it returns 0. I can use this fact to conditionally skip code that breaks the simulator.
It would still be nice if the Get_xxxx stuff didn't break the simulator.
Gary D.