The words you are searching are inside this book. To get more targeted content, please make full-text search by clicking here.

Tango ATK Tutorial . This document is a practical guide for Tango ATK programmers and includes several trails with examples and demonstrations. Most of the examples ...

Discover the best professional documents and content resources in AnyFlip Document Base.
Search
Published by , 2016-06-27 01:00:11

Tango ATK Tutorial - ESRF

Tango ATK Tutorial . This document is a practical guide for Tango ATK programmers and includes several trails with examples and demonstrations. Most of the examples ...

Tango Command
A Tango Command can be associated to a Jdraw interactive component or to an adapted Atk
Viewer (for example VoidVoidCommandViewer).

Associated to a Jdraw interactive component
When the interactive graphic component is clicked, the tango command is executed.

Associated to an Atk Viewer (for example VoidVoidCommandViewer)
The tango attribute will be set as the model of the AtkViewer (VoidVoidCommandViewer).
All the run-time behavior is defined by the AtkViewer which is used.
Some of the bean properties of the Atk Viewer are available in the extension Tab of the Jdraw
properties window.

User interaction

When the mouse enters the graphic component associated to the tango command, the name
of the tango command is displayed inside a tooltip.

When the interactive object associated to the tango command is clicked by the user at run
time, ATK sends the command to the associated Tango device.

Other types of Tango Attributes

Other type of Tango attributes can be associated only to an Atk viewer avialable in Jdraw
editor under the “Atk Swing” button. They cannot be associated to a Jdraw graphic
component. The use of an Atk viewer is mandatory.

The following tango attributes can be used in Jdraw and associated to their corresponding Atk
viewers as listed below :

ƒ String Scalar attribute should be associated to a SimpleScalarViewer
ƒ Numeric Spectrum attribute should be associated to a NumberSpectrumViewer
ƒ Numeric Image attribute should be associated to a NumberImageViewer

The run time behavior is the one provided by the Atk viewer.

Advanced ATK programming

Section under construction ….

Appendix 1 : attribute viewers / setters

Tango View ATK class used as ATK viewer / setter Tutorial
format and / Set model ScalarListViewer ScalarListSetter section
data type View Use a generic
and AttributeList NumberScalarListViewer scalar attribute
Scalar Set viewer
Any type INumberScalar SimpleScalarViewer
View NumberScalarViewer Using specific
Single IStringScalar viewers ...
attribute View NumberScalarProgressBar
Scalar Using specific
Numeric SimpleScalarViewer viewers ...
StatusViewer
type device status
Single SignalScalarLightViewer
attribute Using specific
BooleanScalarCheckBoxViewer viewers ...
Scalar
DevString SimpleEnumScalarViewer Using specific
viewers ...
single StateViewer
attribute Using specific
NumberScalarWheelEditor viewers ...
Scalar View IBooleanScalar
DevBoolean NumberScalarComboEditor device state
Using specific
Single StringScalarEditor
attribute StringScalarComboEditor viewers ...

Scalar View IBooleanScalar Using specific
DevBoolean and IEnumScalar viewers ...
Set IDevStateScalar
Single View INumberScalar Using specific
attribute IStringScalar viewers ...
View
Scalar
DevShort, Set
DevUshort
Set
Single
attribute
Scalar
DevState
Device
State single
attribute
Scalar
Numeric

type
Single
attribute

Scalar
DevString

single
attribute

Tango View ATK class used as ATK viewer / setter Tutorial
format and / Set model section
data type Set BooleanScalarCheckBoxViewer
IBooleanScalar BooleanScalarComboEditor Using specific
Scalar Set SignalScalarButtonSetter viewers ...
DevBoolean IEnumScalar
EnumScalarComboEditor Using specific
Single viewers ...
attribute
AttributeList
Scalar viewers
DevShort,
DevUshort AttListViewer
Flash Demo
Single The trend of
attribute numberScalar

Scalar View AttributeList ScalarListViewer ScalarListSetter Trend Flash
Any type and demo
Collection Set NumberScalarListViewer
of attributes The trend of
boolean scalar
Scalar View AttributePolledList Trend
Numeric View AttributePolledList BooleanTrend attributes

type A set of scalar
Collection att...
of attributes
Scalar Table
Scalar Flash demo
DevBoolean
Collection
of attributes

Scalar View IAttribute MultiScalarTableViewer
Any type and
Collection Set
of attributes

Scalar View IDevStateScalar TabbedPaneDevStateScalarViewer A set of
DevState DevStateScalar
Collection
of attributes attrributes

Spectrum View INumberSpectrum NumberSpectrumViewer NumberSpectrum
Numeric attributes

type
Single
attribute

Spectrum View IStringSpectrum SimpleStringSpectrumViewer StringSpectrum
DevString attributes

Single
attribute

Tango View ATK class used as ATK viewer / setter Tutorial
format and / Set model section
data type DevStateSpectrumViewer
DevStateSpectrum
Spectrum View IDevStateSpectrum attributes
DevState

Single
attribute

Spectrum View INumberSpectrum MultiNumberSpectrumViewer A set of
Numeric NumberSpectrumItemTrend NumberSpectrum

type NumberImageViewer attributes in a
Collection chart
of attributes
Trend of number
Spectrum View INumberSpectrum spectrum
Numeric attributes

type NumberImage
Single attributes
attribute

Image View INumberImage
Numeric

type
Single
attribute

Image View IStringImage StringImageTableViewer StringImage
DevString attributes

Single
attribute

Appendix 2 : command viewers

Input Output ATK class used ATK Command Viewer Tutorial
argument argument as model section
data type data type

DevVoid DevVoid ICommand VoidVoidCommandViewer Commands
no input no output ConfirmCommandViewer with no input
and no output

DevBoolean DevVoid ICommand OnOffCheckboxCommandViewer Commands
no output ICommand OnOffSwitchCommandViewer with
ICommand
DevString DevVoid OptionComboCommandViewer DevBoolean
no output input and no
AnyCommandViewer
Any Type Any Type output
Commands

with
DevString
input and no

output
Commands
with any type
of input and
any type of

output

Any Type Any Type A collection of CommandComboViewer.jpg A collection
commads of commands

CommandList

Appendix 3 : error viewers

Type of ATK ATK method to use ATK Error Viewer Tutorial
error section
ErrorHistory
Attribute read addErrorListener ErrorHistory
error during the addSetErrorListener ErrorHistory
ErrorPopup ErrorHistory
attribute ErrorPopup
refreshing

Attribute setting
error during the

attribute set
value

Command addErrorListener ErrorHistory ErrorHistory
execution error ErrorPopup ErrorPopup


Click to View FlipBook Version