I’m doing a project where I must display some metadata on screen. I’ve only worked with Milestone for two weeks, but have read a lot on the forum and tried out the SDK as much as I can.
I suspect there are multiple ways of doing it, so I hope to get some guidance here. I’ve taken a look at the AnalyticsOverlay example, where it’s supposed to show the time on screen at regular intervals and was thinking to use that as a base.
Now I need a way of doing this reading at regular intervals and send it to the overlay plugin in a non-blocking resource-friendly way. One source is actively polling a web server, the other uses input from a virtual serial port. The refresh rate should be about 1-2 seconds, and there’s no need to save this metadata at all, it’s sufficient to show it on the live view. Any tips for how to do this with the SDK would be greatly appreciated!
I am afraid that there is not much in the samples to guide in how to best communicate with and retrieve information from your service. On the positive side this means that if you have a preferred way to do this it is open for you to go with this approach.
I hope this answer is a help, please do not hesitate to ask further questions. Perhaps you can tell a bit of background information on the service from which you get the data, if that service already have interfaces you can use this might be the best clue on how to do this best.
I’m reading from an oxygen sensor on a virtual serial port, we are experimenting with using Milestone in a new type of fish farm. I can incorporate the serial reading itself into the plugin. I instantiate the reader, starts it, and it will update a data object I have passed to it every time there is a new reading.
I’ve solved this by simply instantiating my serial port reader from within the plugin itself. I don’t really like to run hardware control methods within a client plugin, but hey, it works. Am now working on expanding on the sample to make methods for choosing ‘line numbers’ on screen for many info channels.