Documentation
¶
Index ¶
- type RadioCall
- type RadioSystem
- func (sys *RadioSystem) Close()
- func (sys *RadioSystem) ConnectToMaster(address string) error
- func (sys *RadioSystem) GetMaster() *RemoteRadio
- func (sys *RadioSystem) GetMasterID() mototrbo.RadioID
- func (sys *RadioSystem) GetMasterXNLID() uint16
- func (sys *RadioSystem) GetRadioByID(id mototrbo.RadioID) *RemoteRadio
- func (sys *RadioSystem) PeerList() []*RemoteRadio
- type RemoteRadio
- func (r *RemoteRadio) Deregister()
- func (r *RemoteRadio) GetActiveCallCount() int
- func (r *RemoteRadio) GetAlarmStatus() map[string]bool
- func (r *RemoteRadio) GetFirmwareVersion() string
- func (r *RemoteRadio) GetModelName() string
- func (r *RemoteRadio) GetModelNumber() string
- func (r *RemoteRadio) GetRSSI() (float32, float32)
- func (r *RemoteRadio) GetRadioAlias() string
- func (r *RemoteRadio) GetSerialNumber() string
- func (r *RemoteRadio) GetXCMPVersion() string
- func (r *RemoteRadio) GetXNLID() uint16
- func (r *RemoteRadio) InitXNL()
- func (r *RemoteRadio) ListenForCalls(calls chan *RadioCall, callCount chan int)
- func (r *RemoteRadio) SendPacket(pkt mototrbo.Packet)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RadioCall ¶
type RadioCall struct { Group bool Audio bool From mototrbo.RadioID To mototrbo.RadioID Encrypted bool End bool Timeslot byte IsPhone bool Payload []byte StartTime time.Time EndTime time.Time }
RadioCall describes a call on the Radio
type RadioSystem ¶
type RadioSystem struct { MyID mototrbo.RadioID SystemType mototrbo.LinkType // contains filtered or unexported fields }
RadioSystem represents a whole system of Mototrbo Radios
func NewRadioSystem ¶
NewRadioSystem create Radio System with the specified ID and the specified system type
func (*RadioSystem) Close ¶
func (sys *RadioSystem) Close()
Close closes the connection to all the radios in the RadioSystem and deregisters from the master
func (*RadioSystem) ConnectToMaster ¶
func (sys *RadioSystem) ConnectToMaster(address string) error
ConnectToMaster connects to a master repeater
func (*RadioSystem) GetMaster ¶
func (sys *RadioSystem) GetMaster() *RemoteRadio
GetMaster returns the remote radio representing the master radio
func (*RadioSystem) GetMasterID ¶
func (sys *RadioSystem) GetMasterID() mototrbo.RadioID
GetMasterID returns the master radio ID
func (*RadioSystem) GetMasterXNLID ¶
func (sys *RadioSystem) GetMasterXNLID() uint16
GetMasterXNLID returns the master radio XNL Protocol ID
func (*RadioSystem) GetRadioByID ¶
func (sys *RadioSystem) GetRadioByID(id mototrbo.RadioID) *RemoteRadio
GetRadioByID returns the radio by its ID
func (*RadioSystem) PeerList ¶
func (sys *RadioSystem) PeerList() []*RemoteRadio
PeerList sends a peer list request to the master
type RemoteRadio ¶
type RemoteRadio struct { ID mototrbo.RadioID IsMaster bool EntityType xcmp.EntityType Addr *net.UDPAddr // contains filtered or unexported fields }
RemoteRadio represents a radio on the RadioSystem
func NewRadio ¶
func NewRadio(address string, isMaster bool, sys *RadioSystem) (*RemoteRadio, error)
NewRadio creates a new RemoteRadio instance
func (*RemoteRadio) Deregister ¶
func (r *RemoteRadio) Deregister()
Deregister tells the master radio we are no longer part of the system
func (*RemoteRadio) GetActiveCallCount ¶
func (r *RemoteRadio) GetActiveCallCount() int
GetActiveCallCount returns the number of active calls on the remote radio
func (*RemoteRadio) GetAlarmStatus ¶
func (r *RemoteRadio) GetAlarmStatus() map[string]bool
GetAlarmStatus retrieves the remote radio alarm status info
func (*RemoteRadio) GetFirmwareVersion ¶
func (r *RemoteRadio) GetFirmwareVersion() string
GetFirmwareVersion retrieves the remote radio firmware version
func (*RemoteRadio) GetModelName ¶
func (r *RemoteRadio) GetModelName() string
GetModelName retrieves the remote radio model name
func (*RemoteRadio) GetModelNumber ¶
func (r *RemoteRadio) GetModelNumber() string
GetModelNumber retrieves the remote radio model number
func (*RemoteRadio) GetRSSI ¶
func (r *RemoteRadio) GetRSSI() (float32, float32)
GetRSSI retrieves the remote radio Received Signal Strength Indicator for both time slots
func (*RemoteRadio) GetRadioAlias ¶
func (r *RemoteRadio) GetRadioAlias() string
GetRadioAlias retrieves the remote radio alias
func (*RemoteRadio) GetSerialNumber ¶
func (r *RemoteRadio) GetSerialNumber() string
GetSerialNumber retrieves the remote radio serial number
func (*RemoteRadio) GetXCMPVersion ¶
func (r *RemoteRadio) GetXCMPVersion() string
GetXCMPVersion returns the XCMP version of the remote radio
func (*RemoteRadio) GetXNLID ¶
func (r *RemoteRadio) GetXNLID() uint16
GetXNLID gets the radios XNL ID
func (*RemoteRadio) InitXNL ¶
func (r *RemoteRadio) InitXNL()
InitXNL initializes XNL communication with the radio
func (*RemoteRadio) ListenForCalls ¶
func (r *RemoteRadio) ListenForCalls(calls chan *RadioCall, callCount chan int)
ListenForCalls starts a loop waiting for call packets and keeping the connection alive
func (*RemoteRadio) SendPacket ¶
func (r *RemoteRadio) SendPacket(pkt mototrbo.Packet)
SendPacket sends a packet to the radio