Documentation
¶
Index ¶
- Variables
- type ClearMessage
- type CloseMessage
- type ConfigureMessage
- type DecodeMessage
- type FreeTextMessage
- type HaltTxMessage
- type HeartbeatMessage
- type HighlightCallsignMessage
- type LocationMessage
- type LoggedAdifMessage
- type QsoLoggedMessage
- type ReplayMessage
- type ReplyMessage
- type Server
- func (s *Server) Clear(msg ClearMessage) error
- func (s *Server) Close(msg CloseMessage) error
- func (s *Server) Configure(msg ConfigureMessage) error
- func (s *Server) FreeText(msg FreeTextMessage) error
- func (s *Server) HaltTx(msg HaltTxMessage) error
- func (s *Server) Heartbeat(msg HeartbeatMessage) error
- func (s *Server) HighlightCallsign(msg HighlightCallsignMessage) error
- func (s *Server) ListenToWsjtx(c chan interface{}, e chan error)
- func (s *Server) Listening() bool
- func (s *Server) LocalAddr() net.Addr
- func (s *Server) Location(msg LocationMessage) error
- func (s *Server) Replay(msg ReplayMessage) error
- func (s *Server) Reply(msg ReplyMessage) error
- func (s *Server) SwitchConfiguration(msg SwitchConfigurationMessage) error
- type StatusMessage
- type SwitchConfigurationMessage
- type WSPRDecodeMessage
Constants ¶
This section is empty.
Variables ¶
var NotConnectedError = fmt.Errorf("haven't heard from wsjtx yet, don't know where to send commands")
var ParseError = errors.New("parse error")
Functions ¶
This section is empty.
Types ¶
type ClearMessage ¶
This message is send when all prior "Decode" messages in the "Band Activity" window have been discarded and therefore are no long available for actioning with a "Reply" message.
The Window argument can be one of the following values:
0 - clear the "Band Activity" window (default) 1 - clear the "Rx Frequency" window 2 - clear both "Band Activity" and "Rx Frequency" windows
Out/In.
https://sourceforge.net/p/wsjt/wsjtx/ci/wsjtx-2.5.2/tree/Network/NetworkMessage.hpp#l234
type CloseMessage ¶
type CloseMessage struct {
Id string `json:"id"`
}
Close is sent by a client immediately prior to it shutting down gracefully.
Out/In.
https://sourceforge.net/p/wsjt/wsjtx/ci/wsjtx-2.5.2/tree/Network/NetworkMessage.hpp#l320
type ConfigureMessage ¶
type ConfigureMessage struct { Id string `json:"id"` Mode string `json:"mode"` FrequencyTolerance uint32 `json:"frequencyTolerance"` Submode string `json:"submode"` FastMode bool `json:"fastMode"` TRPeriod uint32 `json:"trPeriod"` RxDF uint32 `json:"rxDF"` DXCall string `json:"dxCall"` DXGrid string `json:"dxGrid"` GenerateMessages bool `json:"generateMessages"` }
The server may send this message at any time. The message specifies various configuration options. For utf8 string fields an empty value implies no change, for the quint32 Rx DF and Frequency Tolerance fields the maximum quint32 value implies no change. Invalid or unrecognized values will be silently ignored.
In only.
https://sourceforge.net/p/wsjt/wsjtx/ci/wsjtx-2.5.2/tree/Network/NetworkMessage.hpp#l479
type DecodeMessage ¶
type DecodeMessage struct { Id string `json:"id"` New bool `json:"new"` Time uint32 `json:"time"` Snr int32 `json:"snr"` DeltaTimeSec float64 `json:"deltaTime"` DeltaFrequencyHz uint32 `json:"deltaFrequency"` Mode string `json:"mode"` Message string `json:"message"` LowConfidence bool `json:"lowConfidence"` OffAir bool `json:"offAir"` }
The decode message is sent when a new decode is completed, in this case the 'New' field is true. It is also used in response to a "Replay" message where each old decode in the "Band activity" window, that has not been erased, is sent in order as a one of these messages with the 'New' field set to false.
Out only.
https://sourceforge.net/p/wsjt/wsjtx/ci/wsjtx-2.5.2/tree/Network/NetworkMessage.hpp#l208
type FreeTextMessage ¶
type FreeTextMessage struct { Id string `json:"id"` Text string `json:"text"` Send bool `json:"send"` }
This message allows the server to set the current free text message content. Sending this message with a non-empty "Text" field is equivalent to typing a new message (old contents are discarded) in to the WSJT-X free text message field or "Tx5" field (both are updated) and if the "Send" flag is set then clicking the "Now" radio button for the "Tx5" field if tab one is current or clicking the "Free msg" radio button if tab two is current.
In only.
https://sourceforge.net/p/wsjt/wsjtx/ci/wsjtx-2.5.2/tree/Network/NetworkMessage.hpp#l352
type HaltTxMessage ¶
The server may stop a client from transmitting messages either immediately or at the end of the current transmission period using this message.
In only.
https://sourceforge.net/p/wsjt/wsjtx/ci/wsjtx-2.5.2/tree/Network/NetworkMessage.hpp#l343
type HeartbeatMessage ¶
type HeartbeatMessage struct { Id string `json:"id"` MaxSchema uint32 `json:"maxSchemaVersion"` Version string `json:"version"` Revision string `json:"revision"` }
The heartbeat message shall be sent on a periodic basis every 15 seconds. This message is intended to be used by servers to detect the presence of a client and also the unexpected disappearance of a client and by clients to learn the schema negotiated by the server after it receives the initial heartbeat message from a client.
Out/In.
https://sourceforge.net/p/wsjt/wsjtx/ci/wsjtx-2.5.2/tree/Network/NetworkMessage.hpp#l110
type HighlightCallsignMessage ¶
type HighlightCallsignMessage struct { Id string `json:"id"` Callsign string `json:"callsign"` BackgroundColor color.Color `json:"backgroundColor"` ForegroundColor color.Color `json:"foregroundColor"` HighlightLast bool `json:"highlightLast"` // This field is not part of the WSJT-X message and is specific to the golang library. It is a // necessary addition to be able to reset the highlighting. QT's color has a sentinel value in // QColor to signal an "invalid" color; golang image/color doesn't have that, so we add this // field. If this is true, BackgroundColor and ForegroundColor become "invalid" colors. Reset bool `json:"reset"` }
The server may send this message at any time. The message specifies the background and foreground color that will be used to highlight the specified callsign in the decoded messages printed in the Band Activity panel. To clear and cancel highlighting send an invalid QColor value for either or both of the background and foreground fields.
In only.
https://sourceforge.net/p/wsjt/wsjtx/ci/wsjtx-2.5.2/tree/Network/NetworkMessage.hpp#l444
type LocationMessage ¶
This message allows the server to set the current current geographical location of operation. The supplied location is not persistent but is used as a session lifetime replacement loction that overrides the Maidenhead grid locater set in the application settings.
In only.
https://sourceforge.net/p/wsjt/wsjtx/ci/wsjtx-2.5.2/tree/Network/NetworkMessage.hpp#l406
type LoggedAdifMessage ¶
The logged ADIF message is sent to the server(s) when the WSJT-X user accepts the "Log QSO" dialog by clicking the "OK" button.
Out only.
https://sourceforge.net/p/wsjt/wsjtx/ci/wsjtx-2.5.2/tree/Network/NetworkMessage.hpp#l423
type QsoLoggedMessage ¶
type QsoLoggedMessage struct { Id string `json:"id"` DateTimeOff time.Time `json:"dateTimeOff"` DxCall string `json:"dxCall"` DxGrid string `json:"dxGrid"` TxFrequency uint64 `json:"txFrequency"` Mode string `json:"mode"` ReportSent string `json:"reportSent"` ReportReceived string `json:"reportReceived"` TxPower string `json:"txPower"` Comments string `json:"comments"` Name string `json:"name"` DateTimeOn time.Time `json:"dateTimeOn"` OperatorCall string `json:"operatorCall"` MyCall string `json:"myCall"` MyGrid string `json:"myGrid"` ExchangeSent string `json:"exchangeSent"` ExchangeReceived string `json:"exchangeReceived"` ADIFPropagationMode string `json:"propagationMode"` }
The QSO logged message is sent when the WSJT-X user accepts the "Log QSO" dialog by clicking the "OK" button.
Out only.
https://sourceforge.net/p/wsjt/wsjtx/ci/wsjtx-2.5.2/tree/Network/NetworkMessage.hpp#l295
type ReplayMessage ¶
type ReplayMessage struct {
Id string `json:"id"`
}
When a server starts it may be useful for it to determine the state of preexisting clients. Sending this message to each client as it is discovered will cause that client (WSJT-X) to send a "Decode" message for each decode currently in its "Band activity" window.
In only.
https://sourceforge.net/p/wsjt/wsjtx/ci/wsjtx-2.5.2/tree/Network/NetworkMessage.hpp#l328
type ReplyMessage ¶
type ReplyMessage struct { Id string `json:"id"` Time uint32 `json:"time"` Snr int32 `json:"snr"` DeltaTimeSec float64 `json:"deltaTime"` DeltaFrequencyHz uint32 `json:"deltaFrequency"` Mode string `json:"mode"` Message string `json:"message"` LowConfidence bool `json:"lowConfidence"` Modifiers uint8 `json:"modifiers"` }
In order for a server to provide a useful cooperative service to WSJT-X it is possible for it to initiate a QSO by sending this message to a client. WSJT-X filters this message and only acts upon it if the message exactly describes a prior decode and that decode is a CQ or QRZ message. The action taken is exactly equivalent to the user double clicking the message in the "Band activity" window.
In only.
https://sourceforge.net/p/wsjt/wsjtx/ci/wsjtx-2.5.2/tree/Network/NetworkMessage.hpp#l255
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func MakeServer ¶
MakeServer creates a multicast UDP connection to communicate with WSJT-X on the default address and port.
func MakeServerGiven ¶
MakeServerGiven creates a UDP connection to communicate with WSJT-X on the given address and port.
func (*Server) Clear ¶
func (s *Server) Clear(msg ClearMessage) error
Clear sends a message to WSJT-X to clear the band activity window, the RX frequency window, or both.
func (*Server) Close ¶
func (s *Server) Close(msg CloseMessage) error
Close sends a message to WSJT-X to close the program.
func (*Server) Configure ¶
func (s *Server) Configure(msg ConfigureMessage) error
Configure sends a message to WSJT-X to change various configuration options.
func (*Server) FreeText ¶
func (s *Server) FreeText(msg FreeTextMessage) error
FreeText sends a message to WSJT-X to set the free text of the TX message.
func (*Server) HaltTx ¶
func (s *Server) HaltTx(msg HaltTxMessage) error
HaltTx sends a message to WSJT-X to halt transmission.
func (*Server) Heartbeat ¶
func (s *Server) Heartbeat(msg HeartbeatMessage) error
Heartbeat sends a heartbeat message to WSJT-X.
func (*Server) HighlightCallsign ¶
func (s *Server) HighlightCallsign(msg HighlightCallsignMessage) error
HighlightCallsign sends a message to WSJT-X to set callsign highlighting.
func (*Server) ListenToWsjtx ¶
ListenToWsjtx listens for messages from WSJT-X. When heard, the messages are parsed and then placed in the given message channel. If parsing errors occur, those are reported on the errors channel. If a fatal error happens, e.g. the network connection gets closed, the channels are closed and the goroutine ends.
func (*Server) Listening ¶
Listening returns whether the ListenToWsjtx goroutine is currently running.
func (*Server) Location ¶
func (s *Server) Location(msg LocationMessage) error
Location sends a message to WSJT-X to set this station's Maidenhead grid.
func (*Server) Replay ¶
func (s *Server) Replay(msg ReplayMessage) error
Replay sends a message to WSJT-X to replay QSOs in the Band Activity window.
func (*Server) Reply ¶
func (s *Server) Reply(msg ReplyMessage) error
Reply initiates a reply to an earlier decode. The decode message must have started with CQ or QRZ.
func (*Server) SwitchConfiguration ¶
func (s *Server) SwitchConfiguration(msg SwitchConfigurationMessage) error
SwitchConfiguration sends a message to WSJT-X to switch to a different pre-defined configuration.
type StatusMessage ¶
type StatusMessage struct { Id string `json:"id"` DialFrequency uint64 `json:"dialFrequency"` Mode string `json:"mode"` DxCall string `json:"dxCall"` Report string `json:"report"` TxMode string `json:"txMode"` TxEnabled bool `json:"txEnabled"` Transmitting bool `json:"transmitting"` Decoding bool `json:"decoding"` RxDF uint32 `json:"rxDeltaFreq"` TxDF uint32 `json:"txDeltaFreq"` DeCall string `json:"deCall"` DeGrid string `json:"deGrid"` DxGrid string `json:"dxGrid"` TxWatchdog bool `json:"txWatchdog"` SubMode string `json:"submode"` FastMode bool `json:"fastMode"` SpecialOperationMode uint8 `json:"specialMode"` FrequencyTolerance uint32 `json:"frequencyTolerance"` TRPeriod uint32 `json:"txRxPeriod"` ConfigurationName string `json:"configName"` TxMessage string `json:"txMessage"` }
WSJT-X sends this status message when various internal state changes to allow the server to track the relevant state of each client without the need for polling commands.
Out only.
https://sourceforge.net/p/wsjt/wsjtx/ci/wsjtx-2.5.2/tree/Network/NetworkMessage.hpp#l141
type SwitchConfigurationMessage ¶
type SwitchConfigurationMessage struct { Id string `json:"id"` ConfigurationName string `json:"configurationName"` }
The server may send this message at any time. The message specifies the name of the configuration to switch to. The new configuration must exist.
In only.
https://sourceforge.net/p/wsjt/wsjtx/ci/wsjtx-2.5.2/tree/Network/NetworkMessage.hpp#l445
type WSPRDecodeMessage ¶
type WSPRDecodeMessage struct { Id string `json:"id"` New bool `json:"new"` Time uint32 `json:"time"` Snr int32 `json:"snr"` DeltaTime float64 `json:"deltaTime"` Frequency uint64 `json:"frequency"` Drift int32 `json:"drift"` Callsign string `json:"callsign"` Grid string `json:"grid"` Power int32 `json:"power"` OffAir bool `json:"offAir"` }
The decode message is sent when a new decode is completed, in this case the 'New' field is true.
Out only.
https://sourceforge.net/p/wsjt/wsjtx/ci/wsjtx-2.5.2/tree/Network/NetworkMessage.hpp#l383