modem

package
v0.0.0-...-0976962 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2016 License: MIT Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckConnection

func CheckConnection() error

func DeleteMessage

func DeleteMessage(messageIndex int) error

func GetBalance

func GetBalance(ussdRequest string) (float64, error)

func GetCharset

func GetCharset() (string, error)

func GetMessage

func GetMessage(messageIndex int) (*message, error)

func GetMessageIndexes

func GetMessageIndexes() ([]int, error)

func GetMessages

func GetMessages() ([]*message, error)

func GetSignal

func GetSignal() (float64, error)

func InitModem

func InitModem(ComPort string, BaudRate int) (err error)

func Reset

func Reset() error

func SendCommand

func SendCommand(command string, wait bool) (string, error)

func SendMessage

func SendMessage(mobile string, message string) error

func WaitForOutput

func WaitForOutput(reps int, suffix string) (string, error)

Types

type Modem

type Modem interface {
	Connect() (err error)
}

type Port

type Port interface {
	Read(b []byte) (n int, err error)
	Write(b []byte) (n int, err error)
	Flush() error
	Close() (err error)
}

Jump to

Keyboard shortcuts

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