Documentation
¶
Index ¶
- 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{})
- 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 ¶
This section is empty.
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/8f99fcce/tree/Network/NetworkMessage.hpp#l232
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/8f99fcce/tree/Network/NetworkMessage.hpp#l318
type ConfigureMessage ¶ added in v0.3.4
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/8f99fcce/tree/Network/NetworkMessage.hpp#l477
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/8f99fcce/tree/Network/NetworkMessage.hpp#l206
type FreeTextMessage ¶ added in v0.3.4
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/8f99fcce/tree/Network/NetworkMessage.hpp#l350
type HaltTxMessage ¶ added in v0.3.4
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/8f99fcce/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/8f99fcce/tree/Network/NetworkMessage.hpp#l110
type HighlightCallsignMessage ¶ added in v1.0.0
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, but 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/8f99fcce/tree/Network/NetworkMessage.hpp#l442
type LocationMessage ¶ added in v0.3.4
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/8f99fcce/tree/Network/NetworkMessage.hpp#l404
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/8f99fcce/tree/Network/NetworkMessage.hpp#l421
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"` }
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/8f99fcce/tree/Network/NetworkMessage.hpp#l293
type ReplayMessage ¶ added in v0.3.3
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/8f99fcce/tree/Network/NetworkMessage.hpp#l326
type ReplyMessage ¶ added in v0.3.2
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/8f99fcce/tree/Network/NetworkMessage.hpp#l253
type Server ¶ added in v0.3.0
type Server struct {
// contains filtered or unexported fields
}
func MakeMulticastServer ¶ added in v1.1.0
func MakeServer ¶ added in v0.3.0
func MakeServer() Server
Create a UDP connection to communicate with WSJT-X.
func MakeUnicastServer ¶ added in v1.1.0
func (*Server) Clear ¶ added in v0.3.0
func (s *Server) Clear(msg ClearMessage) error
Send a message to WSJT-X to clear the band activity window, the RX frequency window, or both.
func (*Server) Close ¶ added in v0.3.1
func (s *Server) Close(msg CloseMessage) error
Send a message to WSJT-X to close the program.
func (*Server) Configure ¶ added in v0.3.4
func (s *Server) Configure(msg ConfigureMessage) error
Send a message to WSJT-X to change various configuration options.
func (*Server) FreeText ¶ added in v0.3.4
func (s *Server) FreeText(msg FreeTextMessage) error
Send a message to WSJT-X to set the free text.
func (*Server) HaltTx ¶ added in v0.3.4
func (s *Server) HaltTx(msg HaltTxMessage) error
Send a message to WSJT-X to halt transmission.
func (*Server) Heartbeat ¶ added in v0.3.2
func (s *Server) Heartbeat(msg HeartbeatMessage) error
Send a heartbeat message to WSJT-X.
func (*Server) HighlightCallsign ¶ added in v1.0.0
func (s *Server) HighlightCallsign(msg HighlightCallsignMessage) error
Send a message to WSJT-X to set callsign highlighting.
func (*Server) ListenToWsjtx ¶ added in v0.3.0
func (s *Server) ListenToWsjtx(c chan interface{})
Goroutine to listen for messages from WSJT-X. When heard, the messages are parsed and then placed in the given channel.
func (*Server) Location ¶ added in v0.3.4
func (s *Server) Location(msg LocationMessage) error
Send a message to WSJT-X to set this station's Maidenhead grid.
func (*Server) Replay ¶ added in v0.3.3
func (s *Server) Replay(msg ReplayMessage) error
Send a message to WSJT-X to replay QSOs in the Band Activity window.
func (*Server) Reply ¶ added in v0.3.2
func (s *Server) Reply(msg ReplyMessage) error
Initiate a reply to an earlier decode. The decode message must have started with CQ or QRZ.
func (*Server) SwitchConfiguration ¶ added in v0.3.4
func (s *Server) SwitchConfiguration(msg SwitchConfigurationMessage) error
Send 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"` }
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/8f99fcce/tree/Network/NetworkMessage.hpp#l141
type SwitchConfigurationMessage ¶ added in v0.3.4
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/8f99fcce/tree/Network/NetworkMessage.hpp#l468
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/8f99fcce/tree/Network/NetworkMessage.hpp#l381).