-
Notifications
You must be signed in to change notification settings - Fork 8
AGENT Emulator.exe.emulatorconfig
PhysicalPortName : The Port mapped to your Bluetooth Serial Port on your desktop computer, change COM5 to COMx where x is specific to your machine.**
SystemClockFrequency : CPU speed is how fast the actual processor clicks, or the amount of bits it can push through per second. The System clock is equivalent to the bus speed, which used to be either 100Mhz or 133Mhz. The emulator is configured to emulate the watch's 120MHz Cortex-M4 processor speed. There are a lot of differences between ARM MCUs and x86/x64 CPUs though, and the emulator has no concept of the latency involved in things like transferring images to the display via SPI. So some things may run faster on the emulator than on an actual watch.
Creating A Custom Emulator: A Step-by-Step Example
<?xml version="1.0" encoding="utf-8" ?>
<Emulator>
<Types>
<Battery>Microsoft.SPOT.Emulator.Battery.BatteryCell</Battery>
<Display>Microsoft.SPOT.Emulator.Lcd.LcdDisplay</Display>
<GpioPort>Microsoft.SPOT.Emulator.Gpio.GpioPort</GpioPort>
<RamManager>Microsoft.SPOT.Emulator.Memory.RamManager</RamManager>
<PhysicalSerialPort>Agent.Emulator.PhysicalSerialPort, "AGENT Emulator"</PhysicalSerialPort>
<TimingServices>Microsoft.SPOT.Emulator.Time.TimingServices</TimingServices>
</Types>
<EmulatorComponents>
<Battery>
<Voltage>4200</Voltage>
<StateOfCharge>100</StateOfCharge> **StateOfCharge indicates battery % Level. 100 for a 100% full battery.**
</Battery>
<Display id="myDisplay">
<Width>128</Width>
<Height>128</Height>
<BitsPerPixel>16</BitsPerPixel>
</Display>
<GpioPort id="Pin_Backlight">
<Pin>0</Pin>
<ModesAllowed>InputPort</ModesAllowed>
<ModesExpected>InputPort</ModesExpected>
<Interrupt>EdgeBoth</Interrupt>
<Resistor>Disabled</Resistor>
</GpioPort>
<GpioPort id="Pin_Mode">
<Pin>1</Pin>
<ModesAllowed>InputPort</ModesAllowed>
<ModesExpected>InputPort</ModesExpected>
<Interrupt>EdgeBoth</Interrupt>
<Resistor>Disabled</Resistor>
<VirtualKey>VK_MENU</VirtualKey>
</GpioPort>
<GpioPort id="Pin_Up">
<Pin>2</Pin>
<ModesAllowed>InputPort</ModesAllowed>
<ModesExpected>InputPort</ModesExpected>
<Interrupt>EdgeBoth</Interrupt>
<Resistor>Disabled</Resistor>
<VirtualKey>VK_UP</VirtualKey>
</GpioPort>
<GpioPort id="Pin_Select">
<Pin>3</Pin>
<ModesAllowed>InputPort</ModesAllowed>
<ModesExpected>InputPort</ModesExpected>
<Interrupt>EdgeBoth</Interrupt>
<Resistor>Disabled</Resistor>
<VirtualKey>VK_SELECT</VirtualKey>
</GpioPort>
<GpioPort id="Pin_Down">
<Pin>4</Pin>
<ModesAllowed>InputPort</ModesAllowed>
<ModesExpected>InputPort</ModesExpected>
<Interrupt>EdgeBoth</Interrupt>
<Resistor>Disabled</Resistor>
<VirtualKey>VK_DOWN</VirtualKey>
</GpioPort>
<RamManager type="RamManager" id="myRamManager">
<Size format="HexNumber">40000</Size>
</RamManager>
<PhysicalSerialPort id="COM1">
<ComPortHandle>Usart1</ComPortHandle>
<PhysicalPortName>COM5</PhysicalPortName> **PhysicalPortName is the Port mapped to your Bluetooth Serial Port on your desktop computer, change COM5 to COMx where x is specific to your machine.**
</PhysicalSerialPort>
<TimingServices>
<SystemClockFrequency>120000000</SystemClockFrequency>
</TimingServices>
</EmulatorComponents>
</Emulator>