Cloud to Client-side real-time simplicity. Pedo stands for ProEssentials Data Object and is used to simplify producing Internet Aware EXEs and websites...
Server-to-client-EXE (WPF, WinForm, MFC, DLL, ActiveX [Access Excel LabView], VCL [Delphi Builder].) Your EXEs can retrieve and or real-time append/shift data from the cloud.
General reference information can be found at: Pego.PeData.Pedo and ProEssentialsWeb.Pedo
Below are brief explainations of common methods of using a Pedo WebForm within your application.
Using Pedo with a client-side EXE to append new data.
The calling EXE uses the AppendFromURL function to point to a server page to make the request. Depending upon the interface used to create the EXE, there are various AppendFromURL formats...
Interface used to create EXE
|
use client side Function
|
WinForms and WPFs applications
|
Pego.PeData.Pedo.AppendFromUrl(fileNameURL)
|
ActiveX development, IE, Access, Excel, VB6
|
Pego.AppendFromUrl(fileNameURL)
|
SDK/DLL development with VC++ / MFC
|
PEappendfromURL(hPE, szURL)
|
VCL development with Delphi or Builder
|
PEappendfromURL(PEGraph1.hObject, szURL)
|
The fileName URL pointed to is usually an ASPX page such as Webform1.aspx which contains a Pedo asp.net control with its RenderingType property set to BinaryDataStream.
The AppendFromUrl call is used much like AppendYData and other append type properties as discussed in Chapter 6. However, instead of requiring multiple append type calls, AppendFromURL passes all data and types of data in one process/request.
We recommend using the ExtraStringData property to pass a date-time stamp along with the new data. Then use a simple QueryString to pass this date-time stamp back to the server upon next data request. This way, the server logic knows how to send all data currently un-sent to this particular chart.
Refer to our demo project folder PE10WebDemo/StripChart
The demo uses Client-Side EXE to call a Server for new data to Append
Below code inserts a Pedo WebForm control with it's RenderingType set to BinaryDataStream.
WebForm3.aspx
<%@ Page Language="vb" AutoEventWireup="false" Inherits="PE10WebDemo.WebForm3" CodeFile="WebForm3.aspx.vb" %>
<%@ Register TagPrefix="cc1" Namespace="Gigasoft.ProEssentials" Assembly="Gigasoft.ProEssentialsWeb" %>
<cc1:Pedo id="Pedo1" runat="server" RenderingType="BinaryDataStream" ></cc1:Pedo>
|
The Page_Load event sets properties and data within the Pedo control to pass to a desktop app such as our demo projects example 017. Seach our demo projects for "017Tick".
WebForm1.aspx.vb
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim r As System.Random
r = New System.Random
Pedo1.Subsets = 2 ' Preparing data for a chart with 2 subsets
Pedo1.Points = 1 ' Prepare one new piece of data per subset
Pedo1.Y(0, 0) = 5 + (r.NextDouble * 95.0F) ' setting new data for first subset
Pedo1.Y(1, 0) = 5 + (r.NextDouble * 35.5F) ' setting new data for second subset
'setting new data for PointLabels
Pedo1.PointLabels(0) = Now.Hour().ToString + ":" + Now.Minute().ToString + ":" + Now.Second.ToString
End Sub
|
Depending on the demo project you are working with, change example 017 OnTimer/Tick event handler to the following. You will have to adjust the URL to point to the localhost:xxxx port as seen when running our PE10WebDemo.
.NET WinForm or Wpf Example Project: Replace all code within Timer event, to....
Pego1.PeData.Pedo.AppendFromURL("http://localhost:xxxx/StripChart/webform3.aspx")
|
MFC VC Example Project: Replace all code within OnTimer, section 17 with...
PEappendfromURL(m_hPE, TEXT("http://localhost:xxxx/StripChart/webform1.aspx"));
|
First run the PE10WebDemo locally and verify it's running, then Run the Winform or WPF or similar demo project example 017 and the demo will update the chart via the WebForm3 server page.
|