TMS
TMS LCL Cloud Pack
Seamless access to cloud services from Lazarus applications
Also available for:
Tips and Frequently Asked Questions
Using TMS LCL Components for Raspberry Pi
With the recently introduced TMS LCL Cloud Pack and the open-source TMS LCL HW Pack, building small Raspberry Pi based projects is easier than ever. In this example, the code for an appliance is presented that displays the number of visitors on a website on a Raspberry Pi 16x2 LCD backpanel.
This code fetches the page statistics from Google Analytics with the TMS LCL Cloud Pack TMSLCLCloudGAnalytics component
function TForm1.GetRTVisitors: string; var RT: TRealtimeMetricsArray; StartDate, EndDate: string; i: integer; error: string; Res: TGStringArray; begin Result := ‘’; StartDate := ''today''; EndDate := ''today''; SetLength(RT,1); RT[0] := rtActiveUsers; TMSLCLCloudGAnalytics1.RequestData.RealtimeMetrics := RT; // fetches data for the page coupled with Google Analytics ID set via ViewID Error := TMSLCLCloudGAnalytics1.GetData(TMSLCLCloudGAnalytics1.App.ViewID); If Error = ‘’ then begin Res := TMSLCLCloudGAnalytics1.Data.Data[0]; Result := Res[0]; end; end;
procedure TForm1.ButtonClick1 (Sender: TObject); begin TMSLCLAdaDispl16x2.Init; TMSLCLCloudGAnalytics1.Connect; end;
procedure TForm1.TMSLCLCloudGAnalytics1Connected(Sender: TObject); var s: string; begin s := GetRTVisitors; TMSLCLAdaDispl16x2.DrawText(‘Visitors:’ +s); end;
TMS
Buy now
TMS LCL Cloud Pack
Compatibility
- , Demo, Lazarus/FPC
Licensing
- Licensing FAQ
- License for commercial use: Single developer license, Site license
- Includes full source code
- Ask questions to our engineers related to purchased product via Support Center