Georges760 / go-saleae

Go Library to interface with Saleae Protocol Analyzer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-saleae : Go Library to interface with Saleae Protocol Analyzer

Overview GoDoc

Install

go get github.com/Georges760/go-saleae

Example

package main

import (
	"flag"
	"fmt"
	"github.com/Georges760/go-saleae"
	"log"
	"os"
)

func main() {
	// Check args
	pfile := flag.String("f", "", "CSV file from Saleae Decoded Protocol export")
	flag.Parse()
	if *pfile == "" {
		log.Fatal("-f arg is mandatory")
	}
	// Open CSV file
	recordFile, err := os.Open(*pfile)
	if err != nil {
		log.Fatal("Error opening CSV file:", err)
	}
	// Parse it
	spi, err := saleae.ParseCSV(recordFile)
	if err != nil {
		log.Fatal("Error parsing CSV file:", err)
	}
	// Print result
	fmt.Println(spi)
	// Exit
	os.Exit(0)
}

License

MIT.

About

Go Library to interface with Saleae Protocol Analyzer

License:MIT License


Languages

Language:Go 100.0%