Documentation
¶
Index ¶
Constants ¶
View Source
const ( DeviceUnknown = -1 DeviceMetis = iota DeviceHermes DeviceAngelia DeviceOrion DeviceOrion2 DeviceHermesLite DeviceHermesLite2 DevicePiSDR DeviceRedPitaya )
Device identifiers
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
Protocol int
Device int
Name string
SoftwareVersion byte
Status byte
SupportedReceivers int
ADCs int
Network struct {
MacAddress net.HardwareAddr
Address *net.UDPAddr
}
}
Device is a discovered network SDR
func DiscoverDevice ¶
DiscoverDevice finds an SDR devices at a particular address
func DiscoverDevices ¶
DiscoverDevices finds SDR devices on the network
type Radio ¶
type Radio interface {
Close()
Device() Device
// Receivers() []Receiver
SendSamples([]TransmitSample) error
SetOCOut(uint8)
SetLNAGain(gain uint)
SetSampleRate(speed uint) error
SetTXFrequency(frequency uint)
Start() error
Stop() error
TransmitSamplesPerMessage() uint
// AddReceiver adds a new Receiver to the Radio and returns it
AddReceiver(func([]ReceiveSample)) (Receiver, error)
}
Radio represents an HPSDR radio
type ReceiveSample ¶
ReceiveSample represents a single EP6 IQ sample from the radio
func (ReceiveSample) IFloat ¶
func (rs ReceiveSample) IFloat() float32
IFloat returns the I value as a float
func (ReceiveSample) QFloat ¶
func (rs ReceiveSample) QFloat() float32
QFloat returns the Q value as a float
type Receiver ¶
type Receiver interface {
// SetFrequency sets the receiver center frequency
SetFrequency(frequency uint)
// GetFrequency returns the receiver center frequency
GetFrequency() uint
// Close closes the receiver
Close() error
// IsClosed returns true if the receiver has been closed
IsClosed() bool
}
Receiver represents an HPSDR receiver
Click to show internal directories.
Click to hide internal directories.