NetworkReceiver.java #131
Closed
julianblanco
started this conversation in
General
Replies: 2 comments 1 reply
-
Hi Julian,
There is no completely standard way of doing this, but it is relatively easy to do by writing a bespoke acquisition plugin module to receive the UDP packets and then insert them into PAMGuard in the correct way.
Anyone capable of writing code to output UDP packets should be able to write the small java module required. Once it's written, you just drop a jar file you've created into your PAMGUard installation plugin folders and the additional functionality will be added to the existing sound acquisition module.
You start with a subclass of DaqSystemInterface, which will include a reference to the class that does the work, which will be a subclass of DaqSystem. https://sourceforge.net/p/pamguard/svn/HEAD/tree/PamguardPlugins/EmptyDAQPlugin/
There isn't an example on Github - I will try to rectify this, but there is one on the old sourceforge site at https://sourceforge.net/p/pamguard/svn/HEAD/tree/PamguardPlugins/EmptyDAQPlugin/ you should look at, and also at https://sourceforge.net/p/pamguard/svn/HEAD/tree/PamguardPlugins/RTsysDaq/src/ which is an empty shell I wrote for RTSys a few years ago into which they added appropriate code for UDP or TCP packets from their device. https://sourceforge.net/p/pamguard/svn/HEAD/tree/PamguardPlugins/INFN_Daq/ is similar.
Generally I develop in Eclipse: make sure you have a working PAMGUard in your workspace, then start a new project for your plugin. Add the pamguard project to the classpath of the development project and copy over the ACquisitionControl class, explicitly adding you new DaqSystem. You can then debug easily from Eclipse (and into PAMGuard if required). Once it's all working, export a jar without the modified AcquisitionControl and put it into your plugins folder.
I disapprove of dropped packets and tend to use TCP instead of UDP, but hey, that's up to you.
There is a bit more information on plugins at https://www.pamguard.org/66_CreatingExternalPlug-ins.html, though this is orientated towards modules rather than daq system. Looking at the examples is your best bet. If you want an example of
Happy to help (though not write it for you).
Douglas.
From: Julian Blanco ***@***.***>
Sent: Thursday, March 14, 2024 4:06 AM
To: PAMGuard/PAMGuard ***@***.***>
Cc: Douglas Gillespie ***@***.***>; Mention ***@***.***>
Subject: {Disarmed} [PAMGuard/PAMGuard] NetworkReceiver.java (Discussion #131)
Hi there!
I was wondering if someone could point me in the right direction on getting in audio via the network receiver.
Maybe @douggillespie<https://github.com/douggillespie> ?
Goal is to point a stream of UDP packets in the right format and have PAMGuard display a spectrogram. Gaps in data with dropped packets are ok.
-
Reply to this email directly, view it on GitHub<#131>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AMCS4PV4IBGEPBXQHEBOEW3YYEOY7AVCNFSM6AAAAABEVK2EOGVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWGM3TANBRGA>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
[ { ***@***.***": "http://schema.org<http://schema.org/>", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#131", "url": "#131", "name": "View Discussion" }, "description": "View this Discussion on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com<https://github.com/>" } } ]
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Disregard. always when you go to ask someone you figure it out yourself. I left public String getUnitName() as returning null from the autogeneration. Thanks again for the help |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there!
I was wondering if someone could point me in the right direction on getting in audio via the network receiver.
Maybe @douggillespie ?
Goal is to point a stream of UDP packets in the right format and have PAMGuard display a spectrogram. Gaps in data with dropped packets are ok.
Beta Was this translation helpful? Give feedback.
All reactions