Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/logocomune/wsjtx
Golang library for WSJTX-X
https://github.com/logocomune/wsjtx
amateur-radio go golang udp wsjtx
Last synced: 4 days ago
JSON representation
Golang library for WSJTX-X
- Host: GitHub
- URL: https://github.com/logocomune/wsjtx
- Owner: logocomune
- License: mit
- Created: 2022-02-09T17:56:32.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-09T18:24:11.000Z (almost 3 years ago)
- Last Synced: 2024-08-03T23:29:47.889Z (3 months ago)
- Topics: amateur-radio, go, golang, udp, wsjtx
- Language: Go
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-golang-repositories - wsjtx - X (Repositories)
README
# WSJTX
[![CircleCI](https://circleci.com/gh/logocomune/wsjtx/tree/main.svg?style=svg)](https://circleci.com/gh/logocomune/wsjtx/tree/main)
[![Go Report Card](https://goreportcard.com/badge/github.com/logocomune/wsjtx)](https://goreportcard.com/report/github.com/logocomune/wsjtx)
[![codecov](https://codecov.io/gh/logocomune/wsjtx/branch/main/graph/badge.svg?token=GGN3PHjyZV)](https://codecov.io/gh/logocomune/wsjtx)
[![CodeFactor](https://www.codefactor.io/repository/github/logocomune/wsjtx/badge)](https://www.codefactor.io/repository/github/logocomune/wsjtx)Golang library for WSJTX-X provides:
- Functions for encoding and decoding of WSJT-X message up to version 2.5.2
- UDP Server for receiving messages from WSJT-X and sending to WSJT-X.## Installation
```
go get github.com/logocomune/wsjtx
```## Example
```go
package mainimport (
"context"
"encoding/hex"
"github.com/logocomune/wsjtx/message"
"github.com/logocomune/wsjtx/udpserver"
"log"
)func main() {
server, err := udpserver.NewServer(context.Background(), udpserver.Multicast, udpserver.DefaultPort, log.Default())
if err != nil {
log.Fatal(err)
}
defer server.Close()
for r := range server.Read() {
parse, err := message.Parse(r)
if err != nil {
log.Println("Error:", err)
}
log.Printf("Message Type: %s\n", parse.ResponseType)
log.Printf("Raw message (hex): %s\n", hex.EncodeToString(r))
log.Printf("Decoded message: %+v\n", parse.Message)
log.Println("-----------------------------------------------------")
}
}```