modem

package
v0.0.0-...-398698a Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SMSStatusOk    = "OK"
	SMSStatusError = "Error"
)

ответы получаемые от модема

Variables

This section is empty.

Functions

This section is empty.

Types

type GSMModem

type GSMModem struct {
	ComPort  string
	BaudRate int
	Port     *serial.Port
	DeviceId string
}

func New

func New(ComPort string, BaudRate int, DeviceId string) (modem *GSMModem)

func (*GSMModem) Connect

func (m *GSMModem) Connect() (err error)

func (*GSMModem) ExpectAnswer

func (m *GSMModem) ExpectAnswer() (string, error)

func (*GSMModem) Read

func (m *GSMModem) Read(n int) string

func (*GSMModem) Send

func (m *GSMModem) Send(command string)

func (*GSMModem) SendCommand

func (m *GSMModem) SendCommand(command string, waitForOk bool) string

func (*GSMModem) SendSMS

func (m *GSMModem) SendSMS(mobile string, message string) string

Jump to

Keyboard shortcuts

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