org.tango.server.annotation
Annotation Type Attribute


@Target(value={FIELD,METHOD})
@Retention(value=RUNTIME)
public @interface Attribute

Declare an attribute of a tango device.

Read only attribute called myAttribute of type double:
 @Attribute
 private double myAttribute;
 
 public double getMyAttribute(){..};
 
Read / write attribute called myAttribute of type double:
 @Attribute
 private double myAttribute;
 
 public double getMyAttribute(){..};
 public void setMyAttribute(double myAttribute){..};
 

Possible types ares:

boolean, boolean[],boolean[][],
short, short[], short[][],
long, long[],long[][],
float, float[], float[][],
double, double[], double[][],
String, String[], String[][],
int, int[], int[][],
DeviceState, DeviceState[], DeviceState[][],
byte, byte[], byte[][],
DevEncoded

Author:
ABEILLE

Optional Element Summary
 boolean checkArchivingEvent
          The framework will check event conditions before firing it
 boolean checkChangeEvent
          The framework will check event conditions before firing it
 int displayLevel
          The command display level.
 boolean isMemorized
          The attribute write value is persisted after each write.
 boolean isMemorizedAtInit
          The memorized value is written on attribute at init.
 boolean isPolled
          define if attribute is polled.
 int maxDimX
           
 int maxDimY
           
 java.lang.String name
          Default name is field name
 int pollingPeriod
          Configure polling period in ms.
 boolean pushArchiveEvent
          Archive event pushed from device
 boolean pushChangeEvent
          Change event pushed from device
 boolean pushDataReady
          Data Ready event pushed from device
 

name

public abstract java.lang.String name
Default name is field name

Returns:
The attribute name.
Default:
""

displayLevel

public abstract int displayLevel
The command display level. see @link DispLevel

Returns:
display level
Default:
0

isMemorized

public abstract boolean isMemorized
The attribute write value is persisted after each write. For performance issues, it works only for scalar attributes.

Returns:
is memorized
Default:
false

isMemorizedAtInit

public abstract boolean isMemorizedAtInit
The memorized value is written on attribute at init.

Returns:
is memorized at init
Default:
true

isPolled

public abstract boolean isPolled
define if attribute is polled. period must be configured. see pollingPeriod()

Returns:
is polled
Default:
false

pollingPeriod

public abstract int pollingPeriod
Configure polling period in ms. use only is isPolled() is true

Returns:
polling period
Default:
0

maxDimX

public abstract int maxDimX
Returns:
max dim x
Default:
2147483647

maxDimY

public abstract int maxDimY
Returns:
max dim y
Default:
2147483647

pushDataReady

public abstract boolean pushDataReady
Data Ready event pushed from device

Returns:
Default:
false

pushChangeEvent

public abstract boolean pushChangeEvent
Change event pushed from device

Returns:
Default:
false

checkChangeEvent

public abstract boolean checkChangeEvent
The framework will check event conditions before firing it

Returns:
Default:
true

pushArchiveEvent

public abstract boolean pushArchiveEvent
Archive event pushed from device

Returns:
Default:
false

checkArchivingEvent

public abstract boolean checkArchivingEvent
The framework will check event conditions before firing it

Returns:
Default:
true


Copyright © 2012-2016. All Rights Reserved.