|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
DeviceProperty accesses data associated with a property. A property corresponds to a device value we can always read and often also write.
Get a DeviceProperty object for an instance of DeviceClass with DeviceClass#getProperty(propertyName).
Get a list of attributes with getCharacteristicNames() and a corresponding value with getCharacteristicValue(characteristicName).
You can also obtain a DeviceProperty object with
DirectoryService#getDeviceProperty(propertyName,className).
You can obtain a DeviceProperty object common to several classes with
DirectoryService#getCommonProperty(propertyName,classNames).
This description should be completed with a set of conventions for standard characteristics and their value domain.
General documentation in DirectoryService .
DeviceClass
,
BitPatternDefinition
,
DeviceList
Method Summary | |
java.lang.String[] |
getCharacteristicNames()
Return array of names of characteristics for the property. |
java.lang.Object |
getCharacteristicValue(java.lang.String characteristicName)
Gets the value of the characteristic. |
java.lang.String |
getClassName()
Gets the name of the device class to which the property belongs. |
int |
getDim()
Gets the number of dimensions. |
int[] |
getDimensions()
Gets the array of dimensions. |
int |
getEnumeratedType()
Gets the enumerated data type of the property (returns an int). |
boolean |
isConstant()
Return true if property value can be considered constant and needs to be fetched only once (min, max, ...). |
boolean |
isDefined(java.lang.String characteristic)
Return true if the characteristic is defined for the property. |
boolean |
isDiscrete()
Returns true if this is a discrete property. |
boolean |
isWritable()
Return true if property can write values. |
boolean |
needCycleType()
Return true if property value depends on cycle type. |
Methods inherited from interface cdev.dir.DirectoryItem |
getDescription,
getInfo,
getInfoLines,
getInfoWidth,
getName,
getServiceName,
toString |
Method Detail |
public java.lang.String[] getCharacteristicNames() throws NoSuchDataException, BadConnectionException
public java.lang.Object getCharacteristicValue(java.lang.String characteristicName) throws NoSuchDataException, BadConnectionException, BadQueryException
characteristicName
- the name of the characteristicpublic java.lang.String getClassName()
public int getDim()
public int[] getDimensions()
public int getEnumeratedType()
public boolean isConstant()
public boolean isDefined(java.lang.String characteristic)
characteristic
- the name of the characteristicpublic boolean isDiscrete()
public boolean isWritable()
public boolean needCycleType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |