|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||
See:
Description
| Interface Summary | |
|---|---|
| DeviceContext | Implemented DeviceContext's keeps name and address information about the device. |
| IDeviceIO | Interface specifying the I/O interface between the (simulated) hardware and the palcom device/service code. |
| OutEventListener | |
| Service | |
| Class Summary | |
|---|---|
| AbstractDevice | The base class of a PalCom device. |
| AbstractDeviceContext | |
| AbstractUDPDevice | An AbstractDevice that uses UDP. |
| DeviceIO | This class implements the sending of I/O events between the "hardware" and "Palcom" domains. |
| EventChannel | EventChannel is a Channel that can be used from Java
threads for sending PalcomEvents to PalcomThreads in a safe way (doing
operations such as putEvent directly on a PalcomThread from a Java thread is
not safe, because the PalComScheduler is not aware of the Java threads). |
| EventChannelThread | EventChannelThread is a PalcomThread that handles an EventChannel. |
| FullXMLFactory | |
| GenericDevice | Generic simple device primarily for testing purposes. |
| HLRemoteConnectHelper | A helper class to provide a blocking method for requesting remote connections. |
| RemoteConnect | |
| RemoteConnectHelper | A helper class to provide a blocking method for requesting remote connections. |
| RemoteConnectManager | |
| RemoteDisconnect | |
| Request | |
| UDPDeviceContext | |
Provides a PalCom device framework.
When executing, services and assemblies are deployed onto devices. For giving a service access to other services on the device with which it may cooperate, and to device-common middleware managers, the PalCom infrastructure contains a device framework. The device framework provides points for initialization and termination of services and managers on a device.
The device framework is written in Java, compatible with Pal-J,
which means that it can execute on both the Pal-VM and the
JVM. There is a class AbstractDevice,
which is subclassed for implementing a concrete PalCom device. An
example:
class MyDevice extends AbstractDevice {
protected void initDevice() {
MyService service = new MyService(context);
context.addService(service);
service.start();
}
}
References to managers and services on the device are provided in a
DeviceContext object. In the
initDevice method above, a service is created, added to
the device context, and started. The initDevice method
is called by the framework for initializing a device.
In a main method, or a similar entry point of code
running on the device, an AbstractDevice
object is created and its run method is called:
public static void main(String[] args) {
new MyDevice().run();
}
The run method starts a PalcomScheduler and schedules the device's
managers and services in PalcomThreads. When all threads have run
to completion (which means that the device shuts down in a
controlled way), the run method returns.
For communication with the hardware on a device, there is an
interface DeviceIO, which supports
event-based communication with lower-level processes such as
interrupt routines.
The device framework is connected to the service framework
in ist.palcom.services. See ist.palcom.services.echo
for an example of the usage of the device and service frameworks,
with figures illustrating the relations between the classes, and
with explanations of what methods need to be overridden etc.
ist.palcom.services,
ist.palcom.simulated.device
|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||