Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
Need the latest SmartSDR, Power Genius, Tuner Genius and Antenna Genius Software?
SmartSDR v3.8.20 and the SmartSDR v3.8.20 Release Notes
SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
Power Genius XL Utility v3.8.9 and the Power Genius XL Release Notes v3.8.9
Tuner Genius XL Utility v1.2.11 and the Tuner Genius XL Release Notes v1.2.11
Antenna Genius Utility v4.1.8
SmartSDR v3.8.20 and the SmartSDR v3.8.20 Release Notes
SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
Power Genius XL Utility v3.8.9 and the Power Genius XL Release Notes v3.8.9
Tuner Genius XL Utility v1.2.11 and the Tuner Genius XL Release Notes v1.2.11
Antenna Genius Utility v4.1.8
If you are having a problem, please refer to the product documentation or check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
delphi starter edition
Mark Erbaugh
Member ✭✭
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?
0
Answers
-
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!).
0 -
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.0 -
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.
0 -
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.0
-
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 WD5GWY0
-
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 WD5GWY0
-
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.
1 -
John,
I am interested in the API.
73,
Mark0 -
OK, you can get the current API here. Some notes:
The code isn't complete. I wrote it originally to allow my home brew logging program to read/control frequency/mode. It grew to include all the other message events but does not have much in the way of code to send commands TO the radio. I will be adding more code before long, as this is likely to be my Mk2 controller interface.
Obviously the code is supplied on an as-is basis, with no warranties of any sort. All I will say is that it works for me!
The API code comprises four Delphi units:
FlexAPI.pas exposes all events and procedures to the application
FlexTCP.pas contains all the TCP/IP code
FlexUDP.pas contains all the UDP code including discovery
FlexData.pas contains all the variables
FlexAPITemplate.pas is an initial attempt to provide an application template. It should give some ideas how to use the interface.
FlexAPITest is a simple form application that lets you do things with the API and see what happens. Apart from giving a really useful insight into the API's inner workings, it also gives some ideas on application implementation.
Have fun and let me know how you get on.
73, John, G3WGV
0 -
My apologies: you will also need DelphiTTT.pas
This is just a bunch of string handling functions that I wrote many moons ago. I tend to use them as if they were standard Delphi without thinking.
0 -
John I would love to see it!
73
0 -
You're welcome to, Neal, as is anyone else. Please see above for the two links.
1 -
Thank you for Delphi code that allows me have to find out
why the discovery does not support Delphi xe2 pro. As against to avoid the error if SmartSdr not start ,
replace the StrToInt by StrToIntDef ,
and also by StrToFloat StrToFloatDef . 73 . (sorry for my english, thank you to google translate )0 -
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 document0 -
Hi Neal,
The library has moved on considerably! I'll make up an new distro and put the link here shortly.
73, John, G3WGV
0 -
I would love to see a Donate Here button to help contribute to the cost of this!
0 -
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
3 -
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.
2 -
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
0 -
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
0 -
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!0 -
0
-
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
0
Leave a Comment
Categories
- All Categories
- 260 Community Topics
- 2.1K New Ideas
- 538 The Flea Market
- 7.6K Software
- 6K SmartSDR for Windows
- 139 SmartSDR for Maestro and M models
- 368 SmartSDR for Mac
- 242 SmartSDR for iOS
- 226 SmartSDR CAT
- 175 DAX
- 345 SmartSDR API
- 8.8K Radios and Accessories
- 6.9K FLEX-6000 Signature Series
- 44 FLEX-8000 Signature Series
- 859 Maestro
- 45 FlexControl
- 849 FLEX Series (Legacy) Radios
- 807 Genius Products
- 424 Power Genius XL Amplifier
- 280 Tuner Genius XL
- 87 Antenna Genius
- 227 Shack Infrastructure
- 153 Networking
- 409 Remote Operation (SmartLink)
- 130 Contesting
- 640 Peripherals & Station Integration
- 116 Amateur Radio Interests
- 878 Third-Party Software