public int Write(IntPtr pItem) { DfsDLLWrapper.dfsSetItemInfo(fileInfoRef.pHeader, pItem, (int)this.EUMType, this.Name, (int)this.EUMUnit, this.dataType); switch (this.sAxisType) { case SpaceAxisType.EqD0: DfsDLLWrapper.dfsSetItemAxisEqD0(pItem, (int)axisEUMUnit); break; case SpaceAxisType.EqD1: DfsDLLWrapper.dfsSetItemAxisEqD1(pItem, (int)axisEUMUnit, nPointsX, XMinLimit, DX); break; case SpaceAxisType.EqD2: DfsDLLWrapper.dfsSetItemAxisEqD2(pItem, (int)axisEUMUnit, nPointsX, nPointsY, XMinLimit, YMinLimit, DX, DY); break; case SpaceAxisType.EqD3: DfsDLLWrapper.dfsSetItemAxisEqD3(pItem, (int)axisEUMUnit, nPointsX, nPointsY, nPointsZ, XMinLimit, YMinLimit, ZMinLimit, DX, DY, DZ); break; default: return(_err("write does not support space axis " + sAxisType.ToString())); } return(0); }
public int Read(IntPtr pItem) { int eumT = 0, eumU = 0; DfsSimpleType dataT = DfsSimpleType.Int; DfsDLLWrapper.dfsGetItemInfo(pItem, out eumT, out EUMTypeString, out Name, out eumU, out EUMUnitString, out dataT); EUMType = (eumItem)eumT; EUMUnit = (eumUnit)eumU; dataType = (DfsSimpleType)dataT; //if (dataType != UfsSimpleType.UFS_FLOAT)return err("Only float dataType supported."); dim = DfsDLLWrapper.dfsGetItemDim(pItem); dataValType = DfsDLLWrapper.dfsGetItemValueType(pItem); sAxisType = (SpaceAxisType)DfsDLLWrapper.dfsGetItemAxisType(pItem); switch (sAxisType) { case SpaceAxisType.EqD0: DfsDLLWrapper.dfsGetItemAxisEqD0(pItem, out eumU, out axisEUMUnitString); nPointsX = 1; break; case SpaceAxisType.EqD1: DfsDLLWrapper.dfsGetItemAxisEqD1(pItem, out eumU, out axisEUMUnitString, out m_nPointsX, out XMinLimit, out DX); break; case SpaceAxisType.EqD2: DfsDLLWrapper.dfsGetItemAxisEqD2(pItem, out eumU, out axisEUMUnitString, out m_nPointsX, out m_nPointsY, out XMinLimit, out YMinLimit, out DX, out DY); break; case SpaceAxisType.EqD3: DfsDLLWrapper.dfsGetItemAxisEqD3(pItem, out eumU, out axisEUMUnitString, out m_nPointsX, out m_nPointsY, out m_nPointsZ, out XMinLimit, out YMinLimit, out ZMinLimit, out DX, out DY, out DZ); break; default: return(_err("Unsupported space axis " + sAxisType.ToString())); } axisEUMUnit = (eumUnit)eumU; return(0); }