Пример #1
0
        async void LoadData()
        {
            LoadPulse loader = new LoadPulse();

            loader.LoadPulseJson(_context);

            LoadTemperature temploader = new LoadTemperature();

            temploader.LoadTemperatureJson(_context);


            var all = _context.Temperature.ToList();

            foreach (var a in all)
            {
                System.Diagnostics.Debug.WriteLine("teplota " + a.TeplotaId + " " + a.TimeStamp + " " + a.Hodnota);
            }

            var all1 = _context.Pulse.ToList();

            foreach (var a in all1)
            {
                System.Diagnostics.Debug.WriteLine("pulz " + a.TepId + " " + a.TimeStamp + " " + a.Hodnota);
            }
        }
 public static dynamic GetTSObject(LoadTemperature dynObject)
 {
     if (dynObject is null)
     {
         return(null);
     }
     return(dynObject.teklaObject);
 }
Пример #3
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);
        }
        public AsyncDataLoader()
        {
            loadTemperature = new LoadTemperature();
            //context = new DatabaseContext();
            sequenceCreator = new SequenceCreator();
            loadPulse       = new LoadPulse();
            loadMovement    = new LoadMovement();
            loadFall        = new LoadFall();

            //loadTemperature.createFileFromFile();
            //loadPulse.createFileFromFile();
            loadPulse.createDatasetFile();
            loadTemperature.createDatasetFile();
            loadMovement.createDatasetFile();
        }
Пример #6
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>
 /// Assigns temperature loads to objects.
 /// </summary>
 /// <param name="temperatureLoad">The temperature load.</param>
 /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception>
 public abstract void ReplaceLoadTemperature(LoadTemperature temperatureLoad);
 /// <summary>
 /// Assigns temperature loads to objects.
 /// </summary>
 /// <param name="temperatureLoad">The temperature load.</param>
 /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception>
 public abstract void AddLoadTemperature(LoadTemperature temperatureLoad);
Пример #9
0
 /// <summary>
 /// Assigns temperature loads to objects.
 /// </summary>
 /// <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>
 public abstract void SetLoadTemperature(LoadTemperature temperatureLoad, bool replace);
Пример #10
0
 /// <summary>
 /// Assigns temperature loads to frame objects.
 /// </summary>
 /// <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>
 public override void SetLoadTemperature(LoadTemperature temperatureLoad, bool replace)
 {
     setLoadTemperature(_frameObject, temperatureLoad, replace);
 }
 /// <summary>
 /// Assigns temperature loads to objects.
 /// </summary>
 /// <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>
 protected void setLoadTemperature(
     LoadTemperature temperatureLoad,
     bool replace)
 {
     addOrReplace(replace, temperatureLoad, _temperatureLoads);
 }