GunnsDraw Spotter (Empty) - nasa/gunns GitHub Wiki

Background

This is the default shape for a Spotter object in a GUNNS network. It lets you define the type of spotter object to instantiate in the network, as well as configure the instance.

Whereas the spotter classes inside GUNNS already have their own GunnsDraw shapes in the GUNNS_Spotters.xml shape library, this empty shape is meant to be used with any spotter class, including your own project-specific spotters that exist outside the gunns/ repository.

How To Use In GunnsDraw

Just like with Links, place a Spotter inside the Network container and then name it by selecting it and typing its name.

Rules

  • The name must be a valid C variable name and unique among all objects in the network.

Shape Data Parameters:

Edit the shape data parameters by right-clicking on the spotter and selecting Edit Data…

  • Class (default = blank, must not be blank): This is the path and filename of the header file of the Spotter class you wish to instantiate, minus the file extension. The path is relative to whatever code include paths you need (such as ${TRICK_CFLAGS} for Trick sims). For instance to instantiate a GunnsFluidIslandAnalyzer in a Trick sim that includes the gunns/ folder in its ${TRICK_CFLAGS}, this field would be: core/GunnsFluidIslandAnalyzer.
  • ConstructorArgs (default = blank): This lists the arguments to the constructor of the spotter instance. These will usually be references to other objects inside the network or its config & input data objects. This varies by spotter type, so refer to the spotter source code. For a spotter class with no constructor arguments, leave this field blank. For example, for a GunnsElectResistiveUserLoad spotter named PowerLoad, this field would be: &netConfig.PowerLoad, &netInput.PowerLoad.

Configuration Data Parameters:

These vary by the spotter type, so refer to the source code for the spotter you are instantiating. You will use Draw.io’s Edit Data utility to insert these data fields as needed:

  • Enter a new config data field name in the ‘Enter Property Name’ box, and then click the ‘Add Property’ button:
    • You must follow the c## numbering scheme, so prepend these with c00._, c01., c02., like shown below.

Input Data Parameters:

These are the same as your configuration data but are prepended with i##, like shown above.

Common Problems

  • N/A.

References

  • N/A
⚠️ **GitHub.com Fallback** ⚠️