示例#1
0
        private void ProcessConnectionStatus(ref ResponseData data)
        {
            var status = (ConnectionStatus)data.Double1;

            switch (status)
            {
            case ConnectionStatus.Disconnected:
            case ConnectionStatus.Uninitialized:
                Connected = false;
                break;

            case ConnectionStatus.Done:
                Connected = true;
                Resubscribe();
                break;
            }

            if (data.Size1 > 0)
            {
                UserLogin = PInvokeUtility.PtrToStruct <RspUserLoginField>(data.Ptr1);
            }
            _spi.ProcessConnectionStatus(status, UserLogin);
        }
示例#2
0
        private void ProcessQryPosition(ref ResponseData data)
        {
            var field = PInvokeUtility.PtrToStruct <PositionField>(data.Ptr1);

            _spi.ProcessQryPosition(field, Math.Abs(data.Double1) > double.Epsilon);
        }
示例#3
0
        private void ProcessLog(ref ResponseData data)
        {
            var field = PInvokeUtility.PtrToStruct <InternalLogField>(data.Ptr1);

            _spi.ProcessLog(new LogField(field));
        }
示例#4
0
        private void ProcessRtnTrade(ref ResponseData data)
        {
            var field = PInvokeUtility.PtrToStruct <TradeField>(data.Ptr1);

            _spi.ProcessRtnTrade(field);
        }
示例#5
0
        private void ProcessRtnOrder(ref ResponseData data)
        {
            var field = PInvokeUtility.PtrToStruct <OrderField>(data.Ptr1);

            _spi.ProcessRtnOrder(field);
        }
示例#6
0
        private void ProcessDepthMarketData(ref ResponseData data)
        {
            var field = PInvokeUtility.GetDepthMarketData(data.Ptr1);

            _spi.ProcessDepthMarketData(field);
        }
示例#7
0
        private void ProcessQrySettlementInfo(ref ResponseData data)
        {
            var field = PInvokeUtility.GetSettlementInfo(data.Ptr1);

            _spi.ProcessQrySettlementInfo(field, Math.Abs(data.Double1) > double.Epsilon);
        }