Exemple #1
0
 public void Configure(Dictionary <string, object> dict)
 {
     foreach (string item in dict.Keys)
     {
         object val = dict[item];
         if (!ControlInput.InputHandles.ContainsKey(item))
         {
             throw logger.Error(new SettingException(item, val, $"No input handle named {item}"));
         }
         ControlInputHandle handle = ControlInput.InputHandles[item];
         Signal             origin;
         try
         {
             origin = new Signal(val);
             handle.SetOpenLoopInput(origin);
         }
         catch (LigralException)
         {
             throw logger.Error(new SettingException(item, val));
         }
         catch (System.InvalidCastException)
         {
             throw logger.Error(new SettingException(item, val, $"Invalid type {val.GetType()} in input setter."));
         }
     }
 }
Exemple #2
0
 protected override void SetValue(Signal signal)
 {
     handle.SetOpenLoopInput(signal);
 }