car

package
v0.0.0-...-023c2c9 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Succeeded int = iota
	Failed
	Moving
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Car

type Car interface {
	location.Engine
	MoveTo(location.Point2D) error
	LastMovementStatus() int
	StopMovement() error
	IRSend(hardware.IRData) error
}

type Client

type Client interface {
	Car
	IsServiceAvailable() error
}

type GeneralClient

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

func NewGeneralClient

func NewGeneralClient(networkType string, netWorkAddr string, serviceName string) *GeneralClient

func (GeneralClient) GetLocation

func (g GeneralClient) GetLocation() (p location.Point2D, err error)

func (*GeneralClient) IRSend

func (g *GeneralClient) IRSend(d hardware.IRData) (err error)

func (*GeneralClient) IsServiceAvailable

func (g *GeneralClient) IsServiceAvailable() (err error)

func (*GeneralClient) LastMovementStatus

func (g *GeneralClient) LastMovementStatus() (r int)

func (GeneralClient) MoveTo

func (g GeneralClient) MoveTo(l location.Point2D) (err error)

func (*GeneralClient) StopMovement

func (g *GeneralClient) StopMovement() (err error)

type GeneralServiceHandler

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

func NewGeneralServiceHandler

func NewGeneralServiceHandler(c Car) *GeneralServiceHandler

func (*GeneralServiceHandler) GetLocation

func (s *GeneralServiceHandler) GetLocation(nouse int, d *rpcprotocal.Point2D) error

func (*GeneralServiceHandler) IRSend

func (s *GeneralServiceHandler) IRSend(data hardware.IRData, nouse *int) error

func (*GeneralServiceHandler) LastMovementStatus

func (s *GeneralServiceHandler) LastMovementStatus(nouse int, rep *int) error

func (*GeneralServiceHandler) MoveTo

func (s *GeneralServiceHandler) MoveTo(d rpcprotocal.Point2D, rep *int) error

func (*GeneralServiceHandler) StopMoving

func (s *GeneralServiceHandler) StopMoving(int, *int) error

type Service

type Service interface {
	GetLocation(int, *rpcprotocal.Point2D) error
	MoveTo(rpcprotocal.Point2D, *int) error
	LastMovementStatus(int, *int) error
	StopMoving(int, *int) error
	IRSend(hardware.IRData, *int) error
}

Jump to

Keyboard shortcuts

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