First off, I am a Java and Mobile developer just getting my feet wet with Ignition.
I am looking for suggestions on the best way to bridge the gap from a native iOS app to Ignition. Native iOS is necessary as we are getting data from an iOS accessory.
Currently my “map” looks like this:
iOS Accessory <–> Native iOS app with TCP client <–> TCP server (OPC UA?) <–> Ignition
I can make an iOS app communicate with a TCP server written in Java or Python, but I’m not sure where to proceed to hook that into Ignition. Do I need to write a OPC UA module? Is there some baked in functionality I need to know about?
Basically, where should I start, whether in the SDK or in the Designer to implement this functionality?
You can probably go two routes:
-
Write your TCP server in Jython code in Ignition, probably kicking off from a gateway startup script. Depending on the complexity of the server and what you actually need to do, this could get messy.
-
Write a module for Ignition. It probably won’t have anything to do with the UA module. You’ll be able to create a TCP server, implementing/using whatever protocol you need, and have hooks to get to pretty much everything.
I guess the next question is: what data are you receiving from the iOS app and what do you need to do with it?
It’s a barcode scanner, so a key and 6 or 7 associated data points. I’ll probably be processing the data into an easily consumable string on the iOS side. The only thing left to on the Ignition side is to parse the string and update the DB.
It might be easiest on the Ignition side to just throw up a servlet and then POST the barcodes to that servlet from your iOS app.
For the iOS side, AFNetworking is pretty sweet if you’re not into using NSURLConnection.
That looks very helpful? Any chance you can point me in the general direction of the correct apis to talk to a sqltagprovider from a module?
It depends what you mean by ‘talk’ to it. If you want your module to add SQLTags and provide values for them, take a look at the SimpleTagProvider example in the SDK.
Thanks Kevin! Much closer to writing some actual code!