Documentation ¶
Index ¶
- func Discover(specString string) (map[string]string, error)
- func DiscoverAll(ctx context.Context, timeout time.Duration, results chan []map[string]string) error
- type CmdResult
- type FlexClient
- func (f *FlexClient) ClientID() string
- func (f *FlexClient) Close() error
- func (f *FlexClient) FindObjects(pfx string) State
- func (f *FlexClient) GetObject(key string) (Object, bool)
- func (f *FlexClient) InitUDP() error
- func (f *FlexClient) PanSet(id string, values Object) CmdResult
- func (f *FlexClient) RadioSet(values Object) CmdResult
- func (f *FlexClient) Run()
- func (f *FlexClient) RunUDP()
- func (f *FlexClient) SendAndWait(cmd string) CmdResult
- func (f *FlexClient) SendCmd(cmd string) uint32
- func (f *FlexClient) SendNotify(cmd string) ResultHandle
- func (f *FlexClient) SendUdp(pkt []byte) error
- func (f *FlexClient) SetMessageChan(ch chan Message)
- func (f *FlexClient) SetStateNotify(ch chan struct{})
- func (f *FlexClient) SetUDPPort(port int)
- func (f *FlexClient) SetVitaChan(ch chan VitaPacket)
- func (f *FlexClient) SliceSet(sliceIdx string, values Object) CmdResult
- func (f *FlexClient) SliceSetFilter(sliceIdx string, filterLo, filterHi int) CmdResult
- func (f *FlexClient) SliceTune(sliceIdx string, freq float64) CmdResult
- func (f *FlexClient) StartUDP() error
- func (f *FlexClient) Subscribe(sub Subscription) Subscription
- func (f *FlexClient) TransmitSet(values Object) CmdResult
- func (f *FlexClient) TransmitTune(val string) CmdResult
- func (f *FlexClient) Unsubscribe(sub Subscription)
- type Message
- type Object
- type ResultHandle
- type State
- type StateUpdate
- type Subscription
- type VitaPacket
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FlexClient ¶
func NewFlexClient ¶
func NewFlexClient(dst string) (*FlexClient, error)
func (*FlexClient) ClientID ¶
func (f *FlexClient) ClientID() string
func (*FlexClient) Close ¶
func (f *FlexClient) Close() error
func (*FlexClient) FindObjects ¶
func (f *FlexClient) FindObjects(pfx string) State
func (*FlexClient) InitUDP ¶
func (f *FlexClient) InitUDP() error
Makes a UDP listen socket and asks the radio to deliver VITA-49 packets to it. Must be done before calling RunUDP.
func (*FlexClient) PanSet ¶ added in v0.5.1
func (f *FlexClient) PanSet(id string, values Object) CmdResult
func (*FlexClient) RadioSet ¶
func (f *FlexClient) RadioSet(values Object) CmdResult
func (*FlexClient) Run ¶
func (f *FlexClient) Run()
func (*FlexClient) RunUDP ¶
func (f *FlexClient) RunUDP()
Requires InitUDP() to have been called. This should be run inside a goroutine, but doesn't create one on its own, so that the caller may create their own and acquire realtime priority for it if they wish.
func (*FlexClient) SendAndWait ¶
func (f *FlexClient) SendAndWait(cmd string) CmdResult
func (*FlexClient) SendCmd ¶
func (f *FlexClient) SendCmd(cmd string) uint32
func (*FlexClient) SendNotify ¶
func (f *FlexClient) SendNotify(cmd string) ResultHandle
func (*FlexClient) SendUdp ¶
func (f *FlexClient) SendUdp(pkt []byte) error
func (*FlexClient) SetMessageChan ¶
func (f *FlexClient) SetMessageChan(ch chan Message)
func (*FlexClient) SetStateNotify ¶ added in v0.5.0
func (f *FlexClient) SetStateNotify(ch chan struct{})
func (*FlexClient) SetUDPPort ¶
func (f *FlexClient) SetUDPPort(port int)
func (*FlexClient) SetVitaChan ¶
func (f *FlexClient) SetVitaChan(ch chan VitaPacket)
func (*FlexClient) SliceSet ¶
func (f *FlexClient) SliceSet(sliceIdx string, values Object) CmdResult
func (*FlexClient) SliceSetFilter ¶
func (f *FlexClient) SliceSetFilter(sliceIdx string, filterLo, filterHi int) CmdResult
func (*FlexClient) SliceTune ¶
func (f *FlexClient) SliceTune(sliceIdx string, freq float64) CmdResult
func (*FlexClient) StartUDP ¶
func (f *FlexClient) StartUDP() error
Calls InitUDP(), returning error if any, then calls RunUDP() in a goroutine. Provided for interface compatibility with existing clients, and for simplicity for those that don't care about RT scheduling.
func (*FlexClient) Subscribe ¶
func (f *FlexClient) Subscribe(sub Subscription) Subscription
func (*FlexClient) TransmitSet ¶
func (f *FlexClient) TransmitSet(values Object) CmdResult
func (*FlexClient) TransmitTune ¶
func (f *FlexClient) TransmitTune(val string) CmdResult
func (*FlexClient) Unsubscribe ¶
func (f *FlexClient) Unsubscribe(sub Subscription)
type ResultHandle ¶ added in v0.2.0
type ResultHandle struct { Serial uint32 C chan CmdResult // contains filtered or unexported fields }
func (*ResultHandle) Close ¶ added in v0.2.0
func (h *ResultHandle) Close()
type StateUpdate ¶
type Subscription ¶
type Subscription struct { Prefix string Updates chan StateUpdate }
type VitaPacket ¶
type VitaPacket struct { Preamble *vita.VitaPacketPreamble Payload []byte }
Click to show internal directories.
Click to hide internal directories.