SmallDEVS FAQ and Recipes
Q: How to define and use my own traits and prototypes?
A:
- Make a new folder under DEVSTraitsAndPrototypes. Do not add traits and prototypes direcly to DEVSTraitsAndPrototypes. Otherwise it would be very problematic to export/import your traits or prototypes as one package.
- Add a new "prototype or trait object" - it will be your trait object. Open it and edit it using prototpe object inspector. It is recoomended to let it inherit the default atomic devs trait (set delegate to MyRepository at: '/DEVSTraitsAndPrototypes/AtomicDEVSDefaultTrait').
- Add a new or paste a copy of an existing atomic DEVS - it will be our prototype devs. Edit it, don't forget to replace its default delegate by your trait object.
- To avoid potential problems with traits serializatin/deserialization in the current version of SmallDEVS, don't move nor rename traits, including folders containing them (there are no fatal problems but there can appear unwanted duplicities due to badly resolved object equivalence). If you realy need to rename or move a trait to another folder, you can do it, but you have to redefine delegate in all objects delegating to the trait (remove delegate and add it again). It is a consequeance of early stage of the development of object sharing and import/export subsystems in SmallDEVS. To make sure everything is allright, do for every atomic DEVS: Open a delegate and evaluate "self pathname". If it has a nonempty pathname, it is ok.
Q: How to use SmallDEVS as a remote simulation server?
A:
- Use SqueakMap and install packages DynamicBindings, KomServices (1.1.1) and REPLServer (Read-Eval-Print Loop Server).
- Start server: "REPLServer startOn: portNumber".
- Now you can connect to the server and evaluate arbitrary smalltalk commands: "telnet localhost portNumber". For DEVS-related commands see SmallDEVS Kernel API.
- You can start SmallDEVS without GUI using -headless option and communicate with it using telnet or netcat (see SmallDEVS Kernel API to learn how to use SmallDEVS kernel).
- Demonstration Software for remote access to SmallDEVS kernel is available for download.
- Another possibility is to use rST package (see SqueakSource.com) allowig to access SmallDEVS kernel objects (see SmallDEVS Kernel API) remotely from another image.
Link to this Page
- SmallDEVS last edited on 9 April 2012 at 5:44 pm by ip81-19-5-83.netdatacomm.cz