Example #1
0
		public static void WriteBarArray(this MemoryBuffer buffer, LrpServer.Net.LrpBar[] arg)
		{
			buffer.WriteInt32(arg.Length);
			foreach(var element in arg)
			{
				buffer.WriteBar(element);
			}
		}
Example #2
0
		public static void WriteBar(this MemoryBuffer buffer, LrpServer.Net.LrpBar arg)
		{
			buffer.WriteDouble(arg.Open);
			buffer.WriteDouble(arg.Close);
			buffer.WriteDouble(arg.High);
			buffer.WriteDouble(arg.Low);
			buffer.WriteDouble(arg.Volume);
			buffer.WriteTime(arg.From);
		}
Example #3
0
		public static void WriteDataHistoryRequest(this MemoryBuffer buffer, LrpServer.Net.LrpDataHistoryRequest arg)
		{
			buffer.WriteAString(arg.Symbol);
			buffer.WriteTime(arg.Time);
			buffer.WriteInt32(arg.BarsNumber);
			buffer.WriteInt32(arg.PriceType);
			buffer.WriteAString(arg.GraphPeriod);
			buffer.WriteInt32(arg.ReportType);
			buffer.WriteInt32(arg.GraphType);
		}
Example #4
0
		public SoftFX.Lrp.LPtr Constructor(LrpServer.Net.LrpParams parameters)
		{
			using(MemoryBuffer buffer = m_client.Create())
			{
				buffer.WriteLrpParams(parameters);

				int _status = m_client.Invoke(2, 0, buffer);
				TypesSerializer.Throw(_status, buffer);

				var _result = buffer.ReadLocalPointer();
				return _result;
			}
		}
Example #5
0
		public static void WriteQuoteEntry(this MemoryBuffer buffer, LrpServer.Net.LrpQuoteEntry arg)
		{
			buffer.WriteDouble(arg.Price);
			buffer.WriteDouble(arg.Volume);
		}
Example #6
0
		public static void WriteCurrencyInfo(this MemoryBuffer buffer, LrpServer.Net.LrpCurrencyInfo arg)
		{
			buffer.WriteAString(arg.Name);
			buffer.WriteAString(arg.Description);
			buffer.WriteInt32(arg.SortOrder);
			buffer.WriteInt32(arg.Precision);
		}
Example #7
0
		public static void WriteCurrencyInfoArray(this MemoryBuffer buffer, LrpServer.Net.LrpCurrencyInfo[] arg)
		{
			buffer.WriteInt32(arg.Length);
			foreach(var element in arg)
			{
				buffer.WriteCurrencyInfo(element);
			}
		}
Example #8
0
		public void SendSessionInfo(long id, string requestId, LrpServer.Net.LrpSessionInfo sessionInfo)
		{
			this.Instance.SendSessionInfo(this.Handle, id, requestId, sessionInfo);
		}
Example #9
0
		public static void WriteSymbolInfo(this MemoryBuffer buffer, LrpServer.Net.LrpSymbolInfo arg)
		{
			buffer.WriteAString(arg.Name);
			buffer.WriteAString(arg.Currency);
			buffer.WriteAString(arg.SettlementCurrency);
			buffer.WriteDouble(arg.ContractMultiplier);
			buffer.WriteInt32(arg.Precision);
			buffer.WriteDouble(arg.RoundLot);
			buffer.WriteDouble(arg.MinTradeVolume);
			buffer.WriteDouble(arg.MaxTradeVolume);
			buffer.WriteDouble(arg.TradeVolumeStep);
			buffer.WriteProfitCalcMode(arg.ProfitCalcMode);
			buffer.WriteMarginCalcMode(arg.MarginCalcMode);
			buffer.WriteDouble(arg.MarginHedge);
			buffer.WriteInt32(arg.MarginFactor);
			buffer.WriteNullDouble(arg.MarginFactorFractional);
			buffer.WriteInt32(arg.Color);
			buffer.WriteCommissionType(arg.CommissionType);
			buffer.WriteCommissionChargeType(arg.CommissionChargeType);
			buffer.WriteCommissionChargeMethod(arg.CommissionChargeMethod);
			buffer.WriteDouble(arg.LimitsCommission);
			buffer.WriteDouble(arg.Commission);
			buffer.WriteNullDouble(arg.SwapSizeShort);
			buffer.WriteNullDouble(arg.SwapSizeLong);
			buffer.WriteBoolean(arg.IsTradeEnabled);
			buffer.WriteInt32(arg.GroupSortOrder);
			buffer.WriteInt32(arg.SortOrder);
			buffer.WriteInt32(arg.CurrencySortOrder);
			buffer.WriteInt32(arg.SettlementCurrencySortOrder);
			buffer.WriteInt32(arg.CurrencyPrecision);
			buffer.WriteInt32(arg.SettlementCurrencyPrecision);
		}
Example #10
0
		public static void WriteMarginCalcMode(this MemoryBuffer buffer, LrpServer.Net.LrpMarginCalcMode arg)
		{
			buffer.WriteInt32((int)arg);
		}
Example #11
0
		public static void WriteCommissionType(this MemoryBuffer buffer, LrpServer.Net.LrpCommissionType arg)
		{
			buffer.WriteInt32((int)arg);
		}
Example #12
0
		public static void WriteDataHistoryResponse(this MemoryBuffer buffer, LrpServer.Net.LrpDataHistoryResponse arg)
		{
			buffer.WriteTime(arg.FromAll);
			buffer.WriteTime(arg.ToAll);
			buffer.WriteTime(arg.From);
			buffer.WriteTime(arg.To);
			buffer.WriteAString(arg.LastTickId);
			buffer.WriteBarArray(arg.Bars);
			buffer.WriteAStringArray(arg.Files);
		}
Example #13
0
		public static void WriteLrpParams(this MemoryBuffer buffer, LrpServer.Net.LrpParams arg)
		{
			buffer.WriteBoolean(arg.EnableCodec);
			buffer.WriteBoolean(arg.ValidateCodec);
			buffer.WriteInt32(arg.ThreadsNumber);
			buffer.WriteInt32(arg.MessagesNumberLimit);
			buffer.WriteInt32(arg.MessagesSizeLimit);
			buffer.WriteInt32(arg.HandshakeTimeout);
			buffer.WriteInt32(arg.HeartbeatTimeout);
			buffer.WriteAString(arg.LogPath);
		}
Example #14
0
		public void SendCurrenciesInfo(long id, string requestId, LrpServer.Net.LrpCurrencyInfo[] currencies)
		{
			this.Instance.SendCurrenciesInfo(this.Handle, id, requestId, currencies);
		}
Example #15
0
		public static void WriteQuoteEntryArray(this MemoryBuffer buffer, LrpServer.Net.LrpQuoteEntry[] arg)
		{
			buffer.WriteInt32(arg.Length);
			foreach(var element in arg)
			{
				buffer.WriteQuoteEntry(element);
			}
		}
Example #16
0
		public void SendSymbolsInfo(long id, string requestId, LrpServer.Net.LrpSymbolInfo[] symbols)
		{
			this.Instance.SendSymbolsInfo(this.Handle, id, requestId, symbols);
		}
Example #17
0
		public void SendNotification(long id, LrpServer.Net.LrpNotification notification)
		{
			this.Instance.SendNotification(this.Handle, id, notification);
		}
Example #18
0
		public void SendFileChunk(long id, string requestId, LrpServer.Net.LrpFileChunk chunk)
		{
			this.Instance.SendFileChunk(this.Handle, id, requestId, chunk);
		}
Example #19
0
		public void SendDataHistoryResponse(long id, string requestId, LrpServer.Net.LrpDataHistoryResponse response)
		{
			this.Instance.SendDataHistoryResponse(this.Handle, id, requestId, response);
		}
Example #20
0
		public void SendQuote(long id, LrpServer.Net.LrpQuote quote)
		{
			this.Instance.SendQuote(this.Handle, id, quote);
		}
Example #21
0
		public static void WriteQuote(this MemoryBuffer buffer, LrpServer.Net.LrpQuote arg)
		{
			buffer.WriteAString(arg.Symbol);
			buffer.WriteTime(arg.CreatingTime);
			buffer.WriteQuoteEntryArray(arg.Bids);
			buffer.WriteQuoteEntryArray(arg.Asks);
			buffer.WriteAString(arg.Id);
		}
Example #22
0
		public LocalChannelsPoolProxy(LocalClient client, LrpServer.Net.LrpParams parameters)
		{
			this.Instance = new LocalChannelsPoolRaw(client);
			this.Handle = this.Instance.Constructor(parameters);
		}
Example #23
0
		public static void WriteFileChunk(this MemoryBuffer buffer, LrpServer.Net.LrpFileChunk arg)
		{
			buffer.WriteInt32(arg.ChunksNumber);
			buffer.WriteInt32(arg.FileSize);
			buffer.WriteAString(arg.FileName);
			buffer.WriteUInt8Array(arg.Data);
		}
Example #24
0
		public static void WriteNotificationType(this MemoryBuffer buffer, LrpServer.Net.LrpNotificationType arg)
		{
			buffer.WriteInt32((int)arg);
		}
Example #25
0
		public static void WriteNotification(this MemoryBuffer buffer, LrpServer.Net.LrpNotification arg)
		{
			buffer.WriteSeverity(arg.Severity);
			buffer.WriteNotificationType(arg.Type);
			buffer.WriteAString(arg.Text);
			buffer.WriteDouble(arg.Balance);
			buffer.WriteDouble(arg.TransactionAmount);
			buffer.WriteAString(arg.TransactionCurrency);
		}
Example #26
0
		public static void WriteSeverity(this MemoryBuffer buffer, LrpServer.Net.LrpSeverity arg)
		{
			buffer.WriteInt32((int)arg);
		}
Example #27
0
		public static void WriteSessionStatus(this MemoryBuffer buffer, LrpServer.Net.LrpSessionStatus arg)
		{
			buffer.WriteInt32((int)arg);
		}
Example #28
0
		public static void WriteLrpSessionInfo(this MemoryBuffer buffer, LrpServer.Net.LrpSessionInfo arg)
		{
			buffer.WriteAString(arg.TradingSessionId);
			buffer.WriteSessionStatus(arg.Status);
			buffer.WriteInt32(arg.ServerTimeZoneOffset);
			buffer.WriteAString(arg.PlatformName);
			buffer.WriteAString(arg.PlatformCompany);
			buffer.WriteTime(arg.StartTime);
			buffer.WriteTime(arg.OpenTime);
			buffer.WriteTime(arg.CloseTime);
			buffer.WriteTime(arg.EndTime);
		}
Example #29
0
		public static void WriteCommissionChargeMethod(this MemoryBuffer buffer, LrpServer.Net.LrpCommissionChargeMethod arg)
		{
			buffer.WriteInt32((int)arg);
		}
Example #30
0
		public void SendNotification(SoftFX.Lrp.LPtr handle, long id, LrpServer.Net.LrpNotification notification)
		{
			using(MemoryBuffer buffer = m_client.Create())
			{
				buffer.WriteLocalPointer(handle);
				buffer.WriteInt64(id);
				buffer.WriteNotification(notification);

				int _status = m_client.Invoke(1, 16, buffer);
				TypesSerializer.Throw(_status, buffer);

			}
		}