Package fr.esrf.tangoatk.core

This package contains the model part of TangoATK.

See:
          Description

Interface Summary
IAttribute IAttribute is the top interface for all attributes.
IAttributeScalarHistory  
IAttributeStateListener  
IBooleanImage  
IBooleanImageListener  
IBooleanScalar  
IBooleanScalarListener  
IBooleanSpectrum  
IBooleanSpectrumListener  
ICommand ICommand is the interface that defines a command.
ICommandGroup ICommandGroup is the interface that defines a commandGroup.
IDevice  
IDeviceApplication  
IDeviceListener  
IDevStateScalar  
IDevStateScalarListener  
IDevStateSpectrum  
IDevStateSpectrumListener  
IEndGroupExecutionListener IEndGroupExecutionListener defines the behaviour of an object that listens to the end of the execution of a group of commands.
IEntity IEntity is the basic, uh, entity in TangoATK.
IEntityCollection  
IEntityFilter IEntityFilter
IEntityList  
IEnumScalar  
IEnumScalarListener  
IErrorHandler  
IErrorListener  
IFactory  
IImageListener  
ILogListener  
INumber  
INumberImage  
INumberScalar  
INumberScalarHistory  
INumberScalarListener  
INumberSpectrum  
IRawImage  
IRawImageListener  
IRefreshee The interface IRefreshee has one method IRefreshee.refresh() which is called by someone whenever it is time for the refreshee to refresh its listeners.
IRefresherListener The interface IRefresherListener has one method IRefresherListener.refreshStep() which is called by the refresher after all models belonging to a list are updated.
IResultListener IResultListener defines the behaviour of an object that listens to results from commands.
IScalarAttribute  
ISetErrorListener  
ISpectrumListener  
IStateListener  
IStatusListener  
IString  
IStringImage  
IStringImageListener  
IStringScalar  
IStringScalarHistory  
IStringScalarListener  
IStringSpectrum  
IStringSpectrumListener  
 

Class Summary
AEntityFactory AEntityFactory keeps all the code that is common for the AttributeFactory and the CommandFactory.
AEntityList  
AEntityProperty  
ATKEvent  
AtkEventListenerList A class to handle AtkEventList.
AttributeList  
AttributePolledList A class to force the usage of client side polling (ATK refreshser) (Ingore events)
AttributeStateEvent  
BooleanImageEvent  
BooleanScalarEvent  
BooleanSpectrumEvent  
CommandGroup The CommandGroup contains only the commands with no input and no output argument : they are all "VoidVoidCommand"s.
CommandList The CommandList keeps all the commands we're working with.
Device An object that maps to a Tango Device.
DeviceFactory  
DeviceItem  
DeviceProperty DeviceProperty is a class which is responsible for holding information about a given property of a given Device.
DevStateScalarEvent  
DevStateSpectrumEvent  
DisplayLevelProperty  
EndGroupExecutionEvent  
EnumScalarEvent  
ErrorEvent  
ErrorHandlerAdapter  
EventSupport EventSupport handles the event-generating of the core part in ATK.
FormatProperty  
NumberImageEvent  
NumberProperty  
NumberScalarEvent  
NumberSpectrumEvent  
Property Property is a class which responsible for holding information about a given Property of a given IEntity.
PropertyStorage  
RawImageEvent  
Refresher ARefresher is used as a base class to implement refreshers of IRefreshees.
ResultEvent  
StateEvent  
StatusEvent  
StringImageEvent  
StringProperty  
StringScalarEvent  
StringSpectrumEvent  
TypeProperty  
WritableProperty  
 

Exception Summary
ATKException A base class to handle error in ATK.
AttributeReadException  
AttributeSetException  
CommandExecuteException  
ConnectionException  
DeviceException  
 

Package fr.esrf.tangoatk.core Description

This package contains the model part of TangoATK. Core has no knowledge of its viewers, core only knows how to send events to its listeners.
Most users will only need to access

to get things started.

Overview

Most of the code in this package is written to facilitate the handling of Attributes and Commands. Normally, users of this package should not try to instanciate attributes and commands by themselves, but rather use the AttributeList and the CommandList respectively. For more finegrained control, a CommandFactory and an AttributeFactory is provided.

Communication model

The communication model of TangoATK is based on the model used by java-beans, that is, objects register themselves as listeners to other object's events. All the listener-interfaces in core are derived from IErrorListener, so that all listeners are forced to implement some kind of errorhandling.

Properties

Both commands and attributes have properties attached to them. Some properties are common to both commands and attributes, and thus the hierarchy of classes representing the properties work with both commands and properties.

There are two ways of obtaining properties from a command or attribute. Either by calling getPropertyMap() which returns a java.util.Map with all propeties, or by calling specialized methods in the objects, such as getName() which returns the value for a particular property.

Overview of the attribute hierarchy

The Attributes in TangoATK come in different flavors. As an abstraction over Tango, all numeric types are coerced into doubles, and there exists no String types for images, which leaves us with: All of the interfaces inherit from IAttribute, which is the interface that defines an attribute.

Overview of the command hierarchy

Commands are defined by the ICommand inteface, and implemented in the classes: To interpret these names, the type of the input parameter is given as the first part of the class name, the type of the output parameter is given as the second part of the class name.
So a command which is of type ScalarArrayCommand takes a scalar value as input and returns an array as output.

How to obtain the results of a command

As with everything else in TangoATK, the commands also work with events, that is, every time a command is executed, it sends out a ResultEvent to all its listeners with the result of the command.

The Finer points of commands

To make life easier for the programmer, all types commands accept a java.util.List as input. A command which doesn't take any input will silently ignore the input, a command which takes a scalar as input will use only the first value in the list. Array command will parse the list as best it can.

Regarding input, a command will accept any input to any command, there are no compiletime checks to make sure a string is not passed to a command accepting a double allthough this error will be caught at runtime.