PointDeviceExt Framework

Overview

The javax.baja.driver.point API is used to perform point IO with logical or physical control points. Drivers use the standard control points found in the control module. But each driver provides a specialization of BProxyExt for driver specific addressing, tuning, and IO.

Refer to Architecture - Driver Hierarchy for an illustration of the component slot hierarchy.

Refer to Architecture - ProxyExt for an illustration of the design.

Point Modes

There are three modes which a proxy point may operate in:

A ProxyExt must indicate which mode it is operating by overriding the getMode() method

.

Proxy Ext

The ProxyExt component contains two properties used for managing read and write values.

The readValue property indicates the last value read from the device. For writeonly points this is the last value successfully written. This value is used to feed the parent point's extensions and out property. If numeric, it is in device units.

The writeValue property stores the value currently desired to be written to the device. If numeric, it is in device units.

Framework to Driver Callbacks

Driver developers have three callbacks which should be used to manage reads and writes:

Note: All three callbacks should be handled quickly and should never perform IO on the callers thread. Instead drivers should use queues and asynchronous threads to perform the actual IO.

Driver to Framework Callbacks

The ProxyExt contains a standard API which the driver should call once a read or write operation has been attempted.

If a read operation completes successfully then readOk() method should be called with the value read. If the read fails then call the readFail() method.

If a write operation completes successfully then the writeOk() method should be called with the value written. If the write fails for any reason then call writeFail().

Tuning

All ProxyExts contain a Tuning property that manages how read and writes are tuned. All drivers which implement proxy points should create a "tuningPolicies" property of type TuningPolicyMap on their DeviceNetwork. The Tuning structure on each ProxyExt identifies its TuningPolicy within the network by slot name. TuningPolicies allow users to configure which state transitions result in a write() callback. TuningPolicies may also be used to setup a minWriteTime to throttle writes and a maxWriteTime to do rewrites.

Utilities

The driver framework provides a suite of APIs to aid developers in building their drivers: