Пример #1
0
 public DailyData(int inDate)
 {
     DateStamp      = inDate;
     FirstTimeIndex = 0; LastTimeIndex = -1;
     status         = SignalStatus.New;
     tickData       = new List <TickData>();
 }
        public override SignalStatus SendToChannel(ChannelDbRecord channel, SignalDbRecord signal)
        {
            SignalStatus status = new SignalStatus
            {
                ChannelType = channel.Type,
                Code        = StatusCode.Success,
                Message     = "Success"
            };

            try
            {
                String lambdaName = $"{Config.ChannelPublisherPrefix}-{channel.Type}";
                Logger.Info($"Sending Signal To {channel.Type} - {channel.Name} ({lambdaName})");

                ChannelRequest request = new ChannelRequest
                {
                    Id      = signal.Id,
                    Signal  = signal.Signal,
                    Channel = channel
                };
                string requestStr = JsonTools.Serialize(request);
                Logger.Info(requestStr);
                InvokeResponse response = AWSUtilities.CallLambdaMethod(Client, lambdaName, requestStr);
            }
            catch (Exception e)
            {
                status.Code    = StatusCode.Failure;
                status.Message = e.Message;
            }

            return(status);
        }
Пример #3
0
        void GetSignalStatus(object sender, SapSignalNotifyEventArgs argsSignal)
        {
            SignalStatus?.Invoke(new SignalNotifyEventArgs(argsSignal));
            ////GrabDemoDlg GrabDlg = argsSignal.Context as GrabDemoDlg;
            //SapAcquisition.AcqSignalStatus signalStatus = argsSignal.SignalStatus;

            //GrabDlg.m_IsSignalDetected = (signalStatus != SapAcquisition.AcqSignalStatus.None);
            //if (GrabDlg.m_IsSignalDetected == false)
            //    GrabDlg.StatusLabelInfo.Text = "Online... No camera signal detected";
            //else GrabDlg.StatusLabelInfo.Text = "Online... Camera signal detected";
        }
Пример #4
0
 public Signal(DateTime datetime, SignalType type, SignalSide side, double qty, double strategyPrice, Instrument instrument, string text)
 {
     this.fDateTime      = datetime;
     this.fType          = type;
     this.fSide          = side;
     this.fQty           = qty;
     this.fStrategyPrice = strategyPrice;
     this.fInstrument    = instrument;
     this.fPrice         = this.fInstrument.Price();
     this.fTimeInForce   = TimeInForce.GTC;
     this.fText          = text;
     this.fStrategy      = null;
     this.fStopPrice     = 0.0;
     this.fLimitPrice    = 0.0;
     this.fStatus        = SignalStatus.New;
 }
 public void SetStatus(Signal signal, SignalStatus status)
 {
     signal.Status = status;
 }
Пример #6
0
 public Signal(int id)
 {
     this.Id     = id;
     this.Status = SignalStatus.Green;
 }
Пример #7
0
 private static extern DVBError CDVBFrontend_GetState( IntPtr pData, out bool locked, out SignalStatus signal, out LockState state );
Пример #8
0
 public void Update(SignalStatus status)
 {
     LastUpdate = status.LastUpdate;
     State      = status.State;
     Value      = status.Value;
 }