}
}
if (!propertyList.hasProperty(propertyName)) return TErrorList.illegal_property;
TExportProperty prp = propertyList.getFirstProperty(propertyName);
if (prp == null) return TErrorList.illegal_property;
TPropertyEGU egu;
int cc = 0;
float[] fv = new float[1];
switch (metaIndex)
{
case TMetaProperties.URL_ID:
return (short) dout.putData(prp.getDescription().getUrl());
case TMetaProperties.DSC_ID:
return (short) dout.putData(prp.getDescription().getText());
case TMetaProperties.MAX_ID:
case TMetaProperties.XMAX_ID:
egu = metaIndex == TMetaProperties.XMAX_ID ?
prp.getDescription().getXRange() : prp.getDescription().getYRange();
if (devAccess.isWrite())
{
if (din.dArrayLength != 1) return TErrorList.dimension_error;
if (!TFormat.isNumberFormat(din.dFormat)) return TErrorList.illegal_format;
if ((cc=din.getData(fv)) != 0) return (short)cc;
egu.setMaxValue(fv[0]);
if (dout.dArrayLength == 0) return 0;
}
if (!TFormat.isNumberFormat(dout.dFormat)) return TErrorList.illegal_format;
fv[0] = egu.getMaxValue();
return (short) dout.putData(fv);
case TMetaProperties.MIN_ID:
case TMetaProperties.XMIN_ID:
egu = metaIndex == TMetaProperties.XMIN_ID ?
prp.getDescription().getXRange() : prp.getDescription().getYRange();
if (devAccess.isWrite())
{
if (din.dArrayLength != 1) return TErrorList.dimension_error;
if (!TFormat.isNumberFormat(din.dFormat)) return TErrorList.illegal_format;
if ((cc=din.getData(fv)) != 0) return (short)cc;
egu.setMinValue(fv[0]);
if (dout.dArrayLength == 0) return 0;
}
if (!TFormat.isNumberFormat(dout.dFormat)) return TErrorList.illegal_format;
fv[0] = egu.getMinValue();
return (short) dout.putData(fv);
case TMetaProperties.XEGU_ID:
case TMetaProperties.EGU_ID: // to satisfy DOOCS calls ...
egu = metaIndex == TMetaProperties.XEGU_ID ?
prp.getDescription().getXRange() :
prp.getDescription().getYRange();
if (devAccess.isWrite())
{
switch (din.dFormat)
{
case TFormat.CF_NAME16:
case TFormat.CF_NAME32:
case TFormat.CF_NAME64:
if (din.getArrayLength() != 1) return TErrorList.dimension_error;
case TFormat.CF_TEXT:
char[] newUnits = new char[64];
cc = din.getData(newUnits);
if (cc != 0) return (short)cc;
egu.setUnits(new String(newUnits));
break;
case TFormat.CF_FLOAT:
case TFormat.CF_DOUBLE:
case TFormat.CF_DLONG:
case TFormat.CF_LONG:
case TFormat.CF_SHORT:
if (din.dArrayLength != 2) return TErrorList.dimension_error;
float[] yrng = new float[2];
cc = din.getData(yrng);
if (cc != 0) return (short)cc;
egu.setMinValue(yrng[0]);
egu.setMaxValue(yrng[1]);
break;
case TFormat.CF_USTRING:
if (din.getArrayLength() != 1) return TErrorList.dimension_error;
USTRING[] u = new USTRING[1];
cc = din.getData(u);
if (cc != 0) return (short)cc;
egu.setUnits(u[0].getString());
egu.setMinValue(u[0].f1val);
egu.setMaxValue(u[0].f2val);
egu.setGraphType((short)u[0].ival);
break;
default:
return TErrorList.illegal_format;
}
if (dout.dArrayLength == 0) return 0;
}
switch (dout.dFormat)
{
case TFormat.CF_TEXT:
case TFormat.CF_NAME16:
case TFormat.CF_NAME32:
case TFormat.CF_NAME64:
return (short) dout.putData(egu.getUnits());
case TFormat.CF_FLOAT:
case TFormat.CF_DOUBLE:
case TFormat.CF_DLONG:
case TFormat.CF_LONG:
case TFormat.CF_SHORT:
float[] yrng = new float[2];
yrng[0] = egu.getMinValue();
yrng[1] = egu.getMaxValue();
return (short) dout.putData(yrng);
case TFormat.CF_USTRING:
USTRING[] u = new USTRING[1];
u[0] = new USTRING(egu.getGraphType(),
egu.getMinValue(),
egu.getMaxValue(),
0,
egu.getUnits());
return (short) dout.putData(u);
default:
return TErrorList.illegal_format;
}
case TMetaProperties.RBSUMMARY_ID: