Package org.jmacs.pd

Programmable Device Framework.


Interface Summary
Alert passed to IProgram.wake(Alert).
Constants passed to the constructors of the IMonitorGui and IControlsGui used by Pdi in order that any corr'ding GUIs provided by the device may be nested inside them.
Context context.
Device.IConstants constants.
Device.IDriver driver.
Device.IDriver.IContainer driver container.
Device.IStatus status.
Device.IStatus.IFactory produces status.
IInterpreter command interpreter.
IInterpreter.Context context, as passed to IInterpreter.interpretCmd(Serializable, Context, boolean).
IPdCmd for use where a String may not be used, because the command cannot conveniently be expressed as text.
IPdCmd.Context context, as passed to IPdCmd.execute(Context).
IProgram to be implemented by all programs.
IProgram.Context context, as passed to IProgram.init(Context).
IProgram.States program states.
ProgInfo information about any IProgram a Device is running or has run.

Class Summary
Device programmable device.
Device.Proxy to be extended by the class ~.mydevice.MyDevice, as part of a programmable-device definition.
Pdi IDi for the deployment of programmable devices.
StartProgram immutable command to start the specified program.
Status_ProgInfo passed to the IMonitorGui.refresh(Object) method of the monitor window used by Pdi.

Package org.jmacs.pd Description

Programmable Device Framework. This is of interest to anyone wishing to define, implement or deploy a 'programmable device', which is an actual device type (e.g. steerable antenna), having its own API (which might be to some degree abstract), and able to run IPrograms.

Defining a programmable device involves writing at least the following:

Any implementation-specific constants should be defined using a nested interface, ~.mydevice.MyDevice.IConstants, extending Serializable.

Any status should be defined using a nested interface, ~.mydevice.MyDevice.IStatus, extending Serializable.

Any command interpreter must implement IInterpreter, and be named ~.mydevice.Interpreter.

Any monitor window (implementing IMonitorGui) or control panel (implementing IControlsGui) must be named ~.mydevice.MonitorGui or ~.mydevice.ControlsGui, respectively.

Implementations of the Device.IDriver, Device.IDriver.IContainer or Device.IStatus.IFactory are conventionally named ~.mydevice.MyDeviceDriver, ~.mydevice.MyDeviceContainer or ~.mydevice.MyDeviceStatusFactory, respectively.

To deploy a programmable device, use a Pdi.

To write a program for it, implement IProgram. This should have a final instance field of type Class, to which should be assigned the class, ~.mydevice.MyDevice, above: this will result in an InvalidClassException being thrown if the program is deemed incompatible (see above).

Please visit for examples.