avrora
Class Defaults

java.lang.Object
  extended byavrora.Defaults

public class Defaults
extends java.lang.Object

The Defaults class contains the default mappings for microcontrollers, actions, input formats, constants, etc.


Nested Class Summary
static class Defaults.AutoProgramReader
           
 
Constructor Summary
Defaults()
           
 
Method Summary
static void addMainCategory(HelpCategory cat)
           
static Action getAction(java.lang.String s)
          The getAction() method gets the action corresponding to the given name represented as a string.
static java.util.List getActionList()
          The getActionList() method returns a list of aliases for actions sorted alphabetically.
static java.util.List getAllCategories()
           
static HelpCategory getHelpCategory(java.lang.String name)
           
static InterpreterFactory getInterpreterFactory()
           
static java.util.List getMainCategories()
           
static MicrocontrollerFactory getMicrocontroller(java.lang.String s)
          The getMicrocontroller() method gets the microcontroller factory corresponding to the given name represented as a string.
static MonitorFactory getMonitor(java.lang.String s)
          The getMonitor() method gets the monitor corresponding to the given name represented as a string.
static PlatformFactory getPlatform(java.lang.String s)
          The getPlatform() method gets the platform factory corresponding to the given name represented as a string.
static ProgramReader getProgramReader(java.lang.String s)
          The getProgramReader() method gets the program reader corresponding to the given name represented as a string.
static java.util.List getProgramReaderList()
          The getProgramReaderList() method returns a list of aliases for program readers sorted alphabetically.
static Simulation getSimulation(java.lang.String s)
           
static TestHarness getTestHarness(java.lang.String s)
          The getTestHarness() method gets the test harness class corresponding to the given name represented as a string.
static Simulator newSimulator(int id, Program p)
           
static Simulator newSimulator(int id, java.lang.String mcu, long hz, long exthz, InterpreterFactory factory, Program p)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Defaults

public Defaults()
Method Detail

getMicrocontroller

public static MicrocontrollerFactory getMicrocontroller(java.lang.String s)
The getMicrocontroller() method gets the microcontroller factory corresponding to the given name represented as a string. This string can represent a short name for the class (an alias), or a fully qualified Java class name.

Parameters:
s - the name of the microcontroller as string; a class name or an alias such as "atmega128"
Returns:
an instance of the MicrocontrollerFactory interface that is capable of creating repeated instances of the microcontroller.

getPlatform

public static PlatformFactory getPlatform(java.lang.String s)
The getPlatform() method gets the platform factory corresponding to the given name represented as a string. This string can represent a short name for the class (an alias), or a fully qualified Java class name.

Parameters:
s - the name of the platform as string; a class name or an alias such as "mica2"
Returns:
an instance of the PlatformFactory interface that is capable of creating repeated instances of the microcontroller.

getProgramReader

public static ProgramReader getProgramReader(java.lang.String s)
The getProgramReader() method gets the program reader corresponding to the given name represented as a string. This string can represent a short name for the class (an alias), or a fully qualified Java class name.

Parameters:
s - the name of the program reader format as a string
Returns:
an instance of the ProgramReader class that is capable of reading a program into the internal program representation format.

getAction

public static Action getAction(java.lang.String s)
The getAction() method gets the action corresponding to the given name represented as a string. This string can represent a short name for the class (an alias), or a fully qualified Java class name.

Parameters:
s - the name of the action as a string
Returns:
an instance of the Action class which can run given the command line arguments and options provided.

getMonitor

public static MonitorFactory getMonitor(java.lang.String s)
The getMonitor() method gets the monitor corresponding to the given name represented as a string. This string can represent a short name for the class (an alias), or a fully qualified Java class name.

Parameters:
s - the name of the monitor as a string
Returns:
an instance of the MonitorFactory class that is capable of attaching monitors to nodes as they are created

getSimulation

public static Simulation getSimulation(java.lang.String s)

getTestHarness

public static TestHarness getTestHarness(java.lang.String s)
The getTestHarness() method gets the test harness class corresponding to the given name represented as a string. This string can represent a short name for the class (an alias), or a fully qualified Java class name.

Parameters:
s - the name of the test harness as a string
Returns:
an instance of the TestHarness class that is capable of creating a test case for a file and running it

getActionList

public static java.util.List getActionList()
The getActionList() method returns a list of aliases for actions sorted alphabetically.

Returns:
a sorted list of known actions

getProgramReaderList

public static java.util.List getProgramReaderList()
The getProgramReaderList() method returns a list of aliases for program readers sorted alphabetically.

Returns:
a sorted list of known program readers

addMainCategory

public static void addMainCategory(HelpCategory cat)

getHelpCategory

public static HelpCategory getHelpCategory(java.lang.String name)

getMainCategories

public static java.util.List getMainCategories()

getAllCategories

public static java.util.List getAllCategories()

newSimulator

public static Simulator newSimulator(int id,
                                     Program p)

getInterpreterFactory

public static InterpreterFactory getInterpreterFactory()

newSimulator

public static Simulator newSimulator(int id,
                                     java.lang.String mcu,
                                     long hz,
                                     long exthz,
                                     InterpreterFactory factory,
                                     Program p)