delphi starter edition

  • 1
  • Question
  • Updated 2 years ago
  • Answered
I just noticed that Embarcadero has a Delphi Code Camp and free Delphi Starter Edition available through September 9. I used to program in older versions of Delphi and found it very easy to use. Is it possible to call the FlexLib API from Delphi?
Photo of Mark Erbaugh

Mark Erbaugh

  • 384 Posts
  • 34 Reply Likes

Posted 2 years ago

  • 1
Photo of Neal - K3NC

Neal - K3NC, Elmer

  • 438 Posts
  • 130 Reply Likes
It is possible to call a dot net library from Delphi but you will find it much easier to bypass it and talk directly to the radio (I am really sure!).
Photo of Mark Erbaugh

Mark Erbaugh

  • 384 Posts
  • 34 Reply Likes
Neal,

Thanks for the reply and the encouragement to talk directly to the radio. I would think it would be possible to encapsulate the radio interface into a Delphi component that would make it easy to develop custom applications. Years ago, I developed a Delphi component that encapsulated the interface to the TenTec Pegasus and wrote an article about it that was published in QEX. Ironically, it was the same issue (September/October 2002) with Gerald's Software-Defined Radio for the Masses (part 2) that got me interested in SDR.
Photo of Neal - K3NC

Neal - K3NC, Elmer

  • 438 Posts
  • 130 Reply Likes
Thats amazing! If I had more time I would do the same thing. I have never done component development but just having a libarary would be a big step up. My main programming language is Delphi and the new version is killer. It can do Android/IoS/Mac/PC development with its great development environment. Its expensive but I have felt it worthwhile.
Photo of Mark Erbaugh

Mark Erbaugh

  • 384 Posts
  • 34 Reply Likes
Yes, Delphi has gotten pricey. I'm no longer doing professional software development, so I stopped upgrading Delphi back at Delphi 8. The Starter edition only does Windows 32 development, but should work for my playing around.
Photo of James Whiteway

James Whiteway

  • 877 Posts
  • 193 Reply Likes
You can use the ethernet api to talk to the radio. It's more work, but doable. That's what William did when he created his Android app. I don't know if Delphi can use dll's created by other languages.
James
WD5GWY
Photo of James Whiteway

James Whiteway

  • 877 Posts
  • 193 Reply Likes
Did a quick Google search.on using dll's created with C# from Delphi. Got a ton of hits. Looks like it can be done. Some data types might require some work arounds. But, on the surface, I'd say.it can be done.
Good luck!
James
WD5GWY
Photo of John G3WGV

John G3WGV

  • 187 Posts
  • 35 Reply Likes
I've written a Delphi-based API that talks directly to the radio. It's written with Delphi XE7 but I don't think there's anything in the code that requires more than D6 apart from my use of ansichar and so on as a result of the later versions of Delphi supporting unicode. Easily changed.

I didn't write it as a component, although it could be converted fairly easily I think. It's just a set of units with an interface unit that contains all the external interfaces. It's still in early development but it handles everything that the radio sends, both TCP and UDP, turning each transaction into an event that can be hooked by the application. It doesn't have full support yet for sending commands TO the radio but that's the easy bit.

I'm only an amateur software developer, so my code is quite simple... but it does work! If anyone's interested in it I'm happy to make the source available.
Photo of Neal - K3NC

Neal - K3NC, Elmer

  • 438 Posts
  • 130 Reply Likes
John, do you have any update on your library or is the link above current?

73 es thanks so much for this and the API document
Photo of John G3WGV

John G3WGV

  • 187 Posts
  • 35 Reply Likes
Hi Neal,

The library has moved on considerably! I'll make up an new distro and put the link here shortly.

73, John, G3WGV
Photo of Neal - K3NC

Neal - K3NC, Elmer

  • 438 Posts
  • 130 Reply Likes
I would love to see a Donate Here button to help contribute to the cost of this!
Photo of John G3WGV

John G3WGV

  • 187 Posts
  • 35 Reply Likes
I have uploaded the latest version of the G3WGV Delphi Flex API library to my Dropbox.

This code is still under quite extensive development and changes most days as I find new features that I want to play with. I also keep on finding bugs, though fewer of those these days I am pleased to say. It is the basis of my Mk II FlexRadio Controller Project and it works a treat in that.

I don't want and will not accept donations for this software. It is my pleasure to donate it to the Flex community in the spirit of amateur radio. If so inclined you can send me the occasional attaboy in the form of a like should you find the code interesting or useful.

Enjoy :-)

73, John, G3WGV
Photo of John G3WGV

John G3WGV

  • 187 Posts
  • 35 Reply Likes
As an example of how to use the Delphi Flex API library, I have uploaded the project source for the Flex API Test Harness that I have described elsewhere. This is a really useful tool for discovering how the API works and it uses a good number of the library functions.
Photo of Mark WS7M

Mark WS7M

  • 386 Posts
  • 113 Reply Likes
Hi All,

I was a Delphi programmer for 23 years starting back with Turbo Pascal 1.0 and ending with XE7.

Delphi is a cool language and the fact that it mostly compiles to a single EXE has always been attractive.

My current job has me working in C# which is also a nice language and quite frankly if you stay with WinForms it is very Delphi like in how you do things.

I'm not selling anyone anything but the very fact that VS community edition is completely free makes purchasing Delphi a tough choice.  I do own XE7 but it cost a lot and I felt support was almost non-existent on critical path issues.

Using the Ethernet API is really quite easy.

Mark WS7M
Photo of John G3WGV

John G3WGV

  • 187 Posts
  • 35 Reply Likes
I think that if I didn't have a similar Pascal/Delphi lineage to yours, Mark, I would probably have adopted C long ago. I only programmed professionally for a few years back in the early 70s and that was mainly in assembler and Algol-like languages, so Turbo Pascal was the obvious language for me. As an amateur coder, I've stuck with it right the way through to XE7 and it still does what I want. At the moment I have no plans to upgrade beyond XE7.

I do also use VS with C, for programming on the Arduino. I'm happy enough programming in C but after so many years I feel more at home with Delphi. I like the extensive debugging facilities and the considerably faster compilation speeds as well. And, of course, there is no commercial imperative to make me change!

You're right though, Delphi is expensive.

73, John, G3WGV
Photo of Mark WS7M

Mark WS7M

  • 386 Posts
  • 113 Reply Likes
Hi John,  Well I worked for a custom system integrator for most of those 23 years.  The owner of that company was a Delphi fan.  We did C, C++ for many projects and I am comfortable with that language and well pretty much every language.

I long ago came to the point in my development career where I no longer care much about the language itself but rather does it and the IDE help me get the job done.  This is my current grip with C++ which I like quite a lot but I still need to define objects in 2 files.  To me this is extra work. 

If I was working for a defense contractor and needed to publish interfaces that would allow others to use my code but not modify it then sure it is fine.  C# has solved this with the interfaces which yes, can require a separate file but you don't really need to use them which for many of my tasks is a good thing.

My fond story about Turbo Pascal 1.0 is this.  My boss at the time had written a meeting management program in Pascal using DRC Pascal MT+.   This product was so full of bugs it was not funny.  We at one point got one of the developers at DRC to send us their current issues list.  It was close to 100 double sided pages of things like:

  function Trunc( v:real ) : real;

Truncates the decimal part of a real number returning the whole number part.  Bug: this function is not currently working.  Work around:  Do not use this function

I mean virtually everything in the library ended up with "Do not use this function" so my boss in his meeting manager had written his own versions of many things.

In the back of Byte magazine we saw an add for Turbo Pascal for $24.95.  Pascal MT+ was close to $350.  On a whim he ordered it.   A few days later it came.  As you might remember it was a built in editor as well.

My boss loaded up his meeting manager, it took a little searching to reference the other pascal files.  Then we looked for the compile button.  It was something like F9 or something.  I can't remember.    Anyway we were huddling around the screen, my boss it F9 and the screen blinked and came back to the editor. 

Our first thought was ok it crash, it didn't compile, or something.   We hit the compile button again.  Another blink and back to the editor.  We both figured it was a joke and didn't work.

We exited to DOS and noticed there was a meetmgr.com file sitting in the directory.  It was like 25k in size.   Curious we ran it and up came my boss's meeting manager.  He keyboarded through the various functions and everything was there and just working.

We loaded up MT+ and compiled the meeting manager and it took something like 3 minutes with the final linking phase.  The compile under TP was less than 2 seconds and it was so fast that the IDE didn't put up any progress indicators or give us a complete message!

Later as we used TP with bigger projects it would give us progress indicators but in my experience nothing compiled that fast.  Plus just about every single function in the library worked.

It was the selling point for us in moving down the "Turbo" line of products.  When Delphi 1.0 came out we had a big project that the client company wanted in C.  We sold them on letting us build it in Delphi.   There was much discussion about C versus Pascal, etc.  In the end we were told when the product was done that it was the first piece of software they'd ever had that didn't crash.  It controlled a stage and a camera on a microscope.  It caused their department to switch to C++ builder.

Anyway there is much about Delphi I like.  There is also a lot about C# I like.  But again I don't really care and will develop in whatever makes the most sense for the project at hand.
Photo of John G3WGV

John G3WGV

  • 187 Posts
  • 35 Reply Likes
Hi Mark,

Love the story about TP1 and compile speeds. Yes, it was blisteringly fast and produced very tight code. XE7 is still pretty quick but, like everything else these days one can hardly call the code it produces compact!

I developed my Mk 1 controller entirely in C for the Arduino. The standard Arduino DevEnv is a very basic IDE and it is as slow as a slow thing in a slow place on a slow Monday. Something like 45 seconds to compile the controller code. I moved the DevEnv across to Visual Micro under VS and that speeded things up a bit but it still takes around 25 seconds. Then, of course, it has to be uploaded to the Arduino target.

Meanwhile, my Mk II controller, which is written in XE7 and which has much more code compiles, links and runs on the same machine in two seconds or less!

I spent the few years I was programming professionally working on mission critical air traffic control systems, doing real time stuff like radar data processing. On the machines of the era we could ill afford sloppy code, from both a memory and real time performance point of view. Much was written in IBM assembler as a result but where we did use high level code it was in a strange Algol-derived language called JOVIAL. Looking back on it, it was a pretty horrid language but it produced tight code and for most part it didn't give us too many nasty surprises.

Anyway, apropos of my controller project, it is what it is. I wrote the code for my own use and it does that just fine. If anyone else can use it or glean useful insight from it in other ways then that is icing on the cake!

73, John, G3WGV
Photo of Neal - K3NC

Neal - K3NC, Elmer

  • 438 Posts
  • 130 Reply Likes
I have been a long-time subscriber but the purchase of Embarcadero by Idera was the last step for me. I bought the Remobjects Oxygene package which offers a very modern Object Pascal implementation for the dot net framework and it is fantastic. I hope that Delphi incorporates the langage enhancements as they really speed up development!

Meanwhile I am very appreciative of the hard work John has done for a Delphi library!