parser

package
v0.0.0-...-d6b8a38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindSCMD

func FindSCMD(s string) string

Types

type FailureSumCheckError

type FailureSumCheckError struct {
	Expected uint16
	Actual   uint16
}

func NewFailureSumCheckError

func NewFailureSumCheckError(expected uint16, actual uint16) *FailureSumCheckError

func (*FailureSumCheckError) Error

func (e *FailureSumCheckError) Error() string

type InvalidLenError

type InvalidLenError struct {
	Expected int
	Actual   int
}

func NewInvalidLenError

func NewInvalidLenError(expected int, actual int) *InvalidLenError

func (*InvalidLenError) Error

func (e *InvalidLenError) Error() string

type Parser

type Parser interface {
	// AD値のバイト列を解析してAD値を持つmodel.Signals型のポインタを返す
	ToSignals(b []byte) (*model.Signals, error)
	// <SCMD>...</SCMD>の文字列を解析してmodel.Commandを返す
	ToCommand(s string) (model.Command, error)
	// model.Commandを解析してTrendRangeを返す
	ToTrendRange(c model.Command) (model.TrendRange, error)
	// model.Commandを解析してAnalysisTypeを返す
	ToAnalysis(c model.Command) (model.AnalysisType, error)
	// model.Commandを解析してCalibrationを返す
	ToChannelCal(c model.Command) (model.ChannelCal, error)
	// model.Commandを解析してEEGPowerを返す
	ToChannelPower(c model.Command) (model.ChannelPower, error)
}

func NewParser

func NewParser() Parser

Directories

Path Synopsis
Package mock_parser is a generated GoMock package.
Package mock_parser is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL