Elements RTL

Hello,

I am starting to dig into Elements and the Elements RTL for the first time. I’m interested in doing cross-platform application development for Win32/64, Android, Mac OS X, and iOS. Currently I’m using Delphi 10.2.3 for this.

All of my applications require the ability to communicate with scale hardware and related devices (hid card readers, printers, and so on). Typically these devices are plugged in via serial Ethernet adapters.

While reviewing the documentation for the Elements RTL online I came across an http client but no mention of a TCP/IP client. This seems odd to me as the http client would be using TCP/IP to communicate to the web server. Why would you create an http client without first having a TCP/IP client?

Also, the Internet Pack git repository mentions that it is no longer just for .NET and is part of the Elements RTL but I see no mention of this in the Elements RTL documentation.

Is the Internet Pack now in the Elements RTL?
Or do I need to install and build that separately?
Which components work for which platforms?

Thank you,
Brian Wheatley

Brian,

in general, Internet Pack is the way to go for this, if you need flexible TCP/IP connectivity of any level. The cross-platform-pport is early days, but should be usable; @Diego_Navarro will have more details, but all there basic components that are in the main library should work across all platforms. For your purpose, you probably won’t need any of the protocol implementations anyways, but want to work on the lower level base TcpClient and (possibly) TcpServer implementations — essentially implementing your own higher-level protocol component for your hardware.

I can see how one would think. But RTL2’s HTTP class encapsulates each platform’s native HTTP components (eg NSUrlConnection, System.Web, etc). That’s why it’s proving HTTP support, but no common access to the lower level.

While eventually it will be rolled into Elements RTL in some shape or form, it’s a separate library and (for now) you’ll need to manually grab it off github and build it from there.

hth,
marc

Hello again,

I downloaded the repository then discovered that there is already a version in my RemObjects folder under program files. My guess is this is from installing the Remoting SDK. The bin folder is empty, however and the Echoes project will not build due to an error.

I figured that I’d try to build the latest version that I downloaded from GitHub and it’s even worse…

Severity Code Description Project File Line Suppression State
**Error (E319) No overloaded constructor with 2 parameters for type “ArgumentException” RemObjects.InternetPack.Island.Windows C:\Program Files (x86)\RemObjects Software\internetpack-master\internetpack-master\Source\Mime\Decode\QuotedPrintable.cs 278 **
**Error (E510) No static member “HexStringToUInt32” on type “Convert”, did you mean “HexStringToInt32”? RemObjects.InternetPack.Echoes C:\Program Files (x86)\RemObjects Software\internetpack-master\internetpack-master\Source\Http\HttpRequestResponse.cs 320 **
**Error (E510) No static member “HexStringToUInt32” on type “Convert”, did you mean “HexStringToInt32”? RemObjects.InternetPack.Island.Windows C:\Program Files (x86)\RemObjects Software\internetpack-master\internetpack-master\Source\Http\HttpRequestResponse.cs 320 **
**Error (E319) No overloaded constructor with 2 parameters for type “ArgumentException” RemObjects.InternetPack.Island.Windows C:\Program Files (x86)\RemObjects Software\internetpack-master\internetpack-master\Source\Mime\Decode\QuotedPrintable.cs 252 **
**Error (E319) No overloaded constructor with 2 parameters for type “ArgumentException” RemObjects.InternetPack.Island.Windows C:\Program Files (x86)\RemObjects Software\internetpack-master\internetpack-master\Source\Mime\Decode\QuotedPrintable.cs 256 **
**Error (E319) No overloaded constructor with 2 parameters for type “ArgumentException” RemObjects.InternetPack.Island.Windows C:\Program Files (x86)\RemObjects Software\internetpack-master\internetpack-master\Source\Mime\Decode\QuotedPrintable.cs 282 **
**Error (E319) No overloaded constructor with 2 parameters for type “ArgumentException” RemObjects.InternetPack.Island.Windows C:\Program Files (x86)\RemObjects Software\internetpack-master\internetpack-master\Source\Mime\Decode\Rfc2822DateTime.cs 54 **
**Error (E319) No overloaded constructor with 2 parameters for type “ArgumentException” RemObjects.InternetPack.Island.Windows C:\Program Files (x86)\RemObjects Software\internetpack-master\internetpack-master\Source\SmtpClient.cs 80 **
**Error (E319) No overloaded constructor with 2 parameters for type “ArgumentException” RemObjects.InternetPack.Island.Windows C:\Program Files (x86)\RemObjects Software\internetpack-master\internetpack-master\Source\SmtpClient.cs 83 **
Warning (W37) Member “static Boolean Socket.get SupportsIPv4” is obsolete: SupportsIPv4 is obsoleted for this type, please use OSSupportsIPv4 instead. http://go.microsoft.com/fwlink/?linkid=14202 RemObjects.InternetPack.Echoes C:\Program Files (x86)\RemObjects Software\internetpack-master\internetpack-master\Source\Server.cs 20

The “See Also” section of the repository lists “Internet Pack on docs.elementscompiler.com” but clicking on this link takes me to the Delphi RTL documentation.

The sample projects also all appear to be “legacy” projects (i.e. Visual Studio / C# / .NET).

Brian Wheatley

That’s the old, .NET-onklty version though. That was “deprecated” ages ago, an d ROSDK no longer uses it (it has it’s own copy of the handful classes it needed), but still ships it, as to not break old projects that still reference the .dll.

what was the error for that?

I’ll have tubist checked, this is the Island platform that fails to compile, it seems. which platform(s) do you most urgently need?

Oops, will fix,

yeah, the samples have not been ported yet, that said, they should work with ROC# for Echoes, and the principles shown there should apply for the other platforms…

I downloaded the latest elements with Visual Studio (10.0.0.2287) and Internet Pack on my physical box.
After removing all of the non-Windows platforms I see that the Echoes version now builds correctly. The Island.Windows platform reports E126 Property needs and expression for read or write on line 181 of the BaseClasses.cs file.

The primary functionality that I would like to achieve is TcpClient and TcpServer for Echoes / Island.Windows. The only other platform that we actively develop for at the moment is Android. That would be nice to have but not critical.

Brian

Yeah, I saw that too. that needs proper implementation, thats a new compiler error that points out legitimately wrong code (an indexer property with implied getter/setter) that the compiler previously didn’t notice. We’ll make sure to get that fixed asap. (workaround might be to just add an empty getter/setter, to get the code to compile), locally).

I just tried commenting out that line and it compiles…

1 Like