antmicro / pyrenode3

Apache License 2.0
20 stars 6 forks source link

include cs file #14

Open vChavezB opened 1 week ago

vChavezB commented 1 week ago

I havent been able to replicate the command include in python.

e.g.,:

include $ORIGIN/my_peripheral.cs

what is the correct pyrenode3 syntax for this?

vChavezB commented 1 week ago

What I ended doing is

m = Monitor()
res = m.Parse("include @/my_file.cs")
sean-anderson-seco commented 1 week ago

monitor.execute_script("include @/my_file.cs")?

vChavezB commented 1 week ago

Did not work. I think that is just for python scripts.

https://github.com/antmicro/pyrenode3/blob/39bfeb6f78d83f39b7316dc0bce5e2f84299c3be/src/pyrenode3/wrappers/monitor.py#L52-L55

Which then calls the C# equivalent :

https://github.com/renode/renode-infrastructure/blob/f97a79fc41999a6960ac3d9eb1df5feed54d1fec/src/Emulator/Extensions/UserInterface/Monitor.cs#L613-L615