Esempio n. 1
0
 public void SetFunction(string name,
                         string fileName,
                         int headerLinesSkip,
                         double dampingRatio,
                         eFileValueType valueType)
 {
 }
Esempio n. 2
0
 public void GetFunction(string name,
                         ref string fileName,
                         ref int headerLinesSkip,
                         ref double dampingRatio,
                         ref eFileValueType valueType)
 {
 }
Esempio n. 3
0
 public void SetFromFile(string name,
                         string fileName,
                         int headerLinesSkip,
                         int prefixCharactersSkip,
                         int pointsPerLine,
                         eFileValueType valueType,
                         bool freeFormat,
                         int numberFixed = 10,
                         eFrequencyType frequencyTypeInFile = eFrequencyType.HZ)
 {
 }
Esempio n. 4
0
 public void GetFromFile(string name,
                         ref string fileName,
                         ref int headerLinesSkip,
                         ref int prefixCharactersSkip,
                         ref int pointsPerLine,
                         ref eFileValueType valueType,
                         ref bool freeFormat,
                         ref int numberFixed,
                         ref eFrequencyType frequencyTypeInFile)
 {
 }
Esempio n. 5
0
 public void SetFromFile(string name,
                         string fileName,
                         int headerLinesSkip,
                         int prefixCharactersSkip,
                         int pointsPerLine,
                         eFileValueType valueType,
                         bool freeFormat,
                         int numberFixed     = 10,
                         double timeInterval = 0.02)
 {
 }
Esempio n. 6
0
 /// <summary>
 /// This function defines a response spectrum function from file.
 /// </summary>
 /// <param name="name">The name of an existing or new function.
 /// If this is an existing function, that function is modified; otherwise, a new function is added.</param>
 /// <param name="fileName">The full path of the text file containing the function data.</param>
 /// <param name="headerLinesSkip">The number of header lines in the text file to be skipped before starting to read function data.</param>
 /// <param name="dampingRatio">The damping ratio for the function, 0 &lt;= DampRatio &lt; 1.</param>
 /// <param name="valueType">Type of the value used in the file.</param>
 /// <exception cref="CSiException">API_DEFAULT_ERROR_CODE</exception>
 /// <exception cref="MPT.CSI.API.Core.Support.CSiException"></exception>
 public void SetFunction(string name,
                         string fileName,
                         int headerLinesSkip,
                         double dampingRatio,
                         eFileValueType valueType)
 {
     // TODO: What if file path is invalid? Other ways this may fail?
     dampingRatio = limitDampingRatio(dampingRatio);
     _callCode    = _sapModel.Func.FuncRS.SetFromFile(name, fileName, headerLinesSkip, dampingRatio, (int)valueType);
     if (throwCurrentApiException(_callCode))
     {
         throw new CSiException(API_DEFAULT_ERROR_CODE);
     }
 }
Esempio n. 7
0
 /// <summary>
 /// This function defines a power spectral density function from file.
 /// </summary>
 /// <param name="name">The name of an existing or new function.
 /// If this is an existing function, that function is modified; otherwise, a new function is added.</param>
 /// <param name="fileName">The full path of the text file containing the function data.</param>
 /// <param name="headerLinesSkip">The number of header lines in the text file to be skipped before starting to read function data.</param>
 /// <param name="prefixCharactersSkip">The number of prefix characters to be skipped on each line in the text file.</param>
 /// <param name="pointsPerLine">The number of function points included on each text file line.</param>
 /// <param name="valueType">Type of the value used in the file.</param>
 /// <param name="freeFormat">True: Data is provided in a free format. It is
 /// False: It is in a fixed format.</param>
 /// <param name="numberFixed">The number of characters per item.
 /// This item applies only when the <paramref name="freeFormat" /> item is False.</param>
 /// <param name="frequencyTypeInFile">The frequency type in the file.</param>
 /// <exception cref="CSiException"></exception>
 /// <exception cref="MPT.CSI.API.Core.Support.CSiException"></exception>
 public void SetFromFile(string name,
                         string fileName,
                         int headerLinesSkip,
                         int prefixCharactersSkip,
                         int pointsPerLine,
                         eFileValueType valueType,
                         bool freeFormat,
                         int numberFixed = 10,
                         eFrequencyType frequencyTypeInFile = eFrequencyType.HZ)
 {
     // TODO: What if file path is invalid? Other ways this may fail?
     _callCode = _sapModel.Func.FuncPSD.SetFromFile(name, fileName, headerLinesSkip, prefixCharactersSkip, pointsPerLine, (int)valueType, freeFormat, numberFixed, (int)frequencyTypeInFile);
     if (throwCurrentApiException(_callCode))
     {
         throw new CSiException();
     }
 }
Esempio n. 8
0
        /// <summary>
        /// This function retrieves the definition of a response spectrum function from file.
        /// </summary>
        /// <param name="name">The name of a defined response spectrum function specified to be from a text file.</param>
        /// <param name="fileName">The full path of the text file containing the function data.</param>
        /// <param name="headerLinesSkip">The number of header lines in the text file to be skipped before starting to read function data.</param>
        /// <param name="dampingRatio">The damping ratio for the function, 0 &lt;= DampRatio &lt; 1.</param>
        /// <param name="valueType">Type of the value used in the file.</param>
        /// <exception cref="CSiException">API_DEFAULT_ERROR_CODE</exception>
        /// <exception cref="MPT.CSI.API.Core.Support.CSiException"></exception>
        public void GetFunction(string name,
                                ref string fileName,
                                ref int headerLinesSkip,
                                ref double dampingRatio,
                                ref eFileValueType valueType)
        {
            int csiValueType = 0;

            // TODO: What if file path is invalid? Other ways this may fail?
            _callCode = _sapModel.Func.FuncRS.GetFromFile(name, ref fileName, ref headerLinesSkip, ref dampingRatio, ref csiValueType);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException(API_DEFAULT_ERROR_CODE);
            }

            valueType = (eFileValueType)csiValueType;
        }
Esempio n. 9
0
 /// <summary>
 /// This function defines a time history function from file.
 /// </summary>
 /// <param name="name">The name of an existing or new function.
 /// If this is an existing function, that function is modified; otherwise, a new function is added.</param>
 /// <param name="fileName">The full path of the text file containing the function data.</param>
 /// <param name="headerLinesSkip">The number of header lines in the text file to be skipped before starting to read function data.</param>
 /// <param name="prefixCharactersSkip">The number of prefix characters to be skipped on each line in the text file.</param>
 /// <param name="pointsPerLine">The number of function points included on each text file line.</param>
 /// <param name="valueType">Type of the value used in the file.</param>
 /// <param name="freeFormat">True: Data is provided in a free format. It is
 /// False: It is in a fixed format.</param>
 /// <param name="numberFixed">The number of characters per item.
 /// This item applies only when the <paramref name="freeFormat" /> item is False.</param>
 /// <param name="timeInterval">The time interval between function points.
 /// This item applies only when the <paramref name="valueType" /> item is <see cref="eFileValueType.EqualTimeIntervals" /></param>
 /// <exception cref="CSiException">API_DEFAULT_ERROR_CODE</exception>
 /// <exception cref="MPT.CSI.API.Core.Support.CSiException"></exception>
 public void SetFromFile(string name,
                         string fileName,
                         int headerLinesSkip,
                         int prefixCharactersSkip,
                         int pointsPerLine,
                         eFileValueType valueType,
                         bool freeFormat,
                         int numberFixed     = 10,
                         double timeInterval = 0.02)
 {
     // TODO: What if file path is invalid? Other ways this may fail?
     _callCode = _sapModel.Func.FuncTH.SetFromFile_1(name, fileName, headerLinesSkip, prefixCharactersSkip, pointsPerLine, (int)valueType, freeFormat, numberFixed, timeInterval);
     if (throwCurrentApiException(_callCode))
     {
         throw new CSiException(API_DEFAULT_ERROR_CODE);
     }
 }
Esempio n. 10
0
        /// <summary>
        /// This function retrieves the definition of a time history function from file.
        /// </summary>
        /// <param name="name">The name of a defined time history function specified to be from a text file.</param>
        /// <param name="fileName">The full path of the text file containing the function data.</param>
        /// <param name="headerLinesSkip">The number of header lines in the text file to be skipped before starting to read function data.</param>
        /// <param name="prefixCharactersSkip">The number of prefix characters to be skipped on each line in the text file.</param>
        /// <param name="pointsPerLine">The number of function points included on each text file line.</param>
        /// <param name="valueType">Type of the value used in the file.</param>
        /// <param name="freeFormat">True: Data is provided in a free format. It is
        /// False: It is in a fixed format.</param>
        /// <param name="numberFixed">The number of characters per item.
        /// This item applies only when the <paramref name="freeFormat" /> item is False.</param>
        /// <param name="timeInterval">The time interval between function points.
        /// This item applies only when the <paramref name="valueType" /> item is <see cref="eFileValueType.EqualTimeIntervals" /></param>
        /// <exception cref="CSiException">API_DEFAULT_ERROR_CODE</exception>
        /// <exception cref="MPT.CSI.API.Core.Support.CSiException"></exception>
        public void GetFromFile(string name,
                                ref string fileName,
                                ref int headerLinesSkip,
                                ref int prefixCharactersSkip,
                                ref int pointsPerLine,
                                ref eFileValueType valueType,
                                ref bool freeFormat,
                                ref int numberFixed,
                                ref double timeInterval)
        {
            int csiValueType = 0;

            // TODO: What if file path is invalid? Other ways this may fail?
            _callCode = _sapModel.Func.FuncTH.GetFromFile_1(name, ref fileName, ref headerLinesSkip, ref prefixCharactersSkip, ref pointsPerLine, ref csiValueType, ref freeFormat, ref numberFixed, ref timeInterval);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException(API_DEFAULT_ERROR_CODE);
            }

            valueType = (eFileValueType)csiValueType;
        }
Esempio n. 11
0
        /// <summary>
        /// This function retrieves the definition of a power spectral density function from file.
        /// </summary>
        /// <param name="name">The name of a defined power spectral density function specified to be from a text file.</param>
        /// <param name="fileName">The full path of the text file containing the function data.</param>
        /// <param name="headerLinesSkip">The number of header lines in the text file to be skipped before starting to read function data.</param>
        /// <param name="prefixCharactersSkip">The number of prefix characters to be skipped on each line in the text file.</param>
        /// <param name="pointsPerLine">The number of function points included on each text file line.</param>
        /// <param name="valueType">Type of the value used in the file.</param>
        /// <param name="freeFormat">True: Data is provided in a free format. It is
        /// False: It is in a fixed format.</param>
        /// <param name="numberFixed">The number of characters per item.
        /// This item applies only when the <paramref name="freeFormat" /> item is False.</param>
        /// <param name="frequencyTypeInFile">The frequency type in the file.</param>
        /// <exception cref="CSiException"></exception>
        /// <exception cref="MPT.CSI.API.Core.Support.CSiException"></exception>
        public void GetFromFile(string name,
                                ref string fileName,
                                ref int headerLinesSkip,
                                ref int prefixCharactersSkip,
                                ref int pointsPerLine,
                                ref eFileValueType valueType,
                                ref bool freeFormat,
                                ref int numberFixed,
                                ref eFrequencyType frequencyTypeInFile)
        {
            int csiValueType           = 0;
            int csiFrequencyTypeInFile = 0;

            // TODO: What if file path is invalid? Other ways this may fail?
            _callCode = _sapModel.Func.FuncPSD.GetFromFile(name, ref fileName, ref headerLinesSkip, ref prefixCharactersSkip, ref pointsPerLine, ref csiValueType, ref freeFormat, ref numberFixed, ref csiFrequencyTypeInFile);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException();
            }

            valueType           = (eFileValueType)csiValueType;
            frequencyTypeInFile = (eFrequencyType)csiFrequencyTypeInFile;
        }