Package ist.palcom.services.echo

Provides an almost minimal example of a PalCom device with one service, intended as a starting point when writing a small palpable device.

See:
          Description

Class Summary
EchoDevice EchoDevice is an AbstractDevice with an EchoService.
EchoDeviceGUI EchoDeviceGUI is a GUI for a simulated EchoDevice.
EchoService EchoService is a service that sends out values received in in-commands directly in out-commands.
 

Package ist.palcom.services.echo Description

Provides an almost minimal example of a PalCom device with one service, intended as a starting point when writing a small palpable device. The service echoes incoming commands back.

Package Specification

This package contains an example of a very simple PalCom device EchoDevice, implemented using the device framework in ist.palcom.device. The device provides one service EchoService, which is implemented using the service framework in ist.palcom.services. There is also a simulated device EchoDeviceGUI which runs the device code and shows a small Swing window representing the device "hardware".

The code in the echo device can be used as a starting point when writing a small palpable device.

EchoDevice

Figure 1 shows an overview of the classes used with EchoDevice.


Figure 1 EchoDevice and the classes it uses.

The EchoDevice class extends AbstractDevice.

The main method of EchoDevice could be the main method on a small palpable device. It creates an EchoDevice object and runs it:

public static void main(String[] args) {
  EchoDevice device = new EchoDevice(new URN("urn:palcom://echodevice"));
  device.setName("EchoDevice");
  device.run();
}    

EchoService

EchoService extends AbstractService and provides a service that is described by a service description.

EchoDeviceGUI

EchoDeviceGUI is a simplified example of a simulated device, with no real user interaction. It just serves as a starting point. Figure 2 shows an overview of the classes used with EchoDeviceGUI.


Figure 2 EchoDeviceGUI and the classes it uses.

The main method uses AbstractDeviceFactory for starting the simulated device.

See Also:
ist.palcom.device, ist.palcom.services, ist.palcom.simulated.device, ist.palcom.simulated.device.factory