Monitoring and Control System (MaCS) 1.2r1

Last updated: 2011-Jun-15

This is a complete rewrite of JMaCS in Scala, and has the following advantages where programmable devices (PDs) are concerned:

Please see,

and the MaCS API (scaladoc) documentation for further details.

How to get started defining your own PDs

The following instructions are for creating an instant Maven project defining an example PD - a steerable antenna, as featured in the paper referred to above.

It will be assumed that you already have (at least version 5 of) the Java runtime environment (JRE) installed, together with an up-to-date version of Maven. This may be ascertained as follows:

$ mvn -version
Apache Maven 2.2.1 (r801777; 2009-08-06 20:16:01+0100)
Java version: 1.6.0_15
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x" version: "10.6" arch: "i386" Family: "mac"
Note that all resources required for compiling Scala code using Maven will be downloaded on demand.

  1. Tell Maven to prompt you for parameter values when creating new projects, by adding the following to your settings:
    <interactiveMode>true</interactiveMode>
  2. Add the following entry to your ~/.m2/archetype-catalog.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <archetype-catalog>
      <archetypes>
        ...
        <archetype>
          <groupId>com.lafros.maven.archetypes</groupId>
          <artifactId>macspd-archetype</artifactId>
          <version>1.2</version>
          <repository>http://lafros.com/m2arts</repository>
          <description>Lafros MaCS PD archetype</description>
        </archetype>
      </archetypes>
    </archetype-catalog>
  3. Create a new Maven project using the above catalogue entry, as follows:
    $ mvn archetype:generate -DarchetypeCatalog=local
    Supply the following or appropriate values when prompted:
    Choose archetype:
    1: local -> macspd-archetype (Lafros MaCS PD archetype)
    Choose a number:  (1): 1
    Define value for groupId: : org.myorg.macspd
    Define value for artifactId: : myorg-macspd
    Define value for version:  1.0-SNAPSHOT: :
    Define value for package:  org.myorg.macspd: :
  4. Build the .jar files for the project's supplied example PD, simulator, and program, and install them in your local repository:
    $ cd myorg-macspd
    $ mvn install
  5. Now make changes to the example, and observe their effects. Use the example PD definition, simulator and program as templates for your own creations.

To stay up to date and share your experiences, please join the Lafros MaCS Google group.

Downloads

lafros-macs-core-1.2r1.jar
lafros-macs-pd-1.1r2.jar
lafros-macs-test-1.1r1.jar
lafros-maven-scalatest-1.1r1.jar

Change log

2011-Jun-15:links to Scala Days 2011 paper and slides, EIW14 poster slides added
2010-Oct-05:missing <repository> element added in step 2. of 'How to get started' instructions!
2010-Jan-21:lafros-macs-core-1.2r1: ControlsGuis must now supply a partial function, cmd (that returns the command to be submitted in response to a particular event), rather than an init method; JGui dropped;
lafros-macs-test-1.1r1: guiDisplayer: displayGui replaces displayControls, displayMonitor; GUI dialogues enhanced;
lafros-maven-scalatest-1.1r1: GuiSupport: displayGui may now be supplied with a MenuBar
~
2009-Oct-10:lafros-macs-core-1.1r1: Di.states renamed Di.State, and elements now capitalised; ~.macs.test.FunSuite moved to ~.maven.scalatest; ~.macs.test moved to separate module; '-core' appended to Maven artifactId
lafros-macs-pd-1.1r1:_AnyPd, together with other ancillary classes, moved to pd.an; program.states renamed program.State, and elements now capitalised; cmds.StartProgram now a case class