payloadBuffer.putFloat(array[i]); else if (dataType.isENUM())
payloadBuffer.putFloat(array[i]); else if (dataType.isENUM())
private static boolean dbrTypeMatch(DBRType aType, DBRType anotherType) { if (aType.getClass() == null && anotherType.getClass() != null) { return false; } if (aType.getClass() != null && anotherType.getClass() == null) { return false; } return aType.isBYTE() && anotherType.isBYTE() || aType.isDOUBLE() && anotherType.isDOUBLE() || aType.isENUM() && anotherType.isENUM() || aType.isFLOAT() && anotherType.isFLOAT() || aType.isINT() && anotherType.isINT() || aType.isSHORT() && anotherType.isSHORT() || aType.isSTRING() && anotherType.isSTRING(); }
private static boolean dbrTypeMatch(DBRType aType, DBRType anotherType) { if (aType.getClass() == null && anotherType.getClass() != null) { return false; } if (aType.getClass() != null && anotherType.getClass() == null) { return false; } return aType.isBYTE() && anotherType.isBYTE() || aType.isDOUBLE() && anotherType.isDOUBLE() || aType.isENUM() && anotherType.isENUM() || aType.isFLOAT() && anotherType.isFLOAT() || aType.isINT() && anotherType.isINT() || aType.isSHORT() && anotherType.isSHORT() || aType.isSTRING() && anotherType.isSTRING(); }
protected DBRType valueTypeFor(Channel channel) { DBRType type = channel.getFieldType(); if (type.isBYTE()) { return DBR_TIME_Byte.TYPE; } else if (type.isSHORT()) { return DBR_TIME_Short.TYPE; } else if (type.isINT()) { return DBR_TIME_Int.TYPE; } else if (type.isFLOAT()) { return DBR_TIME_Float.TYPE; } else if (type.isDOUBLE()) { return DBR_TIME_Double.TYPE; } else if (type.isENUM()) { return DBR_TIME_Enum.TYPE; } else if (type.isSTRING()) { if (jcaDataSource.isRtypValueOnly() && rtypeStringPattern.matcher(channel.getName()).matches()) { return DBR_String.TYPE; } return DBR_TIME_String.TYPE; } throw new IllegalArgumentException("Unsupported type " + type); }
protected DBRType valueTypeFor(Channel channel) { DBRType type = channel.getFieldType(); if (type.isBYTE()) { return DBR_TIME_Byte.TYPE; } else if (type.isSHORT()) { return DBR_TIME_Short.TYPE; } else if (type.isINT()) { return DBR_TIME_Int.TYPE; } else if (type.isFLOAT()) { return DBR_TIME_Float.TYPE; } else if (type.isDOUBLE()) { return DBR_TIME_Double.TYPE; } else if (type.isENUM()) { return DBR_TIME_Enum.TYPE; } else if (type.isSTRING()) { if (jcaDataSource.isRtypValueOnly() && rtypeStringPattern.matcher(channel.getName()).matches()) { return DBR_String.TYPE; } return DBR_TIME_String.TYPE; } throw new IllegalArgumentException("Unsupported type " + type); }
protected DBRType metadataFor(Channel channel) { DBRType type = channel.getFieldType(); if (type.isBYTE() || type.isSHORT() || type.isINT() || type.isFLOAT() || type.isDOUBLE()) return DBR_CTRL_Double.TYPE; if (type.isENUM()) return DBR_LABELS_Enum.TYPE; return null; }
protected DBRType metadataFor(Channel channel) { DBRType type = channel.getFieldType(); if (type.isBYTE() || type.isSHORT() || type.isINT() || type.isFLOAT() || type.isDOUBLE()) return DBR_CTRL_Double.TYPE; if (type.isENUM()) return DBR_LABELS_Enum.TYPE; return null; }
else if (dataType.isENUM())
else if (dataType.isENUM())
if(nativeDBRType.isENUM()) { if(valueIsIndex) { nativeDBRType = DBRType.INT; } else if(nativeDBRType.isSTRING()) { scalarType = ScalarType.pvString; } else if(nativeDBRType.isENUM()) { type = Type.structure; pvStructure = pvDataCreate.createPVStructure(field); if(nativeDBRType.isENUM()) { PVStructure pvStruct = (PVStructure)pvStructure.getPVFields()[0]; pvEnumeratedIndex = pvStruct.getIntField("index"); if(nativeDBRType.isENUM()) { requestDBRType = DBRType.CTRL_ENUM; return pvStructure;
protected void initializePut() { PVString pvString = pvRequest.getSubField(PVString.class,"record._options.block"); if(pvString!=null) { String value = pvString.get(); if(value.equals("true")) block = true; } if(v3ChannelStructure.createPVStructure(pvRequest,true)==null) { elementCount = 1; channelPutRequester.channelPutConnect(createChannelStructureStatus,this,null); destroy(); return; } elementCount = jcaChannel.getElementCount(); DBRType nativeDBRType = v3ChannelStructure.getNativeDBRType(); if(nativeDBRType.isENUM() && elementCount != 1) { channelPutRequester.channelPutConnect(statusCreate.createStatus(StatusType.ERROR, "array of ENUM not supported", null),this,null); destroy(); return; } channelPutRequester.channelPutConnect(okStatus,this, v3ChannelStructure.getPVStructure().getStructure()); } /* (non-Javadoc)
bitSet.clear(); DBRType requestDBRType = fromDBR.getType(); if(nativeDBRType.isENUM()) { int index = pvEnumerated.getIndex(); if(requestDBRType==DBRType.ENUM) {
if(nativeDBRType.isENUM()) pvIndex = ((PVStructure)pvField).getIntField("index"); else