Emotion,
SimulANT+ scripts are oriented towards controlling one simulated device at a time. That being said, it is possible to script multiple devices in a single python script run through SimulANT+, as well as creating a .NET simulation application.
If you are trying to simulate multiple devices in the same program and are familiar with .NET, I would suggest writing your own .NET application (instead of using python), using the
Windows Library Demo as a guide, but using profiles from ANT+Profiles.dll to specify the function of an acquired channel as shown below. Just like with python, you can write delegates for exposed events. Writing code on the native platform will give you a lot more control over your simulation, and it will be a lot easier to debug than using a python script.
The other option is to write a python script that uses ANT_NET.dll to access an ANT device, create a channel, and hook up a profile to it. To use this approach, you will require additional ANT USB sticks. Since the ironpython scripts are built on top of the .NET framework, I would again use the code in
Windows Library Demo as a guide. Just remember to add the following lines to the top of your script:
clr.AddReference('ANT+ProfileLib')
clr.AddReference('ANT_NET.dll')
from ANT_Managed_Library import ANT_Device, ANT_Channel, IANT_Channel, ANT_ReferenceLibrary
One thing to note about the python script approach is that the additional devices created will not have their own simulANT+ UI, and will only work in the background.
Using either platform, after you have acquired a channel, call the constructor of the profile you would like to simulate, and then turn the sensor on:
// get ANT_Device
// channel = get ANT_Channel
HeartRateSensor sensor = new HeartRateSensor(channel, network);
// define delegates
// change parameters
sensor.TurnOn();
// log data
sensor.TurnOff();
// release ANT_Device
Neither approach is trivial.