Compare commits

...

314 Commits

Author SHA1 Message Date
Denny
81b8f5a423 Updates build to version 0.4.0 alpha 4 2018-09-12 06:23:09 -04:00
Denny Sheirer
bf186a7408 Merge pull request #414 from DSheirer/405-airspy-tuner-waterfall-freeze
405 Airspy Spectrum/Waterfall Freezes
2018-09-12 06:20:36 -04:00
Denny
43fc326f93 Resolves #405
Adds 500 ms delay to initial registering for samples from all tuners to
feed the spectral display/waterfall.  The existing approach of immediately
registering for samples was causing the airspy tuner to lockup
aperiodically.  Investigation via debugger didn't show any application
thread locks ... usb master processor was continuing to service libusb
timeouts.  Unable to debug internal airspy processes.  Adding the delay
to startup seems to be a usable solution.
2018-09-12 06:19:11 -04:00
Denny Sheirer
7cdbb75b42 Merge pull request #413 from DSheirer/375-poor-p25-decode-performance
375 P25 Decode Performance
2018-09-10 04:22:40 -04:00
Denny
96a56cab68 Resolves #375.
Reverts PLL gain values to version 0.3.4beta2 values to restore P25
decoder performance.

This change in conjuction with recent channel sample rate change should
restore P25 channel decoding to comparable levels from 0.3.4b2.
2018-09-09 09:55:40 -04:00
Denny Sheirer
29d4b36cf7 Merge pull request #412 from DSheirer/411-variable-channel-sample-rates
#411 Update Tuner Source Manager to provide variable sample rate channels
2018-09-09 09:50:11 -04:00
Denny
b15a3e59a0 Resolves #411
Updates decoder types to specify channel sample rate and pass/stop
frequencies for requested channels.  Updates tuner channel source
managers to accept a channel specification for channels that are
allocated.
2018-09-09 09:49:05 -04:00
Denny Sheirer
9950e46e5a Merge pull request #408 from DSheirer/406-tuner-sample-delay-buffer
406 Tuner Sample Delay Buffer
2018-09-09 08:47:17 -04:00
Denny
570321da3e Implements a complex sample delay buffer integrated into the tuner
channel manager so that channel source requests can have a start
timestamp specified and the channel can be preloaded with samples from
the delay buffer.  If no timestamp is specified, current time is assumed.

This feature requires corresponding updates to any decoder that wishes
to implement the timestamped sample preloading functionality.
2018-09-09 08:46:21 -04:00
Denny
bb0bcd3198 Updates build to 0.4.0 alpha 3 2018-09-05 07:34:09 -04:00
Denny Sheirer
cb54850f99 Merge pull request #402 from DSheirer/heterodyne_channelizer
401 Update Tuners to use Heterodyne Channelizer
2018-09-05 07:31:57 -04:00
Denny
5bb8c46bd5 Merge remote-tracking branch 'origin/heterodyne_channelizer' into heterodyne_channelizer 2018-09-05 07:27:39 -04:00
Denny
2a3fd2c5a3 Class renaming and cleanup. 2018-09-05 07:27:18 -04:00
Denny
d712feb45a Class renaming and cleanup. 2018-09-05 07:26:52 -04:00
Denny
fbb24a4c05 Class renaming and cleanup. 2018-09-05 07:24:42 -04:00
Denny
3992f8178c Merge remote-tracking branch 'origin/heterodyne_channelizer' into heterodyne_channelizer
# Conflicts:
#	src/main/java/io/github/dsheirer/dsp/filter/design/FilterViewer.java
2018-09-05 07:19:37 -04:00
Denny
8642def77e Cleanup, renaming and removing legacy code. 2018-09-05 07:17:51 -04:00
Denny
38e6de6cb2 Resolves cutoff frequency for 2 channel polyphase synthesizer. 2018-09-05 07:17:51 -04:00
Denny
994e78f42b Resolves issue with polyphase filter gain and channel output processor gain 2018-09-05 07:16:51 -04:00
Denny
b8a46af836 Creates new HeterodyneChannelSourceManager that uses frequency translation
and CIC decimation for each channel provided by the tuner.
2018-09-05 07:15:57 -04:00
Denny
1c6d19959a Class renaming and cleanup. 2018-09-05 06:34:13 -04:00
Denny
50bc3088b7 Removes unused legacy code. 2018-09-05 06:31:39 -04:00
Denny
09356848eb Merge branch 'master' into heterodyne_channelizer
# Conflicts:
#	src/main/java/io/github/dsheirer/dsp/filter/design/FilterViewer.java
2018-09-05 06:18:27 -04:00
Denny Sheirer
316bfb19c2 Merge pull request #400 from DSheirer/375-channelizer-synthesizer-gain-issue
375 channelizer synthesizer gain issue
2018-09-05 06:17:47 -04:00
Denny
c045c8f16d Updates heterodyne channel manager to correctly lock/unlock the tuner
controller.
2018-09-05 06:11:28 -04:00
Denny
8946d789ff WIP - updated tuners to use CIC decimation tuner channel sources instead
of polyphase channelizer.

Channel sample rate reduced to 30 kHz - seems to work better with P25
decoders than previous 25 kHz.
2018-09-04 08:16:57 -04:00
Denny
19399d9138 Resolves cutoff frequency for 2 channel polyphase synthesizer. 2018-09-01 06:32:24 -04:00
Denny
9acdf22b91 WIP - identifier framework and restructuring P25 messages to provide
identifiers.
2018-08-31 04:50:58 -04:00
Denny Sheirer
f963d821a1 Merge pull request #396 from DSheirer/394-p25-bitstream-output
394 P25 bit stream output
2018-08-18 03:52:36 -04:00
Denny
ade0cef50b Updates P25 C4FM and LSM decoders to provide demodulated bit streams
for recording using the new binary recorders/format.
2018-08-18 03:36:17 -04:00
Denny
2044c2a2de WIP - Updated P25 C4FM and LSM decoders to assemble dibits and push
reusable byte buffers out to the processing chain.  This enables the
processing chain to broadcast these buffers back to the decoder for
message assembly and to any running binary recorder.

Updated P25Decoder to be a reusable byte buffer listener.  The decoder
will now pass reusable byte buffers down to the message framer for
message processing.  This should make the code more efficient since it
can process byte arrays versus handling each individual dibit.

The P25MessageFramer has been updated to be a listener of reusable byte
buffers instead of Dibits, but the actual processing of byte arrays
has to be coded.

Added max recording size to the binary recorder so that it cycles at
500 kB max file size.
2018-08-17 07:27:04 -04:00
Denny Sheirer
1c312a50b6 Merge pull request #395 from DSheirer/393-raw-bitstream-recording
393 Recording raw decoded bitstream from supported decoder types
2018-08-11 08:09:22 -04:00
Denny
54f6bd09e2 Cleanup 2018-08-11 08:08:57 -04:00
Denny
5f8f2ec330 Resolves #393 - Adds support for recording demodulated (raw) bitstream
buffers.  None of the decoders currently support this yet, but the P25
will be updated to provide bitstream output for recording.

Renames the ReusableBuffer class to ReusableFloatBuffer for
consistency.
2018-08-11 08:02:58 -04:00
Denny Sheirer
d7e018f66e Merge pull request #392 from DSheirer/390-polyphase-channel-source-npe
390 PolyphaseChannelSource NPE
2018-08-11 05:43:35 -04:00
Denny
c2a232fdee Adds null checking to output processor. 2018-08-11 05:42:45 -04:00
Denny Sheirer
c5d2dcd0cf Merge pull request #391 from DSheirer/389-add-active-to-channel-states
389 Add ACTIVE Channel State and Update P25 Decoder State processing
2018-08-11 05:39:20 -04:00
Denny
8e4e4129ca Adds 'ACTIVE' as a valid channel state to indicate that the channel is
actively decoding, but no call or data is being transmitted.  This is
primarily used for P25 channels when TDU Link Control messages are
being transmitted in between voice or data transmissions on a channel.

Updated several of the P25 decoder state message processing sections to
keep the channel state UI updated with current call identifiers and
states.

Hard-coded channel state colors to remove inefficiency in the way that
channel state coloration was being handled.
2018-08-11 05:36:30 -04:00
Denny
9176ca610f Updates build to Version 0.4.0 Alpha 2 2018-08-05 07:51:40 -04:00
Denny Sheirer
97b31e4d9b Merge pull request #385 from DSheirer/372-icecast-streaming-reconnect
372 Icecast Streaming Reconnect and Metadata Updates
2018-08-05 07:48:28 -04:00
Denny
a3e5520d3e Resolves #372 - Icecast reconnect following network outage. Updates
the lost connection timeout from default of 60 seconds down to 5 seconds
so that the connection state updates more quickly.  Removed complex
error handling and replaced with a simpler approach to catch an error
and disconnect and then attempt a reconnect.

Added new 'Network Unavailable' error state that detects when the network
connection is unavaialable.

Updated the icecast metadata updater to close the TCP session after
successfully writing metadata to the socket.
2018-08-05 07:44:46 -04:00
Denny
8c456972cc Decreases usable bandwidth of the R820T tuner to 98% so that channels
do not get allocated at the spectral extremes where the signal is
degraded.
2018-08-03 11:02:47 -04:00
Denny
35d81ab31d Decreases buffer size for low sample rates for RTL2832 tuners. 2018-08-03 08:06:00 -04:00
Denny
b90b06e600 Merge remote-tracking branch 'origin/master' 2018-08-03 07:57:58 -04:00
Denny
04144ca677 Adds additional RTL 2832 sample rate options 2018-08-03 07:57:47 -04:00
Denny Sheirer
d3c7a50918 Merge pull request #384 from DSheirer/382-rtl-tuner-sample-rate-options
382 - Additional Sample Rate Options for RTL2832 Tuners
2018-08-03 07:53:01 -04:00
Denny
0fd29fa35a Resolves #382 - Adds additional sample rate options for the RTL2832
tuner and adjusts the low sample rate buffer size down to 16 kb.
2018-08-03 07:50:36 -04:00
Denny Sheirer
c00b173064 Merge pull request #383 from DSheirer/381-rtl-tuner-adaptive-native-buffer-size
381 Adaptive USB Transfer Buffer Sizes for RTL2832 Tuners
2018-08-03 07:29:31 -04:00
Denny
2718367259 Resolves #381. Updates USB transfer processor to use native transfer
buffer sizes that adapt to the selected sample rate.
2018-08-03 07:27:58 -04:00
Denny Sheirer
3f0c13096a Merge pull request #380 from DSheirer/374-rtl-tuner-sample-rate-issue
374 RTL Tuner Sample Rates Not Supported (1.44 & 2.88 MHz)
2018-08-03 07:04:28 -04:00
Denny
71ba4adbd7 Resolves #374
Updates polyphase channel manager to correctly calculate the number of
channels for each sample rate change.
2018-08-03 07:02:58 -04:00
Denny Sheirer
3908e29a2e Merge pull request #376 from DSheirer/373-tuner-ppm-monitoring-and-adjustment
#373 - Tuner PPM Error Monitoring and R820T PPM Auto-Correction
2018-07-29 11:18:47 -04:00
Denny
0c47efea03 Resolves #373 - Adds support for Tuner frequency error PPM monitoring
and auto-correction for R820T tuners.

-Updated TunerModel and TunerViewPanel to add 2 new columns to
display the current tuner's PPM setting and (when available) the
measured frequency error averaged over 5 second intervals provided by
certain decoders (e.g. P25 C4FM and LSM).  Frequency error value from
P25 decoders is provided from the Costas Loop PLL once 2 or more P25
message sync events have been observed in a short period.
-Updated R820T tuner to auto-correct PPM when measured frequency error
exceeds the +/- 0.4PPM threshold for a period of 30 seconds or more.
Feature can be enabled/disabled by user in the tuner editor panel.

Resolved several issues with P25 C4FM/LSM decoders that was impacting
performance related to channel misalignment from tuner PPM offsets.
2018-07-29 10:48:29 -04:00
Denny
5c0d97d942 Resolves issue with array out of bounds exception on shutdown while
removing tuners from the tuner model.
2018-07-20 05:59:00 -04:00
Denny
61ae0d2d83 Resolves issue with saved setting for spectral display panel enabled state 2018-07-20 05:58:23 -04:00
Denny Sheirer
68f2a8da2c Merge pull request #371 from DSheirer/370-tuner-editor-lock-state
Resolved #370 Tuner Editor Lock State
2018-07-15 05:55:46 -04:00
Denny
0d69f11e65 Resolved #370 Tuner Editor Lock State
Resolves an issue with the previous implementation where the tuner
editor was being refreshed repeatedly to update the lock state for the
tuner, rendering the editor almost completely unusable.

Now updates only the frequency control and the sample rate control to
reflect the tuner's lock state.
2018-07-15 05:55:28 -04:00
Denny Sheirer
b3d5daea8b Merge pull request #369 from DSheirer/320-mixer-gain-r820t-tuner
360 R820T Mixer Gain Labels
2018-07-15 05:30:45 -04:00
Denny
fe34623c4a Resolves #320
Changes labels for R820T mixer gain settings.
2018-07-15 05:29:21 -04:00
Denny Sheirer
353747cecc Merge pull request #368 from DSheirer/96-disable-spectral-display-option
#96 Disable Spectral Display Option
2018-07-14 16:05:00 -04:00
Denny
a8c649ef64 Resolves #96
Adds capability to disable spectral display.

Adds right-click context
menu items to disable display and/or reenable display by selecting
another tuner.

Adds view menu items to disable spectral display or show a tuner.

Persists spectral display enabled state across application run sessions.
2018-07-14 16:04:18 -04:00
Denny Sheirer
8cf50e629e Merge pull request #367 from DSheirer/366-application-shutdown
366 Application Shutdown Procedure
2018-07-14 14:45:00 -04:00
Denny
20a8f2bb3c Fully implements application shutdown procedure that is invoked when the
user closes the the main gui window or invokes exit from the file menu.
2018-07-14 14:44:03 -04:00
Denny
8c237be682 Resolves issue with Mute/Unmute icon rendering. 2018-07-14 13:39:43 -04:00
Denny Sheirer
2d5271b849 Merge pull request #365 from DSheirer/364-p25-pll-lock-gain
#364 Excessive P25 PLL Sync Lock Timelines
2018-07-14 11:29:18 -04:00
Denny
609a1e86c7 Resolves #364.
The C4FM and LSM decoders were issuing a PLL reset with each new
channel that was allocated, causing any existing decoding channels to
be disrupted.  Decoding re-sync delays or inability to recapture the
 signal for decoding would likely result as the tuner's overall PPM
 caused misadjustment in the channel.

Resolved a NPE that was occurring in the FrequencyController for
sample rate changes.
2018-07-14 11:27:38 -04:00
Denny Sheirer
821e719015 Merge pull request #363 from DSheirer/170-airspy-mini-sample-rates
#170 Add Support for Airspy Mini tuner's 3 and 6 MHz
2018-07-14 07:47:03 -04:00
Denny
104c4f72be Resolves #170 adding support for Airspy Mini tuner's 3 and 6 MHz
sample rates.

Resolves issue in PolyphaseChannelManager responding to sample rate
changes in the tuner.  The manager now recreates the channelizer when
needed if the tuner's sample rate has changed since the last time the
channelizer was used.

Updates the Tuner selection view to reflect tuner lock state.  Updates
the tuner editors to enable/disable frequency controller and sample
rate controls according to the tuner's lock state.
2018-07-14 07:45:42 -04:00
Denny
9e7fa7618d Logging cleanup. 2018-07-04 06:05:15 -04:00
Denny
ee09520181 Updates build script to version 0.4.0 alpha 1. Adds missing resampler
library.
2018-07-01 20:52:38 -04:00
Denny Sheirer
fa12b840db Merge pull request #357 from DSheirer/39-polyphase-channelizer
39 polyphase channelizer and decoder updates
2018-07-01 07:30:06 -04:00
Denny
183d7d6d19 Logging cleanup 2018-07-01 07:25:37 -04:00
Denny
e2550869ce Disables debug logging of reusable buffer creation. 2018-07-01 07:21:42 -04:00
Denny
e88944e53d Updates all reusable buffer queues to automatically set the user count
to 1 on all provided buffers by default.
2018-07-01 07:08:52 -04:00
Denny
0051a1d381 Removes debug logging for polyphase channelizer and reusable buffer queues. 2018-07-01 06:43:40 -04:00
Denny
f7a873dd0c Removes AFC settings from all decode configurations. 2018-07-01 05:43:42 -04:00
Denny
ad560db5ea [WIP] Removes all usage of Buffer, RealBuffer and ComplexBuffer. 2018-06-30 06:54:36 -04:00
Denny
6f1ce79461 [WIP] Updates the AM decoder module.
Removes a number of unused classes in an effort to remove RealBuffer
usage across the codebase (has been replaced by ReusableBuffers).
2018-06-30 05:37:13 -04:00
Denny
df1bc1031e [WIP] Updates AudioPackets to be ReusableAudioPackets. 2018-06-29 06:53:03 -04:00
Denny
a621a31aa9 [WIP] Updates the sample adapters to natively use ReusableBuffers.
Refactors a MixerReader instance from the RealMixerSource so that it
can be reused for both real and complex data outputs.

Updates RealMixerSource to use refactored MixerReader and use a default
sample rate of 8 kHz.

Updates the ComplexMixer to use the refactored MixerReader.

Updates the FCD 1/2 tuners for compatibility with the new ComplexMixer.

Removes several unused classes.
2018-06-24 09:50:36 -04:00
Denny
19fa256c60 [WIP]Updates mixer manager and mixer source to use 8 kHz audio for
sound card inputs.

Updated DecoderFactory to only include an AM/FM demodulator when we're
using a tuner input.
2018-06-23 09:49:40 -04:00
Denny
7a830077bd [WIP] Cleanup. Refactors DecoderFX application to the gui package. 2018-06-15 07:29:27 -04:00
Denny
f4793f3cfd [WIP] Cleanup. Removes the legacy Instrumentable, Taps, etc and related
gui components.  Refactors the new DecoderFX application to the
instrument package.
2018-06-15 07:27:17 -04:00
Denny
2cd3b73633 [WIP]Updates the MDC1200 decoder to use the new AFSK1200 decoder
class.

Adds Demodulator Viewer FX pane for MDC1200 decoder.
2018-06-15 07:11:07 -04:00
Denny
18f50485d3 [WIP]Updates the Tait1200 decoder to use the new AFSK1200 decoder
class.

Adds Demodulator Viewer FX pane for Tait1200 decoder.
2018-06-15 06:56:44 -04:00
Denny
b410cf0dfe [WIP]Updates the LJ-1200 decoder to use the new AFSK1200 decoder
class.

Adds Demodulator Viewer FX panes for MPT-1327 and LJ-1200 decoders.
2018-06-15 06:19:50 -04:00
Denny
1fdcb623a6 [WIP]Updates the MPT-1327 decoder to use the new AFSK1200 decoder
class.
2018-06-11 04:32:30 -04:00
Denny
9dda1f95a1 [WIP] Creates a new AFSK-1200 correlation decoder and updates the
Fleetsync II decoder to use it.  Adds instrumented version of the decoder
and a new Fleetsync2 FX pane to the DemodulatorViewerFX tool.

Note: the remaining AFSK-1200 based decoders will all be ported to use
this new AFSK1200 decoder (MDC1200, Tait1200, LowJack1200).
2018-06-09 08:17:18 -04:00
Denny
a5c8552937 [WIP] new AFSK1200 decoder. 2018-06-09 04:38:47 -04:00
Denny
e4209c8e4f [WIP] Updates the passport decoder to use the new LTRDecoder.
Deprecates the Listener<Boolean> interface method in the MessageFramer
to optimize for primitive booleans and reduce impact on memory.  Will
remove this interface once the AFSK1200 decoders are updated.
2018-06-02 09:31:49 -04:00
Denny
a898be265f [WIP] Updates the LTR-Standard and LTR-Net decoders to use a new LTR
decoder with a zero-crossing symbol timing error detector.  The new
decoder is optimized for 8 kHz FM demodulated audio produced by the
AudioModule.
2018-06-02 08:47:48 -04:00
Denny
c13315f731 [WIP] The Two-Channel synthesizer is now fully-functional and the
channelizer sub-system is functionally complete.

Updated the channelizer and synthesizer filter design methods to use a
Kaiser windowed Nyquist filter.  Updated the synthesizer filter design
to use a new cutoff frequency of 105% of the channel bandwidth to
resolve a slight dip in the synthesized channel gain at the channel
union region.

Updated the 2 channel output processor to use a low-pass filter that
is designed for the runtime channel sample rate versus hard-coded 12.5
khz.

Testing and redesign continues ...
2018-05-20 07:21:14 -04:00
Denny
341e740e77 [WIP] updated the 2 channel synthesizer to use a more SIMD friendly
filter structure.  Updated the channel results array buffer to produce
reusable buffers.

This has dropped the overall memory usage considerably when profiling.

Resolved issue in the processing chain where polyphase channel sources
were not being stopped and were stacking up in memory.
2018-05-10 08:08:20 -04:00
Denny
cbc228d798 [WIP] The 2 channel synthesizer appears to be working after restructuring.
Check-point commit.  I'm going to optimize the code so that it can
leverage SIMD instructions.
2018-05-06 07:37:24 -04:00
Denny
488b2e02ce [WIP] Work continues on resolving issues with the 2-channel synthesizer
that is currently up/down converting the signal of interest, but the
synthesizer is not correctly combining the original two channels.

Some experimentation with the tap count for the channelizer indicates
that we can cut the tap count in half and still have decent decoding
on the P25 decoder when paired to an aligned channelized output.  The
2-channel synthesized output decodes partially, but needs more work.

Resolved issue with channel gain in the channelizer that was making the
sample values so small that they were registering as zero when converted
from float to 16-bit int value in the complex wave recorder.
2018-04-29 06:19:39 -04:00
Denny
e395d737f8 [WIP]-39 updates to resolve issue with stopping channel streams. 2018-04-22 04:44:35 -04:00
Denny
7a9f705517 Merge branch 'master' into 39-polyphase-channelizer
# Conflicts:
#	src/main/java/io/github/dsheirer/module/decode/p25/P25DecoderC4FM.java
2018-04-18 06:00:57 -04:00
Denny
dfaf506e23 Updates changelog 2018-04-18 05:52:15 -04:00
Denny
81c9a352a8 Updates changelog 2018-04-18 05:51:55 -04:00
Denny
e6937764c3 Merge remote-tracking branch 'origin/master' 2018-04-18 05:49:16 -04:00
Denny
5bfc5bf456 Increments build to 0.3.4 beta 2 2018-04-18 05:49:04 -04:00
Denny Sheirer
ce83273393 Merge pull request #345 from DSheirer/344-p25-c4fm-agc
344 Add AGC to P25 C4FM decoder
2018-04-18 09:48:19 +00:00
Denny
95aa9f8803 Adds automatic gain control to P25 C4FM decoder to condition the
samples prior to interpolation.

Resolves issue with using incorrect quadrature index when pulling a
sample from the interpolating buffer.

Resolves issue where the instrumented version of the interpolating
buffer was being constructed in the non-interpolated decoder component.
2018-04-18 05:47:17 -04:00
Denny
e971ad4582 39 [WIP] - restructured the polyphase filter process. Previous version
was not computationally feasible with my 3rd Gen i7 processor running
and airspy at 10 MHz.  Restructured the polyphase channelizer to use
vector iteration structures that the JDK 9 JIT compiler can translate
into SIMD instructions.  Separated the IFFT processing from the filter
process so that they can be executed on separate threads and this allows
the processing to occur real time.

P25 C4FM decoding at 25 kHz channel sample rate using an airspy
10MHz sample stream seems to be working nicely with ~25% CPU usage and
~300 to 500 MB memory usage.  Incremental (parallel) channel decoding
should have a minimal increase in CPU loading since all of the 12.5 kHz
channels are available in the polyphase channelizer and the only
additional workload is the decoding of the 25 kHz sample stream.

There is still an issue with stopping channels and the channelizer keeps
 processing, and occasionally when starting traffic channels something
 deadlocks and causes out of memory.
2018-04-15 09:05:06 -04:00
Denny
ff9395e4b9 39 [WIP] working copy with new SIMD structures in place. 2018-04-14 07:23:33 -04:00
Denny
d023da9ead 39 [WIP] experiments to reduce processing time for high sample rate tuners (e.g airspy) 2018-03-26 09:47:32 -04:00
Denny
60ffb18cd9 39 [WIP] cleans up the reusable buffers and creates both real and
complex variants.
2018-03-25 09:13:03 -04:00
Denny
c36f6901af 39 - Adds P25/LSM support to the DemodulatorViewerFX application and
adds Feed forward gain support to the C4FM DQPSK demodulator which seems
to improve output from the interpolating sample buffer at each symbol
period.  Updates the symbol timing gain for C4FM to decrease the gain a
bit since the feed forward gain is providing a better interpolated symbol.
2018-03-24 11:03:18 -04:00
Denny
bfaacb309d 39 - WIP - incorporates the latest P25 C4FM decoder from master and
updates the LSM decoder to follow the same design pattern.  Adds LSM
decoder support to the demodulator viewer application.  The current
symbol timing gain for LSM is set too high -- is using the C4FM gain
and causes too much fluctuation in the timing error.
2018-03-24 06:59:41 -04:00
Denny
c3b405a752 Merge branch 'master' into 39-polyphase-channelizer
# Conflicts:
#	src/main/java/io/github/dsheirer/buffer/FloatCircularBuffer.java
#	src/main/java/io/github/dsheirer/dsp/filter/FilterFactory.java
#	src/main/java/io/github/dsheirer/dsp/filter/design/FilterView.java
#	src/main/java/io/github/dsheirer/dsp/filter/design/FilterViewer.java
#	src/main/java/io/github/dsheirer/dsp/filter/fir/complex/ComplexFIRFilter.java
#	src/main/java/io/github/dsheirer/dsp/gain/ComplexFeedForwardGainControl.java
#	src/main/java/io/github/dsheirer/dsp/mixer/Oscillator.java
#	src/main/java/io/github/dsheirer/dsp/psk/LSMDemodulator.java
#	src/main/java/io/github/dsheirer/module/decode/Decoder.java
#	src/main/java/io/github/dsheirer/module/decode/DecoderFactory.java
#	src/main/java/io/github/dsheirer/module/decode/p25/P25Decoder.java
#	src/main/java/io/github/dsheirer/module/decode/p25/P25_C4FMDecoder.java
#	src/main/java/io/github/dsheirer/module/decode/p25/P25_LSMDecoder.java
#	src/main/java/io/github/dsheirer/source/tuner/TunerChannelSource.java
#	src/main/java/io/github/dsheirer/source/tuner/TunerModel.java
#	src/main/java/io/github/dsheirer/source/tuner/TunerSourceEditor.java
#	src/main/java/io/github/dsheirer/spectrum/ChannelSpectrumPanel.java
2018-03-18 05:19:33 -04:00
Denny
3619b480f8 Updates build to 0.3.4 beta 1.
Note: build 0.3.3 was never promoted beyond beta 3, although there were
no reported issues that would have prevented a 0.3.3 release.
2018-03-17 10:43:24 -04:00
Denny Sheirer
830b2a2d34 Merge pull request #339 from DSheirer/336-audio-recording-temp-files
336 - Audio recording temporary file name
2018-03-17 14:41:14 +00:00
Denny
78bb5ffe43 Resolves #336. Updates audio recorder to use a *.tmp file extension
while the file is open/in-use and change the file extension to *.wav
when the recording is closed.
2018-03-17 10:39:35 -04:00
Denny Sheirer
5dd1664844 Merge pull request #338 from DSheirer/330-p25-c4fm-decoder-update
330 p25 c4fm decoder update
2018-03-17 13:51:19 +00:00
Denny
8868c1f954 330 - updates P25 C4FM decoder to use the new DQPSK demodulator and
removes the previous FM demodulator based decoder.
2018-03-17 09:45:23 -04:00
Denny
646bd78037 330-WIP - adds the message decoder to see the P25 messages being decoded
as we step through the recording.
2018-03-04 20:41:43 -05:00
Denny
5af4cb8706 330-WIP - adds the message decoder to see the P25 messages being decoded
as we step through the recording.
2018-03-04 12:07:29 -05:00
Denny
45a6c5a0b6 330 WIP - implements the new data-directed symbol timing and phase
error calculator.  After increasing the gain for symbol timing, this
new symbol evaluator class seems to track the signal very accurately
despite lots of noise and ISI.
2018-03-04 11:42:23 -05:00
Denny
b563f2d11b 330 WIP - created new symbol evaluator class that combines phase and
timing error calculation with symbol decision.  In the process of
changing over to this new class and remove the previous implementations
for the 3 values.  This commit includes the partial implementation
so I can access from another dev machine.
2018-02-27 05:57:48 -05:00
Denny
148ddd0bd5 330 WIP - P25 C4FM decoder fully functional using DQPSK decoder and
new symbol timing error detector.  Each component now has a subclass
that supports instrumentation for use with the DemodulatorViewerFX
application.
2018-02-25 08:56:34 -05:00
Denny
a0630102e6 330 WIP - P25 C4FM decoder fully functional using DQPSK decoder and
new symbol timing error detector.
2018-02-25 05:04:20 -05:00
Denny
3d1ac30646 330 WIP - changing to 45 degree rotation before demodulation. 2018-02-20 05:27:33 -05:00
Denny
dda37a1198 330 WIP - updates the demodulator viewer with an eye diagram and symbol
chart.  Testing various configurations to see which yields the best
PLL and symbol timing locks.
2018-02-18 16:20:45 -05:00
Denny
eaf7c7d11e 330 WIP on redesigning the P25 C4FM decoder. Creates a new decoder
based on the P25 LSM decoder using a costas loop and a gardner detector.
Updates the Demodulator Viewer FX application to add in a symbol chart
and a phase error chart.  The decoder won't lock on yet ... still a wip.
2018-02-17 13:41:36 -05:00
Denny
80c5ad1bc8 WIP - updates to the demodulator viewer app and the recently used files
menu.
2018-02-13 12:31:50 +00:00
Denny
956bf2d76a Adds phase viewer and recent files menu item to viewer desktop. 2018-02-12 12:34:42 +00:00
Denny
1406d5576a 330 - Adds new JavaFX implementation of the demodulator viewer applicaiton
with initial support for playback control and I/Q sample axis viewing.
2018-02-11 10:16:50 -05:00
Denny
03e39f3343 Merge branch 'master' into 330-p25-c4fm-decoder-update 2018-02-11 06:14:23 -05:00
Denny
28f351287c 328 - cleanup issue with NPE 2018-02-11 06:13:56 -05:00
Denny
54227703a2 Cleanup from last PR. 2018-02-11 06:12:57 -05:00
Denny
bb078de0a9 Cleanup from last PR. 2018-02-10 10:23:28 -05:00
Denny
ec30cd6305 Updates changelog 2018-02-10 08:28:40 -05:00
Denny Sheirer
5a88ac0200 Merge pull request #329 from DSheirer/328-auto-start-ordering
328 Channel Auto-Start capability
2018-02-10 08:15:10 -05:00
Denny
05eea44f7e Cleanup 2018-02-10 08:14:00 -05:00
Denny
030fc1617c 328 Channel Auto-Start capability. Adds auto-start and auto-start
ordering to each channel configuration to provide the user with greater
control over initial application startup configuration.

Adds new dialog window that displays on startup that allows the user to
invoke/cancel auto-start, or simply allow the timer to expire whereby
the channels will be auto-started.

Updates channel table model to include an auto-start column and relabels
the 'Enabled' column to read 'Playing'.

Updates channel editor to change the 'Enable/Disable' button to read
'Start/Stop'.

Changes the 'enabled' property of the channel configuration to indicate
the current 'processing' status - isProcessing().

Channel's XML configuration re-purposes the 'enabled' property to indicate
auto-start and adds a new (optional) auto-start 'order' attribute.
2018-02-10 08:09:43 -05:00
Denny Sheirer
594a77a9d0 Merge pull request #327 from DSheirer/321-channel-preferred-tuner
321 channel preferred tuner
2018-02-09 07:13:13 -05:00
Denny
c2fcc9e85d 321 - adds a preferred tuner option to the channel's source configuration
so that on startup, the application attempts to source the channel from
the preferred tuner.

If the tuner is currently not available, or if the tuner cannot source
the channel, then the next available tuner is selected.
2018-02-09 07:11:38 -05:00
Denny
28da8b2fa4 [wip] reusable buffer support. 2018-02-09 05:56:20 -05:00
Denny
1c06c4382f Adds preferred tuner to tuner source configuration. 2018-02-09 05:55:29 -05:00
Denny
28cb9d9407 [WIP] Updating dsp modules to accept variable sample rate I/Q streams
and creating a new audio resampler.
2018-02-09 05:29:07 -05:00
Denny
96d9d6f750 [WIP] Adds locking mechanism to tuner controllers so that the
polyphase channel manager can block users from changing frequency and/or
sample rate when polyphase channels are allocated.
2018-02-04 06:30:25 -05:00
Denny
85691edacb [WIP] Testing completed for channel manager allocating tuner channels
when the tuner controller indicates that there is a center DC spike
blocked region or when the tuner has clipped outer spectral regions
resulting in less than 100% usable bandwidth.
2018-02-04 04:59:27 -05:00
Denny
f2f2c92afe [WIP] Implements reusable sample buffers across all components. This
produces a significant reduction in memory usage, especially for tuners
like the airspy and hackrf that produce 10/20 MSPS sample rates.  This
is observed to be around 66% reduction in peak memory usage and provides
a more stable memory utilization across time reducing stress on the
garbage collector.

Use of these reusable memory buffers will be pushed further down into
the processing chain modules to ensure we keep new object creation
to the lowest levels possible.
2018-02-03 10:05:16 -05:00
Denny
fcd3c2fd46 [WIP] channelizer and 1/2 channel output processors along with the 2
channel synthesizer ... all appear to be functional.
2018-01-28 10:52:53 -05:00
Denny
e78d2339ff WIP - aligns the SynthesizerViewer configuration with that of the
ChannelizerViewer so that we can compare the two-channel synthesis
operations.  The SynthesizerViewer is successfully down-sampling and
synthesizing two 25.0 kHz channels into a combined 25.0 kHz channel with
no noticeable drop/nulling in the joined region.  However, the channelizer
viewer's synthesized channels definitely have a null in the joined
region.  I suspect that the channelizer is not quite where it needs to
be and am going to start experimenting there.
2018-01-27 16:27:58 -05:00
Denny
673c8a2423 WIP - two-channel output processor is correctly synthesizing a channel
and translating it by -FS/4 to correctly center the synthesized channel.
The low-pass filter is currently disabled to better troubleshoot/view the
state of the synthesized channel.  It appears that the synthesizer is
not correctly joining the channel ... instead of down-sampling and then
synthesizing the two channels, it appears to be synthesizing and then
down-sampling.  The synthesized channel has a null in the middle which
would render it unusable.
2018-01-27 15:57:22 -05:00
Denny
5a03a0038c WIP - Adds FS/4 up and down converter classes. 2018-01-27 15:37:26 -05:00
Denny
e7f7d27a1f Updates the Oscillator and LowPhaseNoiseOscillator classes to share a
common interface and abstract class.
2018-01-27 04:41:01 -05:00
Denny
0cf964fa98 Updates test tuner to cleanup the buffer reuse settings 2018-01-20 04:26:53 -05:00
Denny
b6f282a85a Polyphase Channelizer Viewer is fully functional again, now using the
TestTuner and TestTunerController implementations.  This implementation
only has support for channels that are completely centered within a
channelizer output.  Two output slice stitching to form a composite
channel will be implemented next.

Initial profiling indicates that the FFT function within the polyphase
channelizer is now the dominant processing workload - 28% cpu loading
when channelizing a 10 MHz sample rate input into 800 channels running
at 25.0 kHz each.  This is ideal for offloading to an OpenCL kernel and
running on a GPU.
2018-01-19 12:44:31 -05:00
Denny
32ab0598e8 Updates sample generator and test tuner controller to support multiple
complex buffer listeners.  Removes complex buffer broadcast support from
the source manager and renames it to channel source manager to convey
that it's only responsible for providing channels from the tuner.
2018-01-15 05:34:36 -05:00
Denny
5ae3cb38e1 Merge master and re-apply the source event structures to the DFT processor. 2018-01-15 05:03:03 -05:00
Denny
78205bb1bf Merge branch 'master' into 39-polyphase-channelizer
# Conflicts:
#	src/main/java/io/github/dsheirer/spectrum/DFTProcessor.java
2018-01-15 04:56:16 -05:00
Denny Sheirer
3d9b38bef5 Merge pull request #319 from DSheirer/318-dft-processor-non-blocking-queue
318 DFT Processor Non-Blocking Queue redesign
2018-01-15 04:54:40 -05:00
Denny
d5b377b1af Resolves #318. Redesigns DFT processor to use a non-blocking queue approach to
access incoming buffer streams coupled with a overflowable queue that
limits the quantity of complex buffers that are cached for the DFT
processor.
2018-01-14 12:05:39 -05:00
Denny
a7a0c26b38 #39 WIP - changes for testing of the channelizer viewer. 2018-01-14 08:40:34 -05:00
Denny
d4761be00a #39 WIP - rolls back embedding source events in buffers. The channel
calculator must be updated immediately any time the tuner's center
frequency changes so that a channel can be allocated immediately.  So,
I changed source event handling to two parts where the channel calculator
is immediately updated and the channelizer configuration is deferred so
that it can happen on the buffer processor execution thread and we can
avoid any sync() locking on the channelizer or polyphase channel
sources.
2018-01-13 11:43:26 -05:00
Denny
05fa5c25fd #39 WIP - adds support for timestamped complex buffers so that decoded
messages and events can be accurately timestamped, and more importantly,
allocated traffic channels can request to be pre-loaded with buffered
samples to ensure that traffic channels don't miss any samples that
are currently missed due processing latency inherent in current buffer
sizing.  This should reduce the clipping of starting messages or voice
on the traffic channels.

Restructures processing path for tuner frequency and sample rate change
events.  The tuner now embeds these events in the sequence of buffers
that are generated immediately after the event occurs since those are
the buffers that will be impacted by the change.  Previously, the change
event would be broadcast throughout the system and would impact any
buffered/cached buffers.  This also reduces the number of source event
change listeners that have to be managed.  Note: this change is not yet
implemented in all tuners ... only in the TestTuner implementation.

Updates the polyphase channelizer to now buffer channel results and then
dispatch the buffer to the channel output processors to improve efficiency
of using float arrays versus single value complex float processing.
2018-01-13 09:10:57 -05:00
Denny Sheirer
69e9bed2af Updated readme 2018-01-12 03:50:57 -05:00
Denny
d2e7f008c8 WIP - implements tuner source manager to calculate and update the tuner's
center frequency each time we allocate a new DDC/channel.  Adds
 support for broadcasting channel count change source events so that the
 tuner can accurately convey sourced channel counts via tuner events.

 Completes changeover of polyphase channel manager to support arbitrary
 bandwidth channels.  The new approach provides greater compatibility
 across any tuner sample rates.  Likewise, all decoders will have to be
 updated to adapt to any channel sample rate, although channel bandwidths
 will be at least 12.5 kHz and likely no more than 25.0 kHz, with a 2x
 oversampling that produces channel sample rates in range 25.0 - 50.0
 kHz.
2018-01-07 07:46:41 -05:00
Denny
ddad4b6fb0 Updates readme 2018-01-01 13:16:20 -05:00
Denny
b65dd7e414 Updates readme 2018-01-01 08:20:30 -05:00
Denny
b076587f30 Updates readme 2018-01-01 08:17:42 -05:00
Denny
336669f1d5 Updates build version to 0.3.3 beta 3 2018-01-01 07:26:42 -05:00
Denny Sheirer
46cf7f4193 Merge pull request #309 from DSheirer/308-icon-manager-npe
308 IconManager throws NPE when loading external icons
2018-01-01 07:25:29 -05:00
Denny
e9aeb09011 Resolves issues with NPE handling and loading external icons. 2018-01-01 07:24:37 -05:00
Denny
236df8f3f4 Merges from master branch. 2017-12-27 10:10:51 -05:00
Denny
667c50174d Merge branch 'master' into 39-polyphase-channelizer
# Conflicts:
#	.idea/dictionaries/denny.xml
#	.idea/libraries/imports.xml
#	sdrtrunk.iml
#	src/audio/AudioModule.java
#	src/audio/broadcast/StreamManager.java
#	src/buffer/FloatCircularBuffer.java
#	src/channel/state/AlwaysUnsquelchedDecoderState.java
#	src/channel/state/ChannelState.java
#	src/channel/state/DecoderState.java
#	src/channel/traffic/TrafficChannelManager.java
#	src/controller/channel/Channel.java
#	src/dsp/filter/FilterFactory.java
#	src/dsp/filter/Window.java
#	src/dsp/filter/design/FilterView.java
#	src/dsp/filter/design/FilterViewer.java
#	src/dsp/filter/fir/FIRFilterSpecification.java
#	src/dsp/filter/fir/remez/RemezFIRFilterDesigner.java
#	src/dsp/gain/AutomaticGainControl.java
#	src/dsp/gain/ComplexFeedForwardGainControl.java
#	src/dsp/mixer/Oscillator.java
#	src/dsp/psk/LSMDemodulator.java
#	src/gui/control/JFrequencyControl.java
#	src/instrument/tap/stream/BinaryTapViewPanel.java
#	src/module/Module.java
#	src/module/ProcessingChain.java
#	src/module/decode/Decoder.java
#	src/module/decode/am/AMDecoder.java
#	src/module/decode/fleetsync2/Fleetsync2Decoder.java
#	src/module/decode/fleetsync2/Fleetsync2DecoderState.java
#	src/module/decode/lj1200/LJ1200Decoder.java
#	src/module/decode/lj1200/LJ1200DecoderState.java
#	src/module/decode/ltrnet/LTRNetDecoder.java
#	src/module/decode/ltrnet/LTRNetDecoderState.java
#	src/module/decode/ltrstandard/LTRStandardDecoder.java
#	src/module/decode/ltrstandard/LTRStandardDecoderState.java
#	src/module/decode/mdc1200/MDCDecoder.java
#	src/module/decode/mdc1200/MDCDecoderState.java
#	src/module/decode/mpt1327/MPT1327Decoder.java
#	src/module/decode/mpt1327/MPT1327DecoderState.java
#	src/module/decode/nbfm/NBFMDecoder.java
#	src/module/decode/p25/C4FMSymbolFilter.java
#	src/module/decode/p25/P25Decoder.java
#	src/module/decode/p25/P25DecoderState.java
#	src/module/decode/p25/P25_C4FMDecoder.java
#	src/module/decode/p25/P25_LSMDecoder.java
#	src/module/decode/p25/audio/P25AudioModule.java
#	src/module/decode/passport/PassportDecoder.java
#	src/module/decode/passport/PassportDecoderState.java
#	src/module/decode/tait/Tait1200Decoder.java
#	src/module/decode/tait/Tait1200DecoderState.java
#	src/module/demodulate/am/AMDemodulatorModule.java
#	src/module/demodulate/audio/DemodulatedAudioFilterModule.java
#	src/module/demodulate/fm/FMDemodulatorModule.java
#	src/module/log/EventLogger.java
#	src/record/AudioRecorder.java
#	src/record/RecorderManager.java
#	src/record/wave/ComplexBufferWaveRecorder.java
#	src/record/wave/RealBufferWaveRecorder.java
#	src/sample/Broadcaster.java
#	src/sample/OverflowableTransferQueue.java
#	src/sample/SampleType.java
#	src/source/ComplexSource.java
#	src/source/ISourceEventProvider.java
#	src/source/InvalidFrequencyException.java
#	src/source/RealSource.java
#	src/source/Source.java
#	src/source/config/SourceConfigRecording.java
#	src/source/config/SourceConfigTuner.java
#	src/source/heartbeat/Heartbeat.java
#	src/source/heartbeat/IHeartbeatListener.java
#	src/source/heartbeat/IHeartbeatProvider.java
#	src/source/mixer/RealMixerSource.java
#	src/source/recording/Recording.java
#	src/source/recording/RecordingSourceManager.java
#	src/source/tuner/ITunerChannelProvider.java
#	src/source/tuner/Tuner.java
#	src/source/tuner/TunerClass.java
#	src/source/tuner/TunerController.java
#	src/source/tuner/TunerEditor.java
#	src/source/tuner/TunerManager.java
#	src/source/tuner/TunerModel.java
#	src/source/tuner/TunerSourceEditor.java
#	src/source/tuner/TunerType.java
#	src/source/tuner/airspy/AirspyTuner.java
#	src/source/tuner/airspy/AirspyTunerController.java
#	src/source/tuner/airspy/AirspyTunerEditor.java
#	src/source/tuner/configuration/TunerConfigurationModel.java
#	src/source/tuner/fcd/FCDTuner.java
#	src/source/tuner/fcd/FCDTunerController.java
#	src/source/tuner/fcd/proV1/FCD1TunerController.java
#	src/source/tuner/fcd/proV1/FCD1TunerEditor.java
#	src/source/tuner/fcd/proplusV2/FCD2TunerController.java
#	src/source/tuner/fcd/proplusV2/FCD2TunerEditor.java
#	src/source/tuner/hackrf/HackRFTuner.java
#	src/source/tuner/hackrf/HackRFTunerController.java
#	src/source/tuner/hackrf/HackRFTunerEditor.java
#	src/source/tuner/rtl/RTL2832Tuner.java
#	src/source/tuner/rtl/RTL2832TunerController.java
#	src/source/tuner/rtl/e4k/E4KTunerController.java
#	src/source/tuner/rtl/e4k/E4KTunerEditor.java
#	src/source/tuner/rtl/r820t/R820TTunerController.java
#	src/source/tuner/rtl/r820t/R820TTunerEditor.java
#	src/source/tuner/usb/USBTransferProcessor.java
#	src/source/wave/ComplexWaveSource.java
#	src/source/wave/RealWaveSource.java
#	src/spectrum/ChannelSpectrumPanel.java
#	src/spectrum/DFTProcessor.java
#	src/spectrum/OverlayPanel.java
#	src/spectrum/SpectralDisplayPanel.java
2017-12-26 08:35:33 -05:00
Denny
c7f00ea124 Updates version to 0.3.3 beta 2 2017-12-26 07:19:06 -05:00
Denny Sheirer
1759f4a804 Merge pull request #306 from DSheirer/305-gradle-icons-missing
305 Icons missing from gradle build
2017-12-26 07:17:12 -05:00
Denny
3d9044802e Resolves issue with including icons in gradle build product. Updates
all icon handling code to use absolute path for bundled icons.
2017-12-26 07:13:15 -05:00
Denny
42aec490bd Updates build version and changelog. 2017-12-25 07:42:56 -05:00
Denny Sheirer
c3f5c1c70e Merge pull request #303 from DSheirer/278-wave-metadata
278 Add Metadata to WAV audio recordings
2017-12-25 07:17:08 -05:00
Denny
188a521770 Adds wave file ID3 metadata chunk to audio recordings.
Updates wave writer to add the metadata LIST and ID3 chunks to the end
of the recording so that the file contains the final/complete set of
metadata that was accumulated over the call lifecycle.
2017-12-25 07:08:55 -05:00
Denny
6e352143d2 Adds wave file LIST metadata chunk to audio recordings.
Note: the metadata chunk may be added multiple times over the life span
of an audio call, as additional metadata details are added.
2017-12-24 06:51:09 -05:00
Denny Sheirer
7391265949 Merge pull request #302 from DSheirer/tsypuk-SDR-build
Gradle Build System
2017-12-21 20:55:44 -05:00
Denny
26b97f09b7 Updates SettingsManager to use jackson xml serialization. Final
testing on all changes to xml serialization.
2017-12-21 19:59:11 -05:00
Denny
1d2d9e8630 Updates IconManager to use faster jackson XML serialization. 2017-12-21 13:42:03 -05:00
Denny
ee6aeafa84 Updates PlaylistManager to use faster jackson XML serialization.
Removes native xml.bind serialization for improved compatibility with
 Java 9.

 Global optimize imports on the entire project.
2017-12-21 07:18:27 -05:00
Denny
47cc194415 Resolves issue with runtime exception when identifying application
version string from jar manifest
2017-12-17 07:34:47 -05:00
Denny
9316599dec Updates pull request from Roman Tsypuk to convert the build system from
ant to gradle.  Removes linux and windows application launch scripts and
produces an executable jar with all resources included.
2017-12-17 07:28:06 -05:00
Roman Tsypuk
a1535c4157 updated README, gitignore, moved styles 2017-12-16 11:12:59 +02:00
Roman Tsypuk
b478068475 - cosmetics naming changes 2017-12-16 10:44:54 +02:00
Roman Tsypuk
7286c978da updated gitignore 2017-12-16 10:36:04 +02:00
Roman Tsypuk
628d514462 - updated to current version 2017-12-16 01:05:07 +02:00
Roman Tsypuk
3478702845 - removed scripts 2017-12-16 01:04:14 +02:00
Roman Tsypuk
695d622603 - added fatJar task 2017-12-16 00:57:44 +02:00
Roman Tsypuk
e8e47bfb40 - moved to package in.ua.smartjava 2017-12-16 00:56:22 +02:00
Roman Tsypuk
c1a4425969 - cleanup 2017-12-16 00:27:12 +02:00
Roman Tsypuk
4fa1a1aa81 - moved dependencies to gradle 2017-12-16 00:23:12 +02:00
Roman Tsypuk
4e1f9bcf97 - moved dependencies lib4java to gradle 2017-12-16 00:09:43 +02:00
Roman Tsypuk
50bb96b14a - moved dependencies to gradle 2017-12-16 00:01:23 +02:00
Roman Tsypuk
51ea70f279 moved resource files 2017-12-15 23:57:27 +02:00
Roman Tsypuk
e15f271a54 - moved dependencies to gradle 2017-12-15 23:56:28 +02:00
Roman Tsypuk
605475c98b - moved dependencies to gradle 2017-12-15 23:38:22 +02:00
Roman Tsypuk
86248c511a updated gitignore 2017-12-15 23:23:42 +02:00
Roman Tsypuk
b1e07f762c fix src folder structure 2017-12-15 23:22:32 +02:00
Roman Tsypuk
f2d1ac7e48 - commons moved to gradle 2017-12-15 22:56:38 +02:00
Roman Tsypuk
d114282e4b added dependencies from import folder 2017-12-15 22:53:33 +02:00
Roman Tsypuk
0fd20655fa - added gradle wrapper 2017-12-15 22:52:42 +02:00
Roman Tsypuk
181527f54c - added gradle build 2017-12-15 22:45:40 +02:00
Roman Tsypuk
910587bad7 - updated gitignore 2017-12-15 22:44:29 +02:00
Denny Sheirer
1dc9a7fb0e Merge pull request #300 from DSheirer/299-traffic-channel-event-logging
299 Traffic Channel Event Logging
2017-12-11 21:08:09 -05:00
Denny
eef29d28da #299 - adds support for traffic channel event logging of binary or
decoded messages and event logging, as inherited from the parent
control channel's configuration.
2017-12-11 21:07:30 -05:00
Denny
1c71a37755 #39 WIP - 2017-12-11 20:30:19 -05:00
Denny
318e6f3586 #39 WIP - changes tuner controllers to expose the frequency controller
and the channel manager in preparation for polyphase.
2017-12-11 20:27:01 -05:00
Denny
f38184fd83 #39 WIP - finishes polyphase channel source processing of frequency
offset calculation and updating for channel frequency correction.
2017-12-10 06:26:44 -05:00
Denny
d2085052f6 #39 WIP - updates tunerchannelsource as the parent class for the CIC
and polyphase sub class implementations.  Converts all source implementations
and tuners to treat sample rate as a double.
2017-12-09 15:23:40 -05:00
Denny
441b595325 #39 WIP - initial efforts to restructure the way tuners and tuner
controllers manager sample buffer processing and channel management.
General cleanup across all modules to remove the executor from each
of the start() methods.  Removed the B100 tuner class since it's not
yet implemented.
2017-12-08 04:02:49 -05:00
Denny
57fab2b7ca #39 WIP - initial efforts to restructure the way tuners and tuner
controllers manager sample buffer processing and channel management.
General cleanup across all modules to remove the executor from each
of the start() methods.  Removed the B100 tuner class since it's not
yet implemented.
2017-12-03 11:10:50 -05:00
Denny
bf65e10286 #39 WIP polyphase channelizer
Updates the M2 channelizer and correctly implements the ChannelCalculator
2017-12-02 08:58:34 -05:00
Denny Sheirer
a3ecb339be Merge pull request #294 from DSheirer/241-lj1200-crc-error-checking
241 LJ1200 Error Correction
2017-12-02 03:16:29 -05:00
Denny
910a08f7bb #241 Resolves issue with error correction routine introducing invalid messages 2017-12-02 03:15:31 -05:00
Denny
5a76f31dea Updated change log 2017-11-23 07:37:53 -05:00
Denny Sheirer
1b42e64f50 Merge pull request #290 from DSheirer/289-shoutcast-2-credentials-encryption-error
289 Shoutcast 2 Login Error
2017-11-23 07:30:45 -05:00
Denny
1ddc0a33a5 #289 resolves issue with encrypting username and password with XTEA
algorithm using credential values longer than 8 characters/bytes.
2017-11-23 07:28:15 -05:00
Denny
a12aaf7cf3 #39 WIP polyphase channelizers. 2017-11-18 07:33:28 -05:00
Denny
b3e4bd6a9c #39 WIP polyphase channelizers. 2017-11-18 05:50:00 -05:00
Denny
5281679b7f #39 WIP polyphase channelizers. Creates test tuner and controller to
use in testing tuner and polyphase channel manager operations.
2017-11-12 10:33:13 -05:00
Denny
a581da56a8 #39 WIP polyphase channelizers. 2017-11-05 11:38:01 -05:00
Denny Sheirer
88580af436 Merge pull request #284 from DSheirer/283-broadcastify-text-html-response
283 Broadcastify mount point in use error
2017-11-04 13:31:40 +00:00
Denny
64688a3c20 Updates CHANGELOG 2017-11-04 09:07:46 -04:00
Denny
8be3399a6b Issue #283
Updates Icecast TCP broadcaster to correctly handle content type:text/html
message that normally follows mount point in use error received from
broadcastify.

Changes mount point in use broadcast state to be a temporary error so that
the stream will attempt to reconnect after receiving this error.

Updates logging to include memory allocation/usage metrics with each
logging entry in order to support debugging issues related to high
memory usage situations.  Updates initial application logging to better
identify the host system operating environment.
2017-11-04 09:02:03 -04:00
Denny
0181926fe3 WIP - polyphase channelizer 2017-10-30 19:12:14 -04:00
Denny
2c3be02939 WIP - polyphase channelizer 2017-10-23 08:43:53 -04:00
Denny
a00ec42230 Cleanup from master merge 2017-10-22 06:37:24 -04:00
Denny
14a3532030 Merge branch 'master' into 39-polyphase-channelizer
# Conflicts:
#	src/source/tuner/TunerController.java
2017-10-22 06:28:57 -04:00
Denny Sheirer
28340809ca Merge pull request #279 from DSheirer/276-traffic-channel-manager-deadlocked-threads
276 TrafficController Infinite Loop
2017-10-21 09:43:42 -04:00
Denny
f3d3a8187a Resolves #276 Traffic Channel threads locking in overflow state. Issue
occured when the ChannelProcessionManager was allocating a new channel
causing the tuner to invoke the updateLOFrequency() method that was
trying to find a center tune frequency that would accommodate all of the
channels, specifically in the instance where the distance between the
highest channel and the middle channel was exactly one-half of the
tuner's bandwidth.  This situation would cause the calculated adjustment
to be zero and would cause an infinite loop, locking all channels from
accessing the any channel startup/teardown events and causing running
channels to block with buffer overflows. Added 1 to the adjustment to
ensure that the initial adjustment placed the center overlapping channel
fully to the left of the center DC spike so that on the next iteration
that channel would no longer be overlapping.
2017-10-21 09:31:34 -04:00
Denny Sheirer
8484e837b8 Merge pull request #277 from DSheirer/273-gui-title-version
273 Application Title Version String
2017-10-16 19:38:15 -04:00
Denny
01b188ea25 Resolves #273 issue with dangling dash in application title version string. 2017-10-16 19:37:11 -04:00
Denny
3be65d5e9a Resolves issue from merging master branch into polyphase channelizer branch. 2017-10-15 07:26:17 -04:00
Denny
c21f3fca23 Resolves issue from merging master onto branch. 2017-10-15 07:19:36 -04:00
Denny
99d81d247a Merge branch 'master' into 39-polyphase-channelizer
# Conflicts:
#	src/channel/state/ChannelState.java
#	src/module/ProcessingChain.java
#	src/source/Source.java
#	src/source/mixer/RealMixerSource.java
#	src/source/tuner/TunerChannelSource.java
#	src/source/wave/RealWaveSource.java
2017-10-15 07:17:57 -04:00
Denny Sheirer
108691dc3c Merge pull request #274 from DSheirer/272-java-9-compatibility
272 java 9 compatibility
2017-10-09 12:40:04 -04:00
Denny
455aa97286 Updates build number to 'final' 2017-10-09 12:35:28 -04:00
Denny
d608834214 Resolves #272. Updates the windows launch script to perform conditional
launching based on the JRE version 8 or 9.
2017-10-09 16:33:58 +00:00
Denny
41660e1881 Updates the build number to 0.3.1 for the next patch release
Updates the build script for conditional compilation using either Java
8 or Java 9 options.  Java 9 deprecated the java.xml.bind package and
removed it as a default Java SE package, so we have to reference it via
the --add-modules argument.

Updates the linux/mac launch script to check the java runtime version
and use either a Java 8 or Java 9 launch command.
2017-10-08 09:00:10 -04:00
Denny Sheirer
110ccb158c Update README.md
Removed Version 0.2.0 user manual link
2017-09-22 06:16:34 -04:00
Denny
64ccacf04a Releasing Version 0.3.0 (final). 2017-09-22 05:56:27 -04:00
Denny
27461df7f0 WIP on 2 channel output processor 2017-09-18 04:15:04 -04:00
Denny Sheirer
f00b9555fe Merge pull request #271 from DSheirer/269-viterbi-3-4-rate
269 Viterbi decoder for DMR 3/4-rate packet messages
2017-09-15 11:50:19 -04:00
Denny
85442a9648 Resolves #269 - creates a generic Viterbi decoder and a Digital Mobile Radio (DMR) 3/4 Rate Viterbi decoder implementation for decoding Trellis Coded Modulation (TCM) encoded DMR Data packets. 2017-09-15 11:40:23 -04:00
Denny Sheirer
c67a0b329d Merge pull request #267 from DSheirer/266-licence-directory
266 Update build script to use gitlab license file
2017-09-10 04:55:57 -04:00
Denny
8035d64fcd Resolves #266 - updates build script to use new gitlab license file and
removes previous license file.
2017-09-10 04:54:26 -04:00
Denny
9983d2119d WIP 2017-09-10 04:42:35 -04:00
Denny
9e275b7d62 WIP 2017-09-02 06:55:58 -04:00
Denny Sheirer
df2a061a08 Create LICENSE 2017-08-28 19:51:13 -04:00
Denny
e430319937 Updates build to 0.3.0 Beta 14 2017-08-19 07:15:57 -04:00
Denny Sheirer
724f769771 Merge pull request #262 from DSheirer/260-icecast-stream-doesn't-reconnect
260 - Icecast and Shoutcast streaming doesn't auto-reconnect
2017-08-19 07:14:55 -04:00
Denny
c196cfebed Resolves issue #260 - applies changes to Shoutcast V1 and v2 that were
applied to the Icecast streamer for issue releated to reconnecting.
2017-08-19 07:13:08 -04:00
Denny
e80b5866d4 Resolves issue #260 where audio streaming was not re-connecting after a
disconnect.
2017-08-18 20:07:53 -04:00
Denny
c8994d5593 Updates build to version 0.3.0 Beta 13 2017-07-22 05:45:36 -04:00
Denny Sheirer
99ef57c90f Merge pull request #255 from DSheirer/249-overflow-teardown-lockup
249 Channel TEARDOWN/OVERFLOW state lockup
2017-07-22 05:44:12 -04:00
Denny
be62ae0459 Resolves #249 - removes the state monitor runnable from the channel
state and replaces it with a processing chain heartbeat that is generated
by the sample source.

Previously, the state monitor was running on a separate thread and this
was causing multi-threading issues.  With this update, all channel state
operations (and all module operations) occur on the source's buffer
processing thread.
2017-07-22 05:42:13 -04:00
Denny Sheirer
b9be6f43e0 Merge pull request #253 from DSheirer/252-usb-transfer-processor-bad-logging
252 USB transfer processor erroneous logging and performance enhancements
2017-07-09 12:29:21 +00:00
Denny
d5ad3f807d Resolves issue where the tuner's buffer processor is logging that an overflow state has been cleared, caused by a clearing of the buffer when the tuner is being shutdown because there are no more channel consumers registered on the tuner.
Tweaked buffer size limits and buffer handling to attempt to avoid overflow situations in the first place.

Resolved an issue where the tuner processor was not deregistering correctly from the LIBUSB tuner processor during tuner shutdown.
2017-07-09 08:21:07 -04:00
Denny Sheirer
d85ebd018d Merge pull request #251 from DSheirer/250-state-monitor-throwable
StateMonitor - try/catch for Throwables
2017-07-01 11:39:21 +00:00
Denny
ab4e31ae00 Ensures that any leftover cached LDU1 message is reset when the call ends. 2017-07-01 07:36:55 -04:00
Denny
5efd89632e Ensures that any leftover cached LDU1 message is reset when the call ends. 2017-05-28 07:30:05 -04:00
Denny
1dc3863489 Updates build to 0.3.0 Beta 12 2017-05-28 07:22:43 -04:00
Denny Sheirer
441286ba13 Merge pull request #247 from DSheirer/244-ldu1-encryption-flag
244 Prevent P25 Encrypted Audio Decoding/Playback
2017-05-28 11:20:20 +00:00
Denny
e4323df347 Resolves issue #244 - updates the P25 IMBE audio module to correctly
detect encrypted audio state so that encrypted audio is not (incorrectly)
decoded and played back to the user.

Processes HDU and LDU2 messages to identify encrypted call state.  Once
established, all subsequent LDU1/2 messages are decoded only if the call
is unencrypted.  If an LDU1 message is received out-of-sequence, meaning
that the initial HDU message was missed, then the LDU1 is cached until
we receive an LDU2 message and correctly determine the call encryption
state.
2017-05-28 07:17:09 -04:00
Denny
a872e0d664 Updates version to Beta 0.3.0 Beta 11 2017-05-20 07:24:27 -04:00
Denny Sheirer
fbc92cfe31 Merge pull request #246 from DSheirer/245-sound-card-source-issue
Using sound card or mixer as a source throws an error
2017-05-20 10:55:23 +00:00
Denny
1a432197ac Resolves #245 issue with NPE for frequency change event listener when using the sound card/mixer as a source. 2017-05-20 06:51:53 -04:00
Denny
f461ed9cdb wip-channelizer 2017-05-13 10:16:18 -04:00
Denny
7c6b7494b8 wip-channelizer 2017-04-21 12:17:55 -04:00
Denny
ab31b40124 Merge branch 'master' into 39-polyphase-channelizer
# Conflicts:
#	src/spectrum/SpectrumPanel.java
2017-04-14 14:42:56 -04:00
Denny
fbc6e508bd Increments build to 0.3.0-beta10 2017-04-14 07:46:18 -04:00
Denny
ac686f5f64 WIP - correctly implements the 2x oversampled polyphase channelizer. 2017-04-14 06:41:43 -04:00
Denny
f7cd798f07 WIP 2017-04-08 08:35:48 -04:00
Denny
41d307cdad WIP - checkpointing update for 2x oversampling where we're only computing half of the coefficients. 2017-04-03 19:04:00 -04:00
Denny
afae1654d5 WIP 2017-04-01 15:10:02 -04:00
Denny Sheirer
f9b6e67b00 Merge pull request #240 from DSheirer/234-long-alias-names-cause-audio-label-to-wrap
Long alias names cause audio label to wrap
2017-03-31 01:13:17 +00:00
Denny
a628800a71 Resolves #234 - updates the miglayout layout manager to allow jlabel text strings to be automatically truncated (with ellipses) when the alias name is too long. 2017-03-30 21:12:06 -04:00
Denny
25f71a76c4 Resolves #234 - hard codes alias name truncation when name exceeds 33 characters in length. 2017-03-30 20:03:48 -04:00
Denny
5fe8ccd478 Resolves #234 - change the order of assigning an icon and alias text to the audio panel in an attempt to prevent the audio channel panel from wrapping to the next line when the text is too long to display. 2017-03-30 19:52:35 -04:00
Denny Sheirer
069f951a86 Merge pull request #239 from DSheirer/228-traffic-channel-allocation-for-do-not-monitor
Traffic channel manager now allocates traffic channels for do not monitor aliases
2017-03-30 23:27:38 +00:00
Denny
dab6df7836 Resolves #228 - traffic channel manager now allocates traffic channels even when the alias is marked as do not monitor 2017-03-30 19:26:35 -04:00
Denny Sheirer
89da46b63c Merge pull request #238 from DSheirer/235-lojack-decoder-error-on-construction
Resolves error on constructing a LoJack decoder state.
2017-03-30 23:19:29 +00:00
Denny
5f2ce2a9f2 Resolves #235 - fixes error on constructing a LoJack decoder state. 2017-03-30 19:18:39 -04:00
Denny
ffc92a8f0e WIP - adds remez channelizer builder, working toward combined support (remez & sync) via the filter factory. 2017-03-30 19:16:37 -04:00
Denny
6d9e129087 WIP - adds windowed-sinc (nyquist) filter designer and polyphase channelizer filter designer to FilterFactory. Resolves a few issues with Window designers. ChannelizerViewer is now able to show 800 channels with 12.5 kHz channelization of a 10 MHz bandwidth input signal. 2017-03-26 10:23:38 -04:00
Denny Sheirer
7a0b377971 Merge pull request #232 from DSheirer/229-p25-phase2-event-duplicates
Resolves #229 - duplicate P25 TDMA call events.
2017-03-23 21:52:47 +00:00
Denny
5dbe0ecce3 Resolves #229 - duplicate P25 TDMA call events. 2017-03-23 21:48:52 +00:00
Denny Sheirer
6647c581a6 Merge pull request #231 from DSheirer/230-p25-tdma-frequency-bands
P25 Phase II TDMA frequency bands are now displayed in details summary
2017-03-23 21:01:58 +00:00
Denny
a2ab5bfa95 Resolves #230 - P25 Phase II TDMA frequency bands are now displayed in the channel details summary. 2017-03-23 20:55:42 +00:00
Denny
0e1da8fb3b Updates intellij files and includes missing library 2017-03-23 11:31:15 +00:00
Denny
7d5371db4c Updates build to 0.3.0 Beta 9 2017-03-20 06:12:15 -04:00
Denny
ed486440b8 Merge remote-tracking branch 'origin/master' 2017-03-12 11:33:17 -04:00
Denny
13464e01fc Updates build to 0.3.0 Beta 9 2017-03-12 11:33:04 -04:00
Denny Sheirer
ea46a8b0e8 Merge pull request #225 from DSheirer/222-spectral-display-of-frequency-correction-offset
Frequency change event handling in the processing chain
2017-03-11 17:03:34 +00:00
Denny
d510c34356 Adds frequency change event listener handler to LSM decoder. 2017-03-11 12:01:45 -05:00
Denny
ae8a44caed Removes cic cleanup filter from processing chain. 2017-03-11 11:53:12 -05:00
Denny
1aa85a86ca Resolves issue with channel frequency correction events not being broadcast within the processing chain and rendering in the spectral display. 2017-03-11 10:16:08 -05:00
Denny Sheirer
17539d4d55 Merge pull request #224 from DSheirer/223-now-playing-frequency-format
Now Playing frequency display formatting
2017-03-11 11:14:58 +00:00
Denny
1db1d28390 Resolves issue with frequency display formating in the Now Playing window. 2017-03-11 06:13:59 -05:00
Denny
131290fcd2 WIP - experiments 2017-03-11 06:08:23 -05:00
Denny Sheirer
37a941e904 Merge pull request #219 from DSheirer/218-audio-priority-
Resolves issue with audio playback allowing higher priority audio to preempt lower priority audio
2017-03-05 12:34:09 +00:00
Denny
57f6655824 Resolves issue where higher priority audio was not preempting lower priority audio. 2017-03-05 07:32:42 -05:00
Denny
e2fe06638b Incrementing build to version 0.3.0 beta8 2017-03-05 05:55:04 -05:00
Denny Sheirer
4cd8f8209f Merge pull request #216 from DSheirer/215-audio-recording-handles-part-2
215 audio recording handles part 2
2017-03-03 15:49:24 +00:00
Denny
61bfef5798 Incrementing build to version 0.3.0 beta8 2017-03-03 10:44:50 -05:00
Denny
ef172a04c6 Cleanup - removed synchronized blocks since the buffer processor thread is the only thread managing recorders. 2017-03-03 10:04:21 -05:00
Denny
a877afcceb Updates buffer processing in recorder manager so that we're not blocking any of the decoding channel producer threads that are trying to push audio packets to the recorder manager. Adds an overflowable packet queue and services the queue once a second followed by an idle recorder check (and disposal). 2017-03-03 10:01:32 -05:00
Denny
17c16e16ee Adds a new remez designer that uses BigDecimal to handle the larger values inherent in longer length filters. However, this designer is hugely inefficient and takes forever to calculate the filter. More experimentation needed. 2017-03-02 19:17:22 -05:00
Denny
cd4eaedfcc Merge branch 'master' into 39-polyphase-channelizer 2017-02-26 13:35:33 -05:00
Denny
fd748fec79 [WIP] Using different filters 2017-02-20 20:16:38 -05:00
Denny
14b844f0bd [WIP] Channelizing 6.4 MHz sample rate into 512 channels with with 512-point FFT on each channel at frame rate of 20 fps. 2017-02-19 10:37:44 -05:00
Denny
99ef002d07 [WIP] working on polyphase channelizer and testing viewer 2017-02-19 08:22:37 -05:00
Denny
e868428c88 [WIP] working on polyphase channelizer and testing viewer 2017-02-18 11:05:21 -05:00
Denny
d2542d2560 Merge branch 'master' into 39-polyphase-channelizer
# Conflicts:
#	src/dsp/filter/design/FilterViewer.java
2017-02-18 07:34:18 -05:00
Denny
9ca87299d5 [WIP] Polyphase channelizer experiments 2017-02-06 04:19:09 -05:00
1435 changed files with 68402 additions and 53834 deletions

View File

@@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="imports/commons-lang3-3.2.1.jar"/>
<classpathentry kind="lib" path="imports/jide-oss-3.5.15.jar"/>
<classpathentry kind="lib" path="imports/jsr80-1.0.1.jar"/>
<classpathentry kind="lib" path="imports/libusb4java-1.2.0-linux-arm.jar"/>
<classpathentry kind="lib" path="imports/libusb4java-1.2.0-linux-x86_64.jar"/>
<classpathentry kind="lib" path="imports/libusb4java-1.2.0-linux-x86.jar"/>
<classpathentry kind="lib" path="imports/libusb4java-1.2.0-osx-x86_64.jar"/>
<classpathentry kind="lib" path="imports/libusb4java-1.2.0-osx-x86.jar"/>
<classpathentry kind="lib" path="imports/libusb4java-1.2.0-windows-x86_64.jar"/>
<classpathentry kind="lib" path="imports/libusb4java-1.2.0-windows-x86.jar"/>
<classpathentry kind="lib" path="imports/miglayout-4.0-swing.jar"/>
<classpathentry kind="lib" path="imports/usb-api-1.0.2.jar"/>
<classpathentry kind="lib" path="imports/usb4java-1.2.0.jar"/>
<classpathentry kind="lib" path="imports/usb4java-javax-1.2.0.jar"/>
<classpathentry kind="lib" path="config"/>
<classpathentry kind="lib" path="imports/JTransforms-3.0.jar" sourcepath="/home/denny/.m2/repository/com/github/wendykierp/JTransforms/3.0/JTransforms-3.0-sources.jar"/>
<classpathentry kind="lib" path="imports/libusb4java-1.2.0-linux-ppc.jar"/>
<classpathentry kind="lib" path="imports/JLargeArrays-1.2.jar"/>
<classpathentry kind="lib" path="imports/slf4j-api-1.7.7.jar"/>
<classpathentry kind="lib" path="imports/logback-classic-1.1.2.jar"/>
<classpathentry kind="lib" path="imports/logback-core-1.1.2.jar"/>
<classpathentry kind="lib" path="imports/commons-io-2.4.jar"/>
<classpathentry kind="lib" path="imports/jmbe-interface-0.3.2.jar"/>
<classpathentry kind="lib" path="imports/tablefilter-swing-5.2.1.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/home/denny/Downloads/tablefilter-swing-5.2.1-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -1,4 +0,0 @@
[Dolphin]
Timestamp=2015,9,8,20,39,49
Version=3
ViewMode=1

35
.gitignore vendored
View File

@@ -1,6 +1,35 @@
*.class
### JetBrains template
.idea/
/classes*
/product*
/bin*
out/
.directory
.settings
.settings
## File-based project format:
*.iws
*.iml
# mpeltonen/sbt-idea plugin
.idea_modules/
### Java template
*.class
*.log
# Package Files #
*.jar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### Gradle template
.gradle
/build/
# Ignore Gradle GUI config
gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
# Cache of project
.gradletasknamecache

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value />
</option>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default (1)" />
</component>
</project>

21
.idea/compiler.xml generated
View File

@@ -1,22 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
<entry name="!?*.aj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="sdr-trunk_main" target="1.8" />
<module name="sdr-trunk_test" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>

View File

@@ -1,9 +0,0 @@
<component name="CopyrightManager">
<settings default="sdrtrunk">
<LanguageOptions name="__TEMPLATE__">
<option name="addBlankAfter" value="false" />
<option name="separateBefore" value="true" />
<option name="separateAfter" value="true" />
</LanguageOptions>
</settings>
</component>

View File

@@ -1,6 +0,0 @@
<component name="CopyrightManager">
<copyright>
<option name="myName" value="sdrtrunk" />
<option name="notice" value="sdrtrunk &#10;Copyright (C) 2014-&amp;#36;today.year Dennis Sheirer&#10;&#10;This program is free software: you can redistribute it and/or modify&#10;it under the terms of the GNU General Public License as published by&#10;the Free Software Foundation, either version 3 of the License, or&#10;(at your option) any later version.&#10;&#10;This program is distributed in the hope that it will be useful,&#10;but WITHOUT ANY WARRANTY; without even the implied warranty of&#10;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the&#10;GNU General Public License for more details.&#10; &#10;You should have received a copy of the GNU General Public License&#10;along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;&#10;" />
</copyright>
</component>

View File

@@ -3,13 +3,20 @@
<words>
<w>bahroo</w>
<w>broadcastify</w>
<w>correlator</w>
<w>dinf</w>
<w>esnid</w>
<w>fleetsync</w>
<w>heterdyned</w>
<w>heterodynes</w>
<w>icecast</w>
<w>ident</w>
<w>nutall</w>
<w>overflowable</w>
<w>polyphase</w>
<w>qpsk</w>
<w>remez</w>
<w>resampler</w>
<w>samplerate</w>
<w>sdrtrunk</w>
<w>sheirer</w>

View File

@@ -1,33 +1,12 @@
<component name="libraryTable">
<library name="imports">
<CLASSES>
<root url="jar://$PROJECT_DIR$/imports/logback-classic-1.1.2.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/usb-api-1.0.2.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/commons-io-2.4.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/commons-lang3-3.2.1.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/tablefilter-swing-5.2.1.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/libusb4java-1.2.0-linux-x86.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/JLargeArrays-1.2.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/libusb4java-1.2.0-linux-ppc.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/libusb4java-1.2.0-windows-x86.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/libusb4java-1.2.0-osx-x86.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/miglayout-4.0-swing.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/libusb4java-1.2.0-windows-x86_64.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/usb4java-1.2.0.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/jide-oss-3.5.15.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/libusb4java-1.2.0-linux-x86_64.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/logback-core-1.1.2.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/usb4java-javax-1.2.0.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/jsr80-1.0.1.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/libusb4java-1.2.0-linux-arm.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/libusb4java-1.2.0-osx-x86_64.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/JTransforms-3.0.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/jmbe-interface-0.3.3.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/java-lame-3.98.4.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/commons-codec-1.9.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/commons-logging-1.2.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/slf4j-api-1.7.21.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/libusb4java-1.2.0-linux-aarch64.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/radioreference-14.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/wsdl4j-1.5.1.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/commons-math3-3.6.1.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/libresample4j-0.1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />

View File

@@ -1,20 +0,0 @@
<component name="libraryTable">
<library name="org.asynchttpclient:async-http-client:2.0.18" type="repository">
<properties maven-id="org.asynchttpclient:async-http-client:2.0.18" />
<CLASSES>
<root url="jar://$PROJECT_DIR$/imports/slf4j-api-1.7.21.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/javassist-3.20.0-GA.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/axis.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/jaxrpc.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/commons-discovery-0.2.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/activation-1.1.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/java-mail-1.4.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/wsdl4j-1.5.1.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/radioreference-14.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/mina-core-2.0.16.jar!/" />
<root url="jar://$PROJECT_DIR$/imports/mina-http-2.0.16.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

40
.idea/misc.xml generated
View File

@@ -1,44 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ClientPropertiesManager">
<properties class="javax.swing.AbstractButton">
<property name="hideActionText" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JComponent">
<property name="html.disable" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JEditorPane">
<property name="JEditorPane.w3cLengthUnits" class="java.lang.Boolean" />
<property name="JEditorPane.honorDisplayProperties" class="java.lang.Boolean" />
<property name="charset" class="java.lang.String" />
</properties>
<properties class="javax.swing.JList">
<property name="List.isFileList" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JPasswordField">
<property name="JPasswordField.cutCopyAllowed" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JSlider">
<property name="Slider.paintThumbArrowShape" class="java.lang.Boolean" />
<property name="JSlider.isFilled" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JTable">
<property name="Table.isFileList" class="java.lang.Boolean" />
<property name="JTable.autoStartsEdit" class="java.lang.Boolean" />
<property name="terminateEditOnFocusLost" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JToolBar">
<property name="JToolBar.isRollover" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JTree">
<property name="JTree.lineStyle" class="java.lang.String" />
</properties>
<properties class="javax.swing.text.JTextComponent">
<property name="caretAspectRatio" class="java.lang.Double" />
<property name="caretWidth" class="java.lang.Integer" />
</properties>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

4
.idea/modules.xml generated
View File

@@ -2,7 +2,9 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/sdrtrunk.iml" filepath="$PROJECT_DIR$/sdrtrunk.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/sdr-trunk.iml" filepath="$PROJECT_DIR$/.idea/modules/sdr-trunk.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/sdr-trunk_main.iml" filepath="$PROJECT_DIR$/.idea/modules/sdr-trunk_main.iml" group="sdr-trunk" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/sdr-trunk_test.iml" filepath="$PROJECT_DIR$/.idea/modules/sdr-trunk_test.iml" group="sdr-trunk" />
</modules>
</component>
</project>

124
.idea/uiDesigner.xml generated
View File

@@ -1,124 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

12
.idea/vcs.xml generated
View File

@@ -1,6 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="IssueNavigationConfiguration">
<option name="links">
<list>
<IssueNavigationLink>
<option name="issueRegexp" value="#(\d+)" />
<option name="linkRegexp" value="https://github.com/DSheirer/sdrtrunk/issues/$1" />
</IssueNavigationLink>
</list>
</option>
</component>
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>sdrtrunk</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>

View File

@@ -1,12 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8

View File

@@ -1,5 +1,24 @@
0.3.4 20180418
- New P25 C4FM decoder that uses Differential QPSK decoder instead of FM demodulation with 4FSK.
- Adds channel auto-start and ordering capability with startup dialog allowing user to invoke or bypass channel
auto-start. Provides user with more control over startup configuration.
- Adds preferred tuner attribute to channel configuration allowing user to select a preferred tuner for the channel
0.3.0-beta1 20170129
0.3.3 20171225
- Changes build system from ant to gradle. Thanks to: Roman Tsypuk https://github.com/tsypuk
- Adds LIST and ID3 metadata to wav audio recordings
0.3.2 20171105
- Resolves issue with tuner frequency adjustments that was causing channel processing
to lockup and show persistent 'overflow' state in each channel status
- Resolves issue with broadcastify 'mountpoint-in-use' error handling and updates
memory usage logging
- Resolves issue with Shoutcast 2 login error
0.3.1 20171009
- Resolves Java 9 incompatibility issues
0.3.0 20170922
- REQUIRES: Java 8 (or newer) for compatibility and eventual changeover to JavaFX
- FEATURE: audio streaming - adds capability to stream to multiple remote broadcast
servers (Broadcastify, Icecast v2.3 and v2.4+, and Shoutcast V1 and V2). Each
@@ -34,7 +53,7 @@
- Updated Baseband (I/Q) recording at 48 kHz
- Added Airspy tuner support
- New traffic channel pool manager for trunked call following
- P25 Decoder for C4FM and LSM with trunked call following and audio
- P25 Decoder for C4FM and LSM with trunked call following and audio
decoding via the JMBE library
- Updated MPT1327 decoder and trunked call following.
- Updated spectral and waterfall display with zoom (2-64x) and pan and automatic

View File

@@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
@@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -1,11 +1,78 @@
# sdrtrunk
A cross-platform java application for decoding, monitoring, recording and streaming trunked mobile and related radio protocols using Software Defined Radios (SDR).
* [Getting Started](https://github.com/DSheirer/sdrtrunk/wiki/GettingStarted)
* [User's Manual Version 0.2.0](https://github.com/DSheirer/sdrtrunk/wiki/UserManual)
* [User's Manual Version 0.3.0](https://github.com/DSheirer/sdrtrunk/wiki/UserManual_Version0.3.0)
* [Getting Started](https://github.com/DSheirer/sdrtrunk/wiki/GettingStarted_V0.3.0)
* [User's Manual Version 0.3.0](https://github.com/DSheirer/sdrtrunk/wiki/UserManual_V0.3.0)
* [Download](https://github.com/DSheirer/sdrtrunk/releases)
* [Support](https://groups.google.com/forum/#!forum/sdrtrunk)
![sdrtrunk Application Overview - Version 0.3.0](https://github.com/DSheirer/sdrtrunk/wiki/images/ApplicationOverview_V0.3.0.png)
**Figure 1:** sdrtrunk **Version 0.3.0** Application Screenshot
![sdrtrunk Application Overview - Version 0.3.0](https://github.com/DSheirer/sdrtrunk/wiki/v0.3/images/ApplicationOverview_V0.3.0.png)
**Figure 1:** sdrtrunk **Version 0.3.0** Application Screenshot
# End User Instructions:
If you simply want to download and run the program, please follow these instructions.
## Install Java 8 (or newer)
## Download the latest sdrtrunk release
All release versions of sdrtrunk are available from the [releases](https://github.com/DSheirer/sdrtrunk/releases) tab.
**(final)** These versions have been tested and are the current release version.
**(beta)** These versions are currently being tested for bugs and functionality.
## Run the application
Either double-click on the downloaded file (if supported on your operating system) or open a terminal/command window
and change to the directory where you downloaded the release file and type:
```
java -jar downloaded-jar-filename
```
Note: replace _downloaded-jar-filename_ with the actual name of the sdrtrunk release version that you downloaded
## Optional - P25 Audio
If you're using sdrtrunk with a P25 trunked radio system, the [JMBE](https://github.com/DSheirer/sdrtrunk/wiki/JMBE) wiki page contains instructions
for downloading the JMBE audio library source code and compiling the JMBE library. Copy the resulting JMBE audio library
jar file to the same folder containing the sdrtrunk application to use the library with sdrtrunk.
# Developer Instructions:
If you're interested in modifying and/or compiling the source code, please follow these instructions to use gradle to compile the code.
## Build the project
sdrtrunk uses gradle as the build system. You can build it with locally installed gradle or if you do not have/want
to install gradle you can use preconfigured linux/windows wrapper.
### Build with locally installed gradle 4.3.1
```
gradle clean buildSdr
```
### Build with preconfigured wrapper for linux/windows
Linux
```
./gradlew clean buildSdr
```
Windows
```
gradle.bat clean buildSdr
```
This would add gradle, download all project dependencies and build JAR
## Development
All dependencies/versions are controlled from build.gradle.
To change the new release version tag of artifact - change property:
```
version = '0.3.2'
```
## Run SDRTrunk
SDRTrunk is packed into single uber-jar file. There is need to have folders with dependencies and
adding them with classpath. Just run with java.
### Use Java8
```
java -jar build/libs/sdr-trunk-all-0.3.2.jar
```

75
build.gradle Normal file
View File

@@ -0,0 +1,75 @@
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
}
}
apply plugin: 'java'
apply plugin: 'idea'
repositories {
jcenter()
mavenCentral()
}
version = '0.4.0-alpha.4'
sourceCompatibility = 1.8
sourceSets {
main.java.srcDirs 'src/main'
test.java.srcDirs 'src/test'
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
dependencies {
testCompile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core:3.8.0'
compile fileTree(dir: 'imports', include: '*.jar')
compile 'org.apache.commons:commons-lang3:3.7'
compile 'org.apache.commons:commons-io:1.3.2'
compile 'org.slf4j:slf4j-api:1.7.25'
compile 'ch.qos.logback:logback-core:1.2.3'
compile 'ch.qos.logback:logback-classic:1.2.3'
compile 'com.miglayout:miglayout-swing:5.0'
compile 'org.usb4java:usb4java-javax:1.2.0'
compile 'org.usb4java:usb4java:1.2.0'
compile 'org.usb4java:libusb4java:1.2.0'
compile 'javax.usb:usb-api:1.0.2'
compile 'com.github.wendykierp:JTransforms:3.1'
compile 'pl.edu.icm:JLargeArrays:1.6'
compile 'net.coderazzi:tablefilter-swing:5.3.1'
compile 'com.jidesoft:jide-oss:3.4.3'
compile 'org.apache.mina:mina-core:2.0.16'
compile 'org.apache.mina:mina-http:2.0.16'
compile 'org.apache.axis:axis-jaxrpc:1.4'
compile 'org.apache.axis:axis:1.4'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.3'
compile 'org.kordamp.ikonli:ikonli-javafx:2.1.1'
compile 'org.kordamp.ikonli:ikonli-fontawesome-pack:2.1.1'
}
task wrapper(type: Wrapper) {
gradleVersion = '4.3.1'
}
task buildSdr(type: Jar) {
manifest {
attributes 'Implementation-Title': 'SdrTrunk project',
'Implementation-Version': version,
'Main-Class': 'io.github.dsheirer.gui.SDRTrunk',
'Class-Path': 'jmbe-0.3.2.jar jmbe-0.3.3.jar'
}
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}

View File

@@ -1,121 +0,0 @@
<project name="SDRTrunk" default="SDRTrunk" basedir=".">
<description>
Ant build script for SDRTrunk Decoder Application
</description>
<!-- version properties -->
<property name="major" value="0"/>
<property name="minor" value="3"/>
<property name="patch" value="0"/>
<property name="release" value="-beta7"/>
<property name="filename" value="sdrtrunk_${major}.${minor}.${patch}${release}"/>
<!-- Build properties -->
<property name="repo" location=".."/>
<property name="source.code" location="${repo}/src"/>
<property name="source.configs" location="${repo}/config"/>
<property name="source.images" location="${repo}/images"/>
<property name="source.libs" location="${repo}/imports"/>
<property name="source.license" location="${repo}/license"/>
<property name="source.scripts" location="${repo}/scripts"/>
<property name="output" location="${repo}/product"/>
<property name="output.classes" location="${repo}/classes"/>
<property name="output.folder" location="${output}/sdrtrunk"/>
<property name="output.config" location="${output.folder}/config"/>
<property name="output.images" location="${output.folder}/images"/>
<property name="output.libs" location="${output.folder}/libs"/>
<path id="classpath">
<fileset dir="${source.libs}" includes="*.jar" />
</path>
<target name="init">
<!-- Create the classes folder to contain the compiled java classes -->
<mkdir dir="${output.classes}"/>
<!-- Create version file -->
<echo message="${major}.${minor}.${patch}-${release}" file="${output.classes}/sdrtrunk-version"/>
</target>
<target name="compile" depends="clean,init" description="Compile java classes" >
<javac srcdir="${source.code}" destdir="${output.classes}" classpathref="classpath" includeantruntime="false" />
</target>
<target name="SDRTrunk" depends="compile" description="Create SDRTrunk application" >
<!-- Create the distribution directory -->
<mkdir dir="${output.folder}"/>
<!-- Create jar file -->
<jar jarfile="${output.folder}/sdrtrunk.jar" basedir="${output.classes}">
<manifest>
<attribute name="Title" value="sdrtrunk"/>
<attribute name="Main-Class" value="gui.SDRTrunk"/>
<attribute name="Version" value="${major}.${minor}.${patch}-${release}"/>
</manifest>
<fileset dir="${source.configs}">
<exclude name="*.rules"/>
</fileset>
<fileset dir="${source.license}">
<include name="license.txt"/>
</fileset>
</jar>
<!-- Copy third-party libraries -->
<mkdir dir="${output.libs}"/>
<copy todir="${output.libs}">
<fileset dir="${source.libs}" includes="*.jar" />
</copy>
<!-- Copy config files -->
<mkdir dir="${output.config}"/>
<copy todir="${output.config}">
<fileset dir="${source.configs}">
<include name="*.rules"/>
</fileset>
</copy>
<!-- Copy image files -->
<mkdir dir="${output.images}"/>
<copy todir="${output.images}">
<fileset dir="${source.images}" />
</copy>
<!-- Copy license file -->
<copy todir="${output.folder}">
<fileset dir="${source.license}">
<include name="license.txt"/>
</fileset>
</copy>
<!-- Copy program scripts -->
<copy todir="${output.folder}">
<fileset dir="${source.scripts}" />
</copy>
<!-- Bundle the files into .zip -->
<zip destfile="${output}/${filename}.zip" basedir="${output}" />
<!-- Remove linux start script before tar task -->
<delete file="${output.folder}/run_sdrtrunk_linux.sh"/>
<!-- Bundle files into .tar.gz and copy/set permissions on linux start script -->
<tar destfile="${output}/${filename}.tar.gz" compression="gzip">
<tarfileset dir="${output.folder}" prefix="sdrtrunk" />
<tarfileset dir="${source.scripts}" prefix="sdrtrunk" filemode="777">
<include name="run_sdrtrunk_linux.sh"/>
</tarfileset>
</tar>
<delete dir="${output.folder}"/>
</target>
<target name="clean" description="Clean previous build artifacts" >
<delete dir="${output.classes}"/>
<delete dir="${output}"/>
</target>
</project>

View File

@@ -1,33 +0,0 @@
<configuration>
<timestamp key="appstart" datePattern="HHmmss"/>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/SDRTrunk/logs/sdrtrunk_app.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily log rollover -->
<fileNamePattern>${user.home}/SDRTrunk/logs/%d{yyyyMMdd}_sdrtrunk_app.log</fileNamePattern>
<maxHistory>10</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%-25(%d{yyyyMMdd HHmmss.SSS} [%thread]) %-5level %logger{30} - %msg%n</pattern>
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="FILE" />
</root>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%-12(%d{HH:mm:ss.SSS}) %-5level %logger{25} - %msg%n</pattern>
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="STDOUT" />
</root>
<!-- Apache Mina TCP/HTTP library -->
<logger name="org.apache.mina" level="INFO" />
</configuration>

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,5 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

172
gradlew vendored Executable file
View File

@@ -0,0 +1,172 @@
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"

84
gradlew.bat vendored Normal file
View File

@@ -0,0 +1,84 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@@ -1,4 +0,0 @@
[Dolphin]
PreviewsShown=true
Timestamp=2013,9,20,8,54,21
Version=3

View File

@@ -1,4 +0,0 @@
[Dolphin]
Timestamp=2013,4,7,10,12,39
Version=3
ViewMode=1

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,17 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2014-2016 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/

View File

@@ -1,2 +0,0 @@
#!/bin/bash
java -XX:+UseG1GC -cp "*:libs/*" gui.SDRTrunk

View File

@@ -1 +0,0 @@
java -XX:+UseG1GC -cp "SDRTrunk.jar;*;libs/*;config/*;images/*" gui.SDRTrunk

104
sdr-trunk.ipr Normal file
View File

@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac"/>
<resourceExtensions>
<entry name=".+\.(properties|xml|html|dtd|tld)"/>
<entry name=".+\.(gif|png|jpeg|jpg)"/>
</resourceExtensions>
<wildcardResourcePatterns>
<entry name="!?*.class"/>
<entry name="!?*.scala"/>
<entry name="!?*.java"/>
<entry name="!?*.groovy"/>
</wildcardResourcePatterns>
<annotationProcessing enabled="false" useClasspath="true"/>
<bytecodeTargetLevel target="1.8"/>
</component>
<component name="CopyrightManager" default="">
<module2copyright/>
</component>
<component name="DependencyValidationManager">
<option name="SKIP_IMPORT_STATEMENTS" value="false"/>
</component>
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false"/>
<component name="GradleUISettings">
<setting name="root"/>
</component>
<component name="GradleUISettings2">
<setting name="root"/>
</component>
<component name="IdProvider" IDEtalkID="11DA1DB66DD62DDA1ED602B7079FE97C"/>
<component name="JavadocGenerationManager">
<option name="OUTPUT_DIRECTORY"/>
<option name="OPTION_SCOPE" value="protected"/>
<option name="OPTION_HIERARCHY" value="true"/>
<option name="OPTION_NAVIGATOR" value="true"/>
<option name="OPTION_INDEX" value="true"/>
<option name="OPTION_SEPARATE_INDEX" value="true"/>
<option name="OPTION_DOCUMENT_TAG_USE" value="false"/>
<option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false"/>
<option name="OPTION_DOCUMENT_TAG_VERSION" value="false"/>
<option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true"/>
<option name="OPTION_DEPRECATED_LIST" value="true"/>
<option name="OTHER_OPTIONS" value=""/>
<option name="HEAP_SIZE"/>
<option name="LOCALE"/>
<option name="OPEN_IN_BROWSER" value="true"/>
</component>
<component name="ProjectModuleManager">
<modules>
<module filepath="$PROJECT_DIR$/sdr-trunk.iml" fileurl="file://$PROJECT_DIR$/sdr-trunk.iml"/>
</modules>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" assert-keyword="true" jdk-15="true" project-jdk-type="JavaSDK" assert-jdk-15="true" project-jdk-name="1.8">
<output url="file://$PROJECT_DIR$/out"/>
</component>
<component name="SvnBranchConfigurationManager">
<option name="mySupportsUserInfoFilter" value="true"/>
</component>
<component name="VcsDirectoryMappings">
<mapping directory="" vcs=""/>
</component>
<component name="masterDetails">
<states>
<state key="ArtifactsStructureConfigurable.UI">
<UIState>
<splitter-proportions>
<SplitterProportionsDataImpl/>
</splitter-proportions>
<settings/>
</UIState>
</state>
<state key="Copyright.UI">
<UIState>
<splitter-proportions>
<SplitterProportionsDataImpl/>
</splitter-proportions>
</UIState>
</state>
<state key="ProjectJDKs.UI">
<UIState>
<splitter-proportions>
<SplitterProportionsDataImpl>
<option name="proportions">
<list>
<option value="0.2"/>
</list>
</option>
</SplitterProportionsDataImpl>
</splitter-proportions>
<last-edited>1.6</last-edited>
</UIState>
</state>
<state key="ScopeChooserConfigurable.UI">
<UIState>
<splitter-proportions>
<SplitterProportionsDataImpl/>
</splitter-proportions>
<settings/>
</UIState>
</state>
</states>
</component>
</project>

View File

@@ -6,20 +6,9 @@
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/images" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/config" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$" type="java-resource" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="imports" level="project" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../jmbe/jmbe/library/jmbe-0.3.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" name="org.asynchttpclient:async-http-client:2.0.18" level="project" />
</component>
</module>

1
settings.gradle Normal file
View File

@@ -0,0 +1 @@
rootProject.name = 'sdr-trunk'

View File

@@ -1,4 +0,0 @@
[Dolphin]
Timestamp=2015,9,1,6,42,59
Version=3
ViewMode=1

View File

@@ -1,354 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2014-2016 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/
package alias;
import java.awt.Color;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlTransient;
import alias.action.AliasAction;
import alias.id.AliasID;
import alias.id.AliasIDType;
import alias.id.broadcast.BroadcastChannel;
import alias.id.nonrecordable.NonRecordable;
import alias.id.priority.Priority;
@XmlSeeAlso( { AliasID.class, AliasAction.class } )
@XmlRootElement( name = "alias" )
public class Alias
{
private String mList;
private String mGroup;
private String mName;
private int mColor;
private String mIconName;
private List<AliasID> mAliasIDs = new ArrayList<AliasID>();
private List<AliasAction> mAliasActions = new ArrayList<AliasAction>();
public Alias()
{
}
public Alias( String name )
{
mName = name;
}
public String toString()
{
return getName();
}
@XmlAttribute( name="name" )
public String getName()
{
return mName;
}
public void setName( String name )
{
mName = name;
}
@XmlAttribute( name="list" )
public String getList()
{
return mList;
}
public void setList( String list )
{
mList = list;
}
public boolean hasList()
{
return mList != null;
}
@XmlAttribute( name="group" )
public String getGroup()
{
return mGroup;
}
public void setGroup( String group )
{
mGroup = group;
}
public boolean hasGroup()
{
return mGroup != null;
}
@XmlAttribute
public int getColor()
{
return mColor;
}
public void setColor( int color )
{
mColor = color;
}
public Color getDisplayColor()
{
return new Color( getColor() );
}
@XmlAttribute
public String getIconName()
{
return mIconName;
}
public void setIconName( String iconName )
{
mIconName = iconName;
}
@XmlElement( name="id" )
public List<AliasID> getId()
{
return mAliasIDs;
}
public void setId( ArrayList<AliasID> id )
{
mAliasIDs = id;
}
public void addAliasID( AliasID id )
{
mAliasIDs.add( id );
}
public void removeAliasID( AliasID id )
{
mAliasIDs.remove( id );
}
@XmlElement( name="action" )
public List<AliasAction> getAction()
{
return mAliasActions;
}
public void setAction( List<AliasAction> actions )
{
mAliasActions = actions;
}
public void addAliasAction( AliasAction action )
{
mAliasActions.add( action );
}
public void removeAliasAction( AliasAction action )
{
mAliasActions.remove( action );
}
public boolean hasActions()
{
return !mAliasActions.isEmpty();
}
/**
* Perform any validation/cleanup actions on this alias.
*/
public void validate()
{
}
/**
* Returns the priority level of this alias, if defined, or the default priority
*/
@XmlTransient
public int getCallPriority()
{
for( AliasID id: mAliasIDs )
{
if( id.getType() == AliasIDType.PRIORITY)
{
return ((Priority)id).getPriority();
}
}
return Priority.DEFAULT_PRIORITY;
}
public boolean hasCallPriority()
{
for( AliasID id: mAliasIDs )
{
if( id.getType() == AliasIDType.PRIORITY)
{
return true;
}
}
return false;
}
/**
* Sets or updates the call priority
*/
public void setCallPriority( int priority )
{
if( priority == Priority.DO_NOT_MONITOR ||
( Priority.MIN_PRIORITY <= priority && priority <= Priority.MAX_PRIORITY ) )
{
for( AliasID id: mAliasIDs )
{
if( id.getType() == AliasIDType.PRIORITY)
{
((Priority)id).setPriority( priority );
return;
}
}
//If we don't find a priority id, create one
Priority p = new Priority();
p.setPriority( priority );
addAliasID( p );
}
}
/**
* Inspects the alias for a non-recordable alias id. Default is true;
*/
@XmlTransient
public boolean isRecordable()
{
for( AliasID id: getId() )
{
if( id.getType() == AliasIDType.NON_RECORDABLE)
{
return false;
}
}
return true;
}
/**
* Sets or removes the non-recordable alias ID for this alias.
*/
public void setRecordable( boolean recordable )
{
if( recordable )
{
AliasID toRemove = null;
for( AliasID id: getId() )
{
if( id.getType() == AliasIDType.NON_RECORDABLE)
{
toRemove = id;
break;
}
}
if( toRemove != null )
{
removeAliasID( toRemove );
}
}
else
{
for( AliasID id: getId() )
{
if( id.getType() == AliasIDType.NON_RECORDABLE)
{
return;
}
}
addAliasID( new NonRecordable() );
}
}
/**
* Inspects the alias for broadcast channel/streamable alias ids. Default is false;
*/
@XmlTransient
public boolean isStreamable()
{
for( AliasID id: getId() )
{
if( id.getType() == AliasIDType.BROADCAST_CHANNEL)
{
return true;
}
}
return false;
}
/**
* List of broadcast channels specified for this alias.
*/
@XmlTransient
public Set<BroadcastChannel> getBroadcastChannels()
{
Set<BroadcastChannel> broadcastChannels = new TreeSet<>();
for(AliasID id: getId())
{
if(id.getType() == AliasIDType.BROADCAST_CHANNEL)
{
broadcastChannels.add((BroadcastChannel)id);
}
}
return broadcastChannels;
}
/**
* Indicates if this alias contains a broadcast channel alias id with the channel name.
*/
public boolean hasBroadcastChannel(String channel)
{
if(channel == null || channel.isEmpty())
{
return false;
}
for(AliasID id: getId())
{
if(id.getType() == AliasIDType.BROADCAST_CHANNEL &&
((BroadcastChannel)id).getChannelName().contentEquals(channel))
{
return true;
}
}
return false;
}
}

View File

@@ -1,58 +0,0 @@
/*******************************************************************************
* sdrtrunk
* Copyright (C) 2014-2017 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
******************************************************************************/
package alias.action;
import alias.Alias;
import alias.action.beep.BeepAction;
import alias.action.clip.ClipAction;
import alias.action.script.ScriptAction;
import message.Message;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlTransient;
import java.util.concurrent.ScheduledExecutorService;
/**
* Alias action defines an action to execute when an alias is detected active.
*/
@XmlSeeAlso( { BeepAction.class, ClipAction.class, ScriptAction.class } )
@XmlRootElement( name = "action" )
public abstract class AliasAction
{
public AliasAction()
{
}
@XmlTransient
public abstract AliasActionType getType();
/**
* Task to execute when an alias action is defined. The message argument is
* the original message containing one or more aliases that have an alias
* action attached. The alias argument is the parent alias containing the
* alias action.
*/
public abstract void execute( ScheduledExecutorService scheduledExecutorService, Alias alias, Message message );
/**
* Dismiss a persistent alias action
*/
public abstract void dismiss( boolean reset );
}

View File

@@ -1,28 +0,0 @@
package alias.action.beep;
import message.Message;
import alias.Alias;
import alias.action.AliasActionType;
import alias.action.RecurringAction;
public class BeepAction extends RecurringAction
{
@Override
public AliasActionType getType()
{
return AliasActionType.BEEP;
}
@Override
public void performAction( Alias alias, Message message )
{
System.out.println( "\007" );
}
@Override
public String toString()
{
return "Beep";
}
}

View File

@@ -1,110 +0,0 @@
package alias.action.clip;
import java.io.File;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;
import javax.xml.bind.annotation.XmlTransient;
import message.Message;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import alias.Alias;
import alias.action.AliasActionType;
import alias.action.RecurringAction;
public class ClipAction extends RecurringAction
{
private final static Logger mLog = LoggerFactory.getLogger( ClipAction.class );
private String mFilePath;
@XmlTransient
private Clip mClip;
public ClipAction()
{
}
@Override
public AliasActionType getType()
{
return AliasActionType.CLIP;
}
public String getPath()
{
return mFilePath;
}
public void setPath( String path )
{
mFilePath = path;
}
@Override
public void performAction( Alias alias, Message message )
{
try
{
play();
}
catch( Exception e )
{
mLog.error( "Couldn't play audio clip", e );
}
}
public void play() throws Exception
{
try
{
if( mFilePath != null )
{
if( mClip == null )
{
mClip = AudioSystem.getClip();
AudioInputStream ais =
AudioSystem.getAudioInputStream( new File( mFilePath ) );
mClip.open( ais );
}
if( mClip.isRunning() )
{
mClip.stop();
}
mClip.setFramePosition( 0 );
mClip.start();
}
}
catch( Exception e )
{
mClip = null;
mLog.error( "Error playing sound clip [" + mFilePath + "] - " + e.getMessage() );
throw e;
}
}
@Override
public String toString()
{
if( mFilePath == null )
{
return "Play Clip";
}
else
{
return "Play Clip: " + mFilePath;
}
}
}

View File

@@ -1,98 +0,0 @@
package alias.action.script;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import message.Message;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import alias.Alias;
import alias.action.AliasActionType;
import alias.action.RecurringAction;
public class ScriptAction extends RecurringAction
{
private final static Logger mLog = LoggerFactory.getLogger( ScriptAction.class );
private String mScript;
public ScriptAction()
{
}
@Override
public AliasActionType getType()
{
return AliasActionType.SCRIPT;
}
public String getScript()
{
return mScript;
}
public void setScript( String script )
{
mScript = script;
}
@Override
public void performAction( Alias alias, Message message )
{
try
{
play();
}
catch( Exception e )
{
mLog.error( "Couldn't execute script [" + mScript + "]", e );
}
}
public void play() throws Exception
{
if( mScript != null )
{
ProcessBuilder pb = new ProcessBuilder( mScript );
pb.redirectErrorStream( true );
Process p = pb.start();
int exitCode = p.waitFor();
BufferedReader reader = new BufferedReader(
new InputStreamReader( p.getInputStream() ) );
String line = "";
StringBuilder sb = new StringBuilder();
while( ( line = reader.readLine() ) != null )
{
sb.append(line + "\n");
}
if( exitCode != 0 )
{
throw new RuntimeException( "Exit Code: " + exitCode +
" Console:" + sb.toString() );
}
}
}
@Override
public String toString()
{
if( mScript == null )
{
return "Run Script";
}
else
{
return "Run Script: " + mScript;
}
}
}

View File

@@ -1,57 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2014-2016 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/
package alias.id;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlTransient;
import alias.id.broadcast.BroadcastChannel;
import playlist.version1.Group;
import alias.id.esn.Esn;
import alias.id.fleetsync.FleetsyncID;
import alias.id.lojack.LoJackFunctionAndID;
import alias.id.mdc.MDC1200ID;
import alias.id.mobileID.Min;
import alias.id.mpt1327.MPT1327ID;
import alias.id.nonrecordable.NonRecordable;
import alias.id.priority.Priority;
import alias.id.siteID.SiteID;
import alias.id.status.StatusID;
import alias.id.talkgroup.TalkgroupID;
import alias.id.uniqueID.UniqueID;
@SuppressWarnings( "deprecation" )
@XmlSeeAlso( {BroadcastChannel.class, Esn.class, FleetsyncID.class, Group.class, LoJackFunctionAndID.class,
MDC1200ID.class, Min.class, MPT1327ID.class, NonRecordable.class,
Priority.class, SiteID.class, StatusID.class, TalkgroupID.class,
UniqueID.class } )
@XmlRootElement( name = "id" )
public abstract class AliasID
{
public AliasID()
{
}
public abstract AliasIDType getType();
public abstract boolean matches( AliasID id );
@XmlTransient
public abstract boolean isValid();
}

View File

@@ -1,138 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2015 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/
package alias.id.lojack;
import javax.xml.bind.annotation.XmlAttribute;
import module.decode.lj1200.LJ1200Message;
import module.decode.lj1200.LJ1200Message.Function;
import alias.id.AliasID;
import alias.id.AliasIDType;
public class LoJackFunctionAndID extends AliasID
{
private LJ1200Message.Function mFunction = Function.F0_UNKNOWN;
private String mID = "*****";
public LoJackFunctionAndID()
{
}
@XmlAttribute( name="id" )
public String getID()
{
return mID;
}
public void setID( String id )
{
mID = id;
}
@XmlAttribute( name="function" )
public Function getFunction()
{
return mFunction;
}
public void setFunction( Function function )
{
mFunction = function;
}
@Override
public boolean isValid()
{
return mFunction != null && mID != null;
}
public String toString()
{
return "LoJack FUNC: " + mFunction.getLabel() + " ID:" + ( mID == null ? "" : mID );
}
/**
* Indicates if the function and id combination match this alias id
*/
public boolean matches( Function function, String id )
{
return mFunction == function &&
mID != null &&
id != null &&
id.matches( mID.replace( "*", ".?" ) );
}
@Override
public boolean matches( AliasID id )
{
boolean retVal = false;
if( mID != null && id instanceof LoJackFunctionAndID )
{
LoJackFunctionAndID otherLojack = (LoJackFunctionAndID)id;
if( otherLojack.getFunction() == mFunction )
{
//Create a pattern - replace * wildcards with regex single-char wildcard
String pattern = mID.replace( "*", ".?" );
retVal = otherLojack.getID().matches( pattern );
}
}
return retVal;
}
@Override
public AliasIDType getType()
{
return AliasIDType.LOJACK;
}
@Override
public int hashCode()
{
final int prime = 31;
int result = 1;
result = prime * result
+ ( ( mFunction == null ) ? 0 : mFunction.hashCode() );
result = prime * result + ( ( mID == null ) ? 0 : mID.hashCode() );
return result;
}
@Override
public boolean equals( Object obj )
{
if ( this == obj )
return true;
if ( obj == null )
return false;
if ( getClass() != obj.getClass() )
return false;
LoJackFunctionAndID other = (LoJackFunctionAndID) obj;
if ( mFunction != other.mFunction )
return false;
if ( mID == null )
{
if ( other.mID != null )
return false;
} else if ( !mID.equals( other.mID ) )
return false;
return true;
}
}

View File

@@ -1,79 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2014 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/
package alias.id.mdc;
import javax.xml.bind.annotation.XmlAttribute;
import alias.id.AliasID;
import alias.id.AliasIDType;
public class MDC1200ID extends AliasID
{
private String mID;
public MDC1200ID()
{
}
@XmlAttribute
public String getIdent()
{
return mID;
}
public void setIdent( String ident )
{
mID = ident;
}
@Override
public boolean isValid()
{
return mID != null;
}
public String toString()
{
return "MDC-1200: " + mID;
}
@Override
public boolean matches( AliasID id )
{
boolean retVal = false;
if( mID != null && id instanceof MDC1200ID )
{
MDC1200ID tgid = (MDC1200ID)id;
//Create a pattern - replace * wildcards with regex single-char wildcard
String pattern = mID.replace( "*", ".?" );
retVal = tgid.getIdent().matches( pattern );
}
return retVal;
}
@Override
public AliasIDType getType()
{
return AliasIDType.MDC1200;
}
}

View File

@@ -1,81 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2014 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/
package alias.id.mobileID;
import javax.xml.bind.annotation.XmlAttribute;
import alias.id.AliasID;
import alias.id.AliasIDType;
/**
* Mobile ID Number
*/
public class Min extends AliasID
{
private String mMin;
public Min()
{
}
@XmlAttribute
public String getMin()
{
return mMin;
}
public void setMin( String min )
{
mMin = min;
}
@Override
public boolean isValid()
{
return mMin != null;
}
public String toString()
{
return "MIN: " + mMin;
}
@Override
public boolean matches( AliasID id )
{
boolean retVal = false;
if( mMin != null && id instanceof Min )
{
Min min = (Min)id;
//Create a pattern - replace * wildcards with regex single-char wildcard
String pattern = mMin.replace( "*", ".?" );
retVal = min.getMin().matches( pattern );
}
return retVal;
}
@Override
public AliasIDType getType()
{
return AliasIDType.MIN;
}
}

View File

@@ -1,78 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2014 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/
package alias.id.mpt1327;
import javax.xml.bind.annotation.XmlAttribute;
import alias.id.AliasID;
import alias.id.AliasIDType;
public class MPT1327ID extends AliasID
{
private String mID;
public MPT1327ID()
{
}
@XmlAttribute
public String getIdent()
{
return mID;
}
public void setIdent( String ident )
{
mID = ident;
}
@Override
public boolean isValid()
{
return mID != null;
}
public String toString()
{
return "MPT-1327: " + mID;
}
@Override
public boolean matches( AliasID id )
{
boolean retVal = false;
if( mID != null && id instanceof MPT1327ID )
{
MPT1327ID tgid = (MPT1327ID)id;
//Create a pattern - replace * wildcards with regex single-char wildcard
String pattern = mID.replace( "*", ".?" );
retVal = tgid.getIdent().matches( pattern );
}
return retVal;
}
@Override
public AliasIDType getType()
{
return AliasIDType.MPT1327;
}
}

View File

@@ -1,31 +0,0 @@
package alias.id.nonrecordable;
import alias.id.AliasID;
import alias.id.AliasIDType;
public class NonRecordable extends AliasID
{
@Override
public AliasIDType getType()
{
return AliasIDType.NON_RECORDABLE;
}
@Override
public boolean isValid()
{
return true;
}
@Override
public boolean matches( AliasID id )
{
return false;
}
@Override
public String toString()
{
return "Audio Non-Recordable";
}
}

View File

@@ -1,83 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2014 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/
package alias.id.priority;
import javax.xml.bind.annotation.XmlAttribute;
import alias.id.AliasID;
import alias.id.AliasIDType;
/**
* Specifies an (audio) priority level for this alias.
*/
public class Priority extends AliasID
{
public static final int DO_NOT_MONITOR = -1;
public static final int SELECTED_PRIORITY = 0;
public static final int MIN_PRIORITY = 1;
public static final int MAX_PRIORITY = 100;
public static final int DEFAULT_PRIORITY = 100;
private int mPriority = DEFAULT_PRIORITY;
public Priority()
{
}
@Override
public boolean isValid()
{
return true;
}
/**
* Indicates the associated alias should not be monitored or tracked.
*/
public boolean isDoNotMonitor()
{
return mPriority == DO_NOT_MONITOR;
}
@XmlAttribute
public int getPriority()
{
return mPriority;
}
public void setPriority( int priority )
{
mPriority = priority;
}
public String toString()
{
return "Audio Priority: " + ( isDoNotMonitor() ? "Do Not Monitor" : mPriority );
}
@Override
public boolean matches( AliasID id )
{
return false;
}
@Override
public AliasIDType getType()
{
return AliasIDType.PRIORITY;
}
}

View File

@@ -1,68 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2014 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/
package alias.id.siteID;
import javax.xml.bind.annotation.XmlAttribute;
import alias.id.AliasID;
import alias.id.AliasIDType;
public class SiteID extends AliasID
{
private String mSite;
public SiteID()
{
}
@XmlAttribute
public String getSite()
{
return mSite;
}
public void setSite( String site )
{
mSite = site;
}
@Override
public boolean isValid()
{
return mSite != null;
}
public String toString()
{
return "Site: " + mSite;
}
@Override
public boolean matches( AliasID otherID )
{
return otherID != null &&
otherID instanceof SiteID &&
getSite().contentEquals( ( (SiteID)otherID).getSite() );
}
@Override
public AliasIDType getType()
{
return AliasIDType.SITE;
}
}

View File

@@ -1,75 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2014 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/
package alias.id.status;
import javax.xml.bind.annotation.XmlAttribute;
import alias.id.AliasID;
import alias.id.AliasIDType;
public class StatusID extends AliasID
{
private int mStatus;
public StatusID()
{
}
@XmlAttribute
public int getStatus()
{
return mStatus;
}
public void setStatus( int status )
{
this.mStatus = status;
}
@Override
public boolean isValid()
{
return true;
}
public String toString()
{
return "Status: " + String.format( "%03d", mStatus );
}
@Override
public boolean matches( AliasID id )
{
boolean retVal = false;
if( id instanceof StatusID )
{
StatusID statusId = (StatusID)id;
retVal = ( mStatus == statusId.getStatus() );
}
return retVal;
}
@Override
public AliasIDType getType()
{
return AliasIDType.STATUS;
}
}

View File

@@ -1,75 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2014 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/
package alias.id.uniqueID;
import javax.xml.bind.annotation.XmlAttribute;
import alias.id.AliasID;
import alias.id.AliasIDType;
public class UniqueID extends AliasID
{
private int mUid;
public UniqueID()
{
}
@XmlAttribute
public int getUid()
{
return mUid;
}
public void setUid( int uid )
{
this.mUid = uid;
}
@Override
public boolean isValid()
{
return true;
}
public String toString()
{
return "UniqueID: " + mUid;
}
@Override
public boolean matches( AliasID id )
{
boolean retVal = false;
if( id instanceof UniqueID )
{
UniqueID uid = (UniqueID)id;
retVal = mUid == uid.getUid();
}
return retVal;
}
@Override
public AliasIDType getType()
{
return AliasIDType.LTR_NET_UID;
}
}

View File

@@ -1,188 +0,0 @@
/*******************************************************************************
* sdrtrunk
* Copyright (C) 2014-2017 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
******************************************************************************/
package audio;
import audio.squelch.ISquelchStateListener;
import audio.squelch.SquelchState;
import channel.metadata.Metadata;
import dsp.filter.design.FilterDesignException;
import dsp.filter.fir.FIRFilterSpecification;
import dsp.filter.fir.remez.RemezFIRFilterDesigner;
import dsp.filter.polyphase.PolyphaseFIRDecimatingFilter_RB;
import module.Module;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import sample.Listener;
import sample.real.IFilteredRealBufferListener;
import sample.real.RealBuffer;
import java.util.concurrent.ScheduledExecutorService;
/**
* Provides packaging of demodulated audio sample buffers into audio packets for
* broadcast to registered audio packet listeners. Includes audio packet
* metadata in constructed audio packets.
*
* Incorporates audio squelch state listener to control if audio packets are
* broadcast or ignored.
*/
public class AudioModule extends Module implements IAudioPacketProvider, IFilteredRealBufferListener,
ISquelchStateListener, Listener<RealBuffer>
{
protected static final Logger mLog = LoggerFactory.getLogger(AudioModule.class);
private static float[] mDecimationCoefficients;
static
{
//Band-pass filter to both decimate (48kHz to 8kHz) and block 0 - 300 Hz (LTR signalling).
FIRFilterSpecification specification = FIRFilterSpecification.bandPassBuilder()
.sampleRate(48000)
.stopFrequency1(150)
.passFrequencyBegin(300)
.passFrequencyEnd(3500)
.stopFrequency2(4000)
.stopRipple(0.0004)
.passRipple(0.008)
.build();
RemezFIRFilterDesigner designer = new RemezFIRFilterDesigner(specification);
try
{
if(!designer.isValid())
{
throw new FilterDesignException("Couldn't design the audio decimation filter");
}
mDecimationCoefficients = designer.getImpulseResponse();
}
catch(FilterDesignException e)
{
mLog.debug("Error designing filter", e);
}
}
private SquelchStateListener mSquelchStateListener = new SquelchStateListener();
private SquelchState mSquelchState = SquelchState.SQUELCH;
private Listener<AudioPacket> mAudioPacketListener;
private PolyphaseFIRDecimatingFilter_RB mAudioDecimationFilter;
private Metadata mMetadata;
public AudioModule(Metadata metadata)
{
mMetadata = metadata;
mAudioDecimationFilter = new PolyphaseFIRDecimatingFilter_RB(mDecimationCoefficients, 6, 2.0f);
mAudioDecimationFilter.setListener(new Listener<RealBuffer>()
{
@Override
public void receive(RealBuffer realBuffer)
{
if(mAudioPacketListener != null)
{
AudioPacket packet = new AudioPacket(realBuffer.getSamples(), mMetadata.copyOf());
mAudioPacketListener.receive(packet);
}
}
});
}
@Override
public void dispose()
{
mSquelchStateListener = null;
mAudioPacketListener = null;
}
@Override
public void reset()
{
}
@Override
public void start(ScheduledExecutorService executor)
{
/* No start operations provided */
}
@Override
public void stop()
{
/* Issue an end audio packet in case a recorder is still rolling */
if(mAudioPacketListener != null)
{
mAudioPacketListener.receive(new AudioPacket(AudioPacket.Type.END, mMetadata.copyOf()));
}
}
/**
* Processes demodulated audio samples into audio packets with current audio
* metadata and sends to the registered listener
*/
@Override
public void receive(RealBuffer buffer)
{
if(mAudioPacketListener != null && mSquelchState == SquelchState.UNSQUELCH)
{
mAudioDecimationFilter.receive(buffer);
}
}
@Override
public Listener<RealBuffer> getFilteredRealBufferListener()
{
return this;
}
@Override
public void setAudioPacketListener(Listener<AudioPacket> listener)
{
mAudioPacketListener = listener;
}
@Override
public void removeAudioPacketListener()
{
mAudioPacketListener = null;
}
@Override
public Listener<SquelchState> getSquelchStateListener()
{
return mSquelchStateListener;
}
/**
* Wrapper for squelch state listener
*/
public class SquelchStateListener implements Listener<SquelchState>
{
@Override
public void receive(SquelchState state)
{
if(state == SquelchState.SQUELCH && mAudioPacketListener != null)
{
mAudioPacketListener.receive(new AudioPacket(AudioPacket.Type.END, mMetadata.copyOf()));
}
mSquelchState = state;
}
}
}

View File

@@ -1,56 +0,0 @@
package audio;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import sample.Listener;
public class AudioPacketRateCounter implements Listener<AudioPacket>
{
private final static Logger mLog =
LoggerFactory.getLogger( AudioPacketRateCounter.class );
private Listener<AudioPacket> mListener;
private long mCount;
private long mStartTime = -1;
private String mName;
public AudioPacketRateCounter()
{
mName = "UNNAMED";
}
public AudioPacketRateCounter( String name )
{
mName = name;
}
@Override
public void receive( AudioPacket packet )
{
if( mStartTime == -1 )
{
mStartTime = System.currentTimeMillis();
}
mCount += packet.getAudioBuffer().getSamples().length;
long elapsed = System.currentTimeMillis() - mStartTime;
if( elapsed != 0 )
{
mLog.debug( "[" + mName + "] Audio Rate: " + ( mCount / elapsed ) + " kHz" );
}
if( mListener != null )
{
mListener.receive( packet );
}
}
public void setListener( Listener<AudioPacket> listener )
{
mListener = listener;
}
}

View File

@@ -1,8 +0,0 @@
package audio;
import sample.Listener;
public interface IAudioPacketListener
{
public Listener<AudioPacket> getAudioPacketListener();
}

View File

@@ -1,9 +0,0 @@
package audio;
import sample.Listener;
public interface IAudioPacketProvider
{
public void setAudioPacketListener( Listener<AudioPacket> listener );
public void removeAudioPacketListener();
}

View File

@@ -1,40 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2015 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/
package audio.squelch;
/**
* Provides squelch control based on presense of decoded audio samples.
*
* NOTE: this class is not yet fully implemented with audio sample processing
* and currently only provides user driven squelch control
*/
public class ManualSquelchController extends SquelchController
{
public ManualSquelchController()
{
mSquelchMode = SquelchMode.NONE;
}
@Override
public void setSquelchMode( SquelchMode mode )
{
//TODO: add functionality
}
}

View File

@@ -1,122 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2015 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/
package audio.squelch;
import sample.Broadcaster;
import sample.Listener;
import sample.real.RealBuffer;
import sample.real.RealSampleListener;
import sample.real.RealToRealBufferAssembler;
/**
* Squelch control - receives single audio samples or real audio buffers and
* adjusts squelch state either based on the audio samples or based on external
* control inputs.
*
* Assembles received single audio samples into real sample buffers for
* consumption by an external audio processor, like the AudioPacketProcessor
* class.
*/
public abstract class SquelchController
implements Listener<RealBuffer>, RealSampleListener
{
private Broadcaster<SquelchState> mSquelchStateBroadcaster = new Broadcaster<>();
private Listener<RealBuffer> mAudioListener;
protected SquelchState mSquelchState = SquelchState.UNSQUELCH;
protected SquelchMode mSquelchMode = SquelchMode.MANUAL;
private RealToRealBufferAssembler mSampleAssembler = new RealToRealBufferAssembler( 512 );
public SquelchController()
{
mSampleAssembler.setListener( this );
}
@Override
public void receive( float sample )
{
mSampleAssembler.receive( sample );
}
@Override
public void receive( RealBuffer buffer )
{
if( mAudioListener != null )
{
mAudioListener.receive( buffer );
}
}
public abstract void setSquelchMode( SquelchMode mode );
public SquelchMode getSquelchMode()
{
return mSquelchMode;
}
public void setSquelchState( SquelchState state )
{
mSquelchState = state;
}
public SquelchState getSquelchState()
{
return mSquelchState;
}
public boolean isSquelched()
{
switch( mSquelchMode )
{
case AUTOMATIC:
case MANUAL:
return mSquelchState == SquelchState.SQUELCH;
case NONE:
return false;
default:
return false;
}
}
public void addSquelchStateListener( Listener<SquelchState> listener )
{
if( listener != null )
{
mSquelchStateBroadcaster.addListener( listener );
/* Send current squelch state to the listener */
listener.receive( mSquelchState );
}
}
public void removeSquelchStateListener( Listener<SquelchState> listener )
{
mSquelchStateBroadcaster.removeListener( listener );
}
public void setAudioListener( Listener<RealBuffer> listener )
{
mAudioListener = listener;
}
public void removeAudioListener( Listener<RealBuffer> listener )
{
mAudioListener = null;
}
}

View File

@@ -1,55 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2015 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/
package audio.squelch;
public class TrunkingSquelchController extends SquelchController
{
private boolean mAllowSquelchOverride = true;
public TrunkingSquelchController()
{
}
/**
* Provides control over audio stream as directed by an external trunking
* channel state.
*
* Override automatic squelch control by setting the squelch mode to none.
*
* Disable automatic control override by setting allowManualOverride to false;
*
* Note: this control does not respond to squelch mode manual.
*/
public TrunkingSquelchController( boolean allowSquelchOverride )
{
mAllowSquelchOverride = allowSquelchOverride;
mSquelchMode = SquelchMode.AUTOMATIC;
}
@Override
public void setSquelchMode( SquelchMode mode )
{
if( mode == SquelchMode.AUTOMATIC ||
( mode == SquelchMode.NONE && mAllowSquelchOverride ) )
{
mSquelchMode = mode;
}
}
}

View File

@@ -1,6 +0,0 @@
package bits;
public interface ISyncDetectListener
{
public void syncDetected();
}

View File

@@ -1,6 +0,0 @@
package bits;
public interface ISyncProcessor
{
public void checkSync( long value );
}

View File

@@ -1,243 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2014 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/
package bits;
import java.util.ArrayList;
import java.util.Iterator;
import sample.Broadcaster;
import sample.Listener;
import dsp.symbol.SyncDetectListener;
import dsp.symbol.SyncDetectProvider;
/**
* MessageFramer - processes bitsets looking for a sync pattern within
* the bits, and then extracts the message, including the sync
* pattern, for a total bit length of messageLength.
*
* Will extract multiple messages simultaneously, for each sync pattern that is
* encountered within the bitset bit stream.
*/
public class MessageFramer implements Listener<Boolean>,
SyncDetectProvider
{
private boolean[] mSyncPattern;
private int mMessageLength;
private SyncDetectListener mSyncDetectListener;
private Broadcaster<BinaryMessage> mBroadcaster =
new Broadcaster<BinaryMessage>();
private ArrayList<MessageAssembler> mMessageAssemblers =
new ArrayList<MessageAssembler>();
private ArrayList<MessageAssembler> mCompletedMessageAssemblers =
new ArrayList<MessageAssembler>();
private BinaryMessage mPreviousBuffer = null;
private SyncPatternMatcher mMatcher;
public MessageFramer( boolean[] syncPattern, int messageLength )
{
mSyncPattern = syncPattern;
mMatcher = new SyncPatternMatcher( syncPattern );
mMessageLength = messageLength;
}
public void reset()
{
for( MessageAssembler assembler: mMessageAssemblers )
{
assembler.dispose();
}
mMessageAssemblers.clear();
}
public void dispose()
{
mBroadcaster.dispose();
mCompletedMessageAssemblers.clear();
mMessageAssemblers.clear();
}
@Override
public void receive( Boolean bit )
{
mMatcher.receive( bit );
Iterator<MessageAssembler> it = mMessageAssemblers.iterator();
MessageAssembler assembler;
while( it.hasNext() )
{
assembler = it.next();
/* Dispose and remove any completed assemblers */
if( assembler.complete() )
{
assembler.dispose();
it.remove();
}
/* Otherwise, send them the bit */
else
{
assembler.receive( bit );
}
}
/* Check for sync match and add new message assembler */
if( mMatcher.matches() )
{
addMessageAssembler( new MessageAssembler( mMessageLength, mSyncPattern ) );
/* Notify any sync detect listener(s) */
if( mSyncDetectListener != null )
{
mSyncDetectListener.syncDetected();
}
}
}
/**
* Causes all messages currently under assembly to be forcibly
* sent (ie flushed) to all registered message listeners, and
* subsequently, all assemblers to be deleted
*/
public void flush()
{
for( MessageAssembler assembler: mMessageAssemblers )
{
assembler.flush();
}
}
@Override
public void setSyncDetectListener( SyncDetectListener listener )
{
mSyncDetectListener = listener;
}
/**
* Allow a message listener to register with this framer to receive
* all framed messages
*/
public void addMessageListener( Listener<BinaryMessage> listener )
{
mBroadcaster.addListener( listener );
}
public void removeMessageListener( Listener<BinaryMessage> listener )
{
mBroadcaster.removeListener( listener );
}
/*
* Adds a message assembler to receive bits from the bit stream
*/
private void addMessageAssembler( MessageAssembler assembler )
{
mMessageAssemblers.add( assembler );
}
@SuppressWarnings( "unused" )
private void removeMessageAssembler( MessageAssembler assembler )
{
mMessageAssemblers.remove( assembler );
}
/**
* Assembles a binary message, starting with the initial fill of the
* identified sync pattern, and every bit thereafter. Once the accumulated
* bits equal the message length, the message is sent and the assembler
* flags itself as complete.
*
* By design, multiple message assemblers can exist at the same time, each
* assembling different, overlapping potential messages
*/
private class MessageAssembler implements Listener<Boolean>
{
BinaryMessage mMessage;
boolean mComplete = false;
MessageAssembler( int messageLength )
{
mMessage = new BinaryMessage( messageLength );
}
MessageAssembler( int messageLength, boolean[] initialFill )
{
this( messageLength );
/* Pre-load the message with the sync pattern */
for( int x = 0; x < initialFill.length; x++ )
{
receive( initialFill[ x ] );
}
}
public void dispose()
{
mMessage = null;
}
@Override
/**
* Receives one bit at a time, and assembles them into a message
*/
public void receive( Boolean bit )
{
try
{
mMessage.add( bit );
}
catch( BitSetFullException e )
{
e.printStackTrace();
}
/* Once our message is complete (ie full), send it to all registered
* message listeners, and set complete flag so for auto-removal */
if( mMessage.isFull() )
{
mComplete = true;
flush();
}
}
/**
* Flushes/Sends the current message, or partial message, and sets
* complete flag to true, so that we can be auto-removed
*/
public void flush()
{
mBroadcaster.receive( mMessage );
mComplete = true;
}
/**
* Flag to indicate when this assembler has received all of the bits it
* is looking for (ie message length), and should then be removed from
* receiving any more bits
*/
public boolean complete()
{
return mComplete;
}
}
}

View File

@@ -1,111 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2014 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/
package bits;
import org.apache.commons.lang3.Validate;
import java.util.ArrayList;
import java.util.List;
/**
* Multi-Sync pattern matcher. Accepts multiple sync detector objects for
* comparision against the incoming bit stream.
*
* Note: works for sync patterns up to 63 bits (integer size - 1 ) long.
* If a 64 bit or larger sync pattern is applied, then the wrapping feature
* of the Long.rotate methods will wrap the MSB around to the LSB and
* corrupt the matching value.
*
*/
public class MultiSyncPatternMatcher
{
private List<ISyncProcessor> mSyncProcessors = new ArrayList<ISyncProcessor>();
private long mBits = 0;
private long mMask = 0;
public MultiSyncPatternMatcher( int syncSize )
{
Validate.isTrue(syncSize < 64);
//Setup a bit mask of all ones the length of the sync pattern
mMask = (long)( ( Math.pow( 2, syncSize ) ) - 1 );
}
public void dispose()
{
mSyncProcessors.clear();
}
/**
* Processes two bits before checking sync processors for a match.
*/
public void receive( boolean bit1, boolean bit2 )
{
mBits = Long.rotateLeft( mBits, 1 );
mBits &= mMask;
if( bit1 )
{
mBits += 1;
}
mBits = Long.rotateLeft( mBits, 1 );
mBits &= mMask;
if( bit2 )
{
mBits += 1;
}
for( ISyncProcessor processor: mSyncProcessors )
{
processor.checkSync( mBits );
}
}
/**
* Processes one bit before checking sync processors for a match.
*/
public void receive( boolean bit )
{
mBits = Long.rotateLeft( mBits, 1 );
mBits &= mMask;
if( bit )
{
mBits += 1;
}
for( ISyncProcessor processor: mSyncProcessors )
{
processor.checkSync( mBits );
}
}
/**
* Adds a sync processor to receive the bit stream.
*/
public void add( ISyncProcessor processor )
{
mSyncProcessors.add( processor );
}
}

View File

@@ -1,48 +0,0 @@
package bits;
public class SoftSyncDetector implements ISyncProcessor
{
private ISyncDetectListener mListener;
private long mPattern;
private int mThreshold;
public SoftSyncDetector( ISyncDetectListener listener, long pattern, int threshold )
{
this( pattern, threshold );
mListener = listener;
}
public SoftSyncDetector( long pattern, int threshold )
{
mPattern = pattern;
mThreshold = threshold;
}
public void dispose()
{
mListener = null;
}
@Override
public void checkSync( long value )
{
long difference = value ^ mPattern;
if( ( difference == 0 || Long.bitCount( difference ) <= mThreshold ) &&
mListener != null )
{
mListener.syncDetected();
}
}
public void setThreshold( int threshold )
{
mThreshold = threshold;
}
public void setListener( ISyncDetectListener listener )
{
mListener = listener;
}
}

View File

@@ -1,33 +0,0 @@
package bits;
public class SyncDetector implements ISyncProcessor
{
private long mPattern;
private ISyncDetectListener mListener;
public SyncDetector( long pattern )
{
mPattern = pattern;
}
public SyncDetector( long pattern, ISyncDetectListener listener )
{
this( pattern );
mListener = listener;
}
public void setListener( ISyncDetectListener listener )
{
mListener = listener;
}
@Override
public void checkSync( long value )
{
if( value == mPattern && mListener != null )
{
mListener.syncDetected();
}
}
}

View File

@@ -1,132 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2014 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/
package bits;
/**
* Sync pattern matcher.
*
* Note: works for sync patterns up to 63 bits (integer size - 1 ) long.
* If a 64 bit or larger sync pattern is applied, then the wrapping feature
* of the Long.rotate methods will wrap the MSB around to the LSB and
* corrupt the matching value.
*
*/
public class SyncPatternMatcher
{
private long mBits = 0;
private long mMask = 0;
private long mSync = 0;
private boolean mSoftMode = false;
private int mSoftModeErrorThreshold = 0;
public SyncPatternMatcher( boolean[] syncPattern )
{
//Setup a bit mask of all ones the length of the sync pattern
mMask = (long)( ( Math.pow( 2, syncPattern.length ) ) - 1 );
//Convert the sync bits into a long value for comparison
for( int x = 0; x < syncPattern.length; x++ )
{
if( syncPattern[ x ] )
{
mSync += 1l << ( syncPattern.length - 1 - x );
}
}
}
public SyncPatternMatcher( long sync )
{
mSync = sync;
mMask = getMask( sync );
}
/**
* Constructs the sync pattern matcher and defines the soft mode maximum
* number of bit errors to allow in the pattern match.
*
* @param sync pattern
* @param softModeErrorThreshold - maximum bit errors (ie pattern mismatch
* positions) when considering a sync match
*/
public SyncPatternMatcher( long sync, int softModeErrorThreshold )
{
this( sync );
mSoftModeErrorThreshold = softModeErrorThreshold;
}
/**
* Generates an all ones mask corresponding to the sync pattern
*/
private static long getMask( long sync )
{
long mask = sync;
for( int x = 1; x < 64; x *= 2 )
{
mask |= ( mask >> x );
}
return mask;
}
public void receive( boolean bit )
{
//Left shift the previous value
mBits = Long.rotateLeft( mBits, 1 );
//Apply the mask to erase the previous MSB
mBits &= mMask;
//Add in the new bit
if( bit )
{
mBits += 1;
}
}
/**
* Indicates if the most recently received bit sequence matches the
* sync pattern
*/
public boolean matches()
{
if( mSoftMode )
{
long difference = mBits ^ mSync;
return difference == 0 ||
Long.bitCount( difference ) <= mSoftModeErrorThreshold;
}
else
{
return ( mBits == mSync );
}
}
/**
* Sets the sync pattern matcher in soft mode which allows up to the soft
* mode threshold number of bit errors when considering a sync pattern match
*/
public void setSoftMode( boolean softMode )
{
mSoftMode = softMode;
}
}

View File

@@ -1,107 +0,0 @@
/*******************************************************************************
* SDR Trunk
* Copyright (C) 2014 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
******************************************************************************/
package buffer;
import java.util.Arrays;
/**
* Circular Buffer - implements a circular buffer with a method to get the
* current head of the buffer, and put a new value in its place at the same
* time
*
* Also provides averaging over the elements in the buffer
*/
public class BooleanAveragingBuffer {
private boolean[] mBuffer;
private int mBufferPointer;
public BooleanAveragingBuffer( int length )
{
mBuffer = new boolean[ length ];
//Preload the array with false values
Arrays.fill( mBuffer, false );
}
public boolean get( boolean newValue )
{
//Fetch current boolean value
boolean retVal = mBuffer[ mBufferPointer ];
//Load the new value into the buffer
put( newValue );
return retVal;
}
/**
* Loads the newValue into this buffer and adjusts the buffer pointer
* to prepare for the next get/put cycle
*/
private void put( boolean newValue )
{
//Store the new value to the buffer
mBuffer[ mBufferPointer ] = newValue;
//Increment the buffer pointer
mBufferPointer++;
//Wrap the buffer pointer around to 0 when necessary
if( mBufferPointer >= mBuffer.length )
{
mBufferPointer = 0;
}
}
/**
* Loads the newValue into the buffer, calculates the average
* and returns that average from this method
*
* This effectively performs low-pass filtering
*/
public boolean getAverage( boolean newValue )
{
//Load the new value into the buffer
put( newValue );
int trueCount = 0;
for( int x = 0; x < mBuffer.length; x++ )
{
if( mBuffer[ x ] )
{
trueCount++;
}
}
/**
* If the number of true values in the buffer is
* more than half, return true, otherwise, false
*/
if( trueCount > (int)( mBuffer.length / 2 ) )
{
return true;
}
else
{
return false;
}
}
}

Some files were not shown because too many files have changed in this diff Show More