Esempio n. 1
0
 /// <summary>
 /// Constructs a new point grey gazelle camera link object
 /// </summary>
 /// <param name="interfaceId">The interface name. Optionally followed by ::# identifying the port - 0 based</param>
 public PGGazelleCamera(string interfaceId) : base(interfaceId)
 {
     _triggerActivation = TriggerActivations.risingEdge;
     SetTriggerActivation();
     _triggerSource = TriggerSources.SOFT;
     SetTriggerSource();
     _triggerMode = TriggerModes.none;
     SetTriggerMode();
 }
Esempio n. 2
0
        public static string ToDescription(this TriggerSources triggerSources)
        {
            switch (triggerSources)
            {
            case TriggerSources.Fixations: return(Resources.FIXATIONS_DWELL);

            case TriggerSources.KeyboardKeyDownsUps: return(Resources.KEYBOARD_KEY);

            case TriggerSources.MouseButtonDownUps: return(Resources.MOUSE_BUTTON);
            }

            return(triggerSources.ToString());
        }
Esempio n. 3
0
        public static string ToDescription(this TriggerSources triggerSources)
        {
            switch (triggerSources)
            {
            case TriggerSources.Fixations: return("Fixations (dwell)");

            case TriggerSources.KeyboardKeyDownsUps: return("Keyboard key");

            case TriggerSources.MouseButtonDownUps: return("Mouse button");
            }

            return(triggerSources.ToString());
        }
 public override void SetTriggerSource(TriggerSources triggerSource)
 {
     IsConnected();
     if (!_isConnected) throw new ApplicationException("Измерительное устройство не подключено");
     _triggerSource = triggerSource;
     switch (triggerSource)
     {
          case TriggerSources.Generator:
             //_triggerChannelRange = 10;
             _triggerThreshold = 0;
             _device.SetSynchSettings(true, false, true, 0, 1, (ushort) 0, true);
             break;
         case TriggerSources.External:
             throw new ApplicationException("Неверный тип источника синхронизации");
         case TriggerSources.Channel1:
             //_triggerChannelRange = _channelsRanges[0];
             _device.SetSynchSettings(true, true, false, (uint)Channels.Ch1, 1, _callibrs[(int)Channels.Ch1].ToCode(_triggerThreshold), true);
             break;
         case TriggerSources.Channel2:
            // _triggerChannelRange = _channelsRanges[1];
             _device.SetSynchSettings(true, true, false, (uint)Channels.Ch2, 1, _callibrs[(int)Channels.Ch2].ToCode(_triggerThreshold), true);
             break;
         case TriggerSources.Channel3:
             //_triggerChannelRange = _channelsRanges[2];
             _device.SetSynchSettings(true, true, false, (uint)Channels.Ch3, 1, _callibrs[(int)Channels.Ch3].ToCode(_triggerThreshold), true);
             break;
         case TriggerSources.Channel4:
             //_triggerChannelRange = _channelsRanges[3];
             _device.SetSynchSettings(true, true, false, (uint)Channels.Ch4, 1, _callibrs[(int)Channels.Ch4].ToCode(_triggerThreshold), true);
             break;
         default:
             throw new ApplicationException("Неверный тип источника синхронизации");
     }
 }
 public override void SetTriggerSource(TriggerSources triggerSource)
 {
     IsConnected();
     if (!_isConnected) throw new ApplicationException("Измерительное устройство не подключено");
     _triggerSource = triggerSource;
     uint data = _triggerMode;                                  
     switch (triggerSource)
     {
         case TriggerSources.Generator:
             _triggerThreshold = 0;
             data |= 0x4;                             // Константа синхронизации от генератора
             data |= TriggerFilterCode << 8;         // Фильтр источника синхронизации
             data |= ZeroAdcCode << 16;
             break;
         case TriggerSources.External:
             throw new ApplicationException("Неверный тип источника синхронизации");
         case TriggerSources.Channel1:
         case TriggerSources.Channel2:
         case TriggerSources.Channel3:
         case TriggerSources.Channel4:
             data |= (uint) triggerSource << 3;           // Синхронизация от канала
             data |= 1 << 1;                             // Нарастающий фронт синхроимпульса
             data |= TriggerFilterCode << 8;             // Фильтр источника синхронизации
             data |= (uint) _callibrs[(int) _triggerSource].ToCode(_triggerThreshold) << 16;
             break;
         default:
             throw new ApplicationException("Неверный тип источника синхронизации");
     }
     _protocol.PrepareWriteRequest(TriggerRegister, data);
     _protocol.SendRequest();
 }
 /// <summary>
 /// Учтановить источник синхронизации
 /// </summary>
 /// <param name="triggerSource"></param>
 /// <returns>Успешность операции</returns>
 public abstract void SetTriggerSource(TriggerSources triggerSource);