Exemple #1
0
 def _load_variables(self):
     ''' Load all timing Variables that are specified in the timing.ini '''
     timing_vars = []
     self.db_lookup_dict = {}
     
     ''' 1. Load the variables '''
     for reg_tim in Registrator().reg_simple_timings.keys():
         for l in Registrator().reg_simple_timings[reg_tim]:
             dic = Registrator().reg_simple_timings[reg_tim][l]
             
             lst = list(dic.keys())
             try:                            
                 lst += Registrator().db_lookup_timings[reg_tim][l]
                 self.db_lookup_dict[l] = list(Registrator().db_lookup_timings[reg_tim][l].keys())
             except:
                 pass
 
             timing_vars.append([l, lst, reg_tim, dic])
             
     ''' 2. Set table from variables'''
     self._set_timing_tab(timing_vars)
Exemple #2
0
                            iv.  DB entry corresponding to this information
    
    - Interpolation:    Does the same as the DB Lookup with the difference that more than one value is determined and from those
      (DBInterpol)      information a value is interpolated 
    
'''
import config.project_registration as preg  # NECESSARY, needs to boot first
from config.registrator import Registrator
import config.timing_reg_formulas as formula
import sys
from config import config_io
from enums.gen_cfg_enums import IniConfig
import logging
import os

reg = Registrator()
call = formula.call

load_config = True
create_raw_config_file = False
config_file_path = os.path.join(os.path.dirname(__file__), "data/timings.ini")

#===============================================================================
#     CANGateway
#===============================================================================
# Processing Time per message
GW_TRANSITION_PROCESS = 0.00000001
reg.reg_simp_timing('StdCANBus', 'SCB_GATHER_MSGS', 'LONG', 2)

#===============================================================================
#    COMPONENTS.BUS