예제 #1
0
 /// <summary>
 /// Assigns temperature loads to objects.
 /// </summary>
 /// <param name="app">The application.</param>
 /// <param name="temperatureLoad">The temperature load.</param>
 /// <param name="replace">True: All previous loads, if any, assigned to the specified object(s), in the specified load pattern, are deleted before making the new assignment.</param>
 /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception>
 protected void setLoadTemperature(ILoadTemperature app,
                                   LoadTemperature temperatureLoad,
                                   bool replace)
 {
     // TODO: Add to API project?
     app.SetLoadTemperature(Name,
                            temperatureLoad.LoadPattern,
                            temperatureLoad.TemperatureLoadType,
                            temperatureLoad.Value,
                            temperatureLoad.JointPatternName,
                            replace);
 }
        /// <summary>
        /// Assigns temperature loads to objects.
        /// </summary>
        /// <param name="app">The application.</param>
        /// <param name="temperatureLoad">The temperature load.</param>
        /// <param name="replace">True: All previous loads, if any, assigned to the specified object(s), in the specified load pattern, are deleted before making the new assignment.</param>
        /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception>
        protected void setLoadTemperature(ILoadTemperature app,
                                          LoadTemperature temperatureLoad,
                                          bool replace)
        {
            app.SetLoadTemperature(Name,
                                   temperatureLoad.LoadPattern,
                                   temperatureLoad.TemperatureLoadType,
                                   temperatureLoad.Value,
                                   temperatureLoad.JointPatternName,
                                   replace);

            addOrReplace(replace, temperatureLoad, _temperatureLoads);
        }
예제 #3
0
        /// <summary>
        /// Returns the temperature load assignments to objects.
        /// </summary>
        /// <param name="app">The application.</param>
        /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception>
        protected void getLoadTemperature(ILoadTemperature app)
        {
            // TODO: Add to API project?
            app.GetLoadTemperature(Name,
                                   out var names,
                                   out var loadPatterns,
                                   out var temperatureLoadTypes,
                                   out var temperatureLoadValues,
                                   out var jointPatternNames);
            for (int i = 0; i < names.Length; i++)
            {
                LoadTemperature temperatureLoad = new LoadTemperature
                {
                    LoadPattern         = loadPatterns[i],
                    TemperatureLoadType = temperatureLoadTypes[i],
                    Value            = temperatureLoadValues[i],
                    JointPatternName = jointPatternNames[i]
                };

                TemperatureLoads.Add(temperatureLoad);
            }
        }
 /// <summary>
 /// Deletes the load temperature.
 /// </summary>
 /// <param name="app">The application.</param>
 /// <param name="loadPattern">The load pattern.</param>
 protected void deleteLoadTemperature(ILoadTemperature app, string loadPattern)
 {
     app?.DeleteLoadTemperature(Name, loadPattern);
 }