device

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2018 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandHello1              = 0xa7
	CommandHello2              = 0xa2
	CommandGetSessionCount     = 0xa3
	CommandGetSessionTime      = 0xa5
	CommandGetSessionDuration  = 0xa4
	CommandGetUserInfo         = 0xab
	CommandGetSessionData      = 0xa6
	CommandGetOximeterDeviceid = 0xaa
	CommandGetOximeterInfo     = 0xb0
	CommandGetOximeterModel    = 0xa8
	CommandGetOximeterVendor   = 0xa9
	CommandSessionErase        = 0xae
	DurationDivisor            = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CMS50

type CMS50 struct {
	// contains filtered or unexported fields
}

func (*CMS50) Connect

func (c *CMS50) Connect(port string) error

func (*CMS50) GetModel

func (c *CMS50) GetModel() (string, error)

func (*CMS50) GetSessionCount

func (c *CMS50) GetSessionCount() (uint8, error)

func (*CMS50) GetSessionData

func (c *CMS50) GetSessionData(session uint8) ([]*model.OxiRecord, error)

func (*CMS50) GetSessionDuration

func (c *CMS50) GetSessionDuration(session uint8) (time.Duration, error)

func (*CMS50) GetSessionTime

func (c *CMS50) GetSessionTime(session uint8) (time.Time, error)

func (*CMS50) GetUser

func (c *CMS50) GetUser() (string, error)

func (*CMS50) ResetDevice

func (c *CMS50) ResetDevice() error

type Device

type Device interface {
	Connect(port string) error
	ResetDevice() error
	GetModel() (string, error)
	GetSessionCount() (uint8, error)
	GetSessionDuration(session uint8) (time.Duration, error)
	GetSessionTime(session uint8) (time.Time, error)
	GetSessionData(session uint8) ([]*model.OxiRecord, error)
	GetUser() (string, error)
}

Jump to

Keyboard shortcuts

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