View this PageEdit this PageAttachments to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide

SmallDEVS FAQ and Recipes

Q: How to define and use my own traits and prototypes?
  1. 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.
  2. 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').
  3. 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.
  4. 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?
  1. Use SqueakMap and install packages DynamicBindings, KomServices (1.1.1) and REPLServer (Read-Eval-Print Loop Server).
  2. Start server: "REPLServer startOn: portNumber".
  3. Now you can connect to the server and evaluate arbitrary smalltalk commands: "telnet localhost portNumber". For DEVS-related commands see SmallDEVS Kernel API.
  4. 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).
  5. Demonstration Software for remote access to SmallDEVS kernel is available for download.
  6. Another possibility is to use rST package (see allowig to access SmallDEVS kernel objects (see SmallDEVS Kernel API) remotely from another image.


Link to this Page