Documentation
¶
Index ¶
- Constants
- Variables
- func SendSMS(number, message string) string
- type GSM
- type GSMADBModem
- func (m *GSMADBModem) Connnect() error
- func (m *GSMADBModem) Expect(possibilities []string) (string, error)
- func (m *GSMADBModem) Read(message_size int) string
- func (m *GSMADBModem) SMS(mobileno, message string) string
- func (m *GSMADBModem) Send(command string, waitForOk bool) string
- func (m *GSMADBModem) Write(message string) bool
- type GSMSerialModem
- func (m *GSMSerialModem) Connect() (err error)
- func (m *GSMSerialModem) Expect(possibilities []string) (string, error)
- func (m *GSMSerialModem) Read(message_size int) string
- func (m *GSMSerialModem) SMS(mobileno, message string) string
- func (m *GSMSerialModem) Send(command string, waitForOk bool) string
- func (m *GSMSerialModem) Write(message string)
Constants ¶
View Source
const ( NEWLINE = "\r\n" ECHOOFF = "ATE0" + NEWLINE USEFULLERRORMESSAGES = "AT+CMEE=1" + NEWLINE DISABLENOTIFICATIONS = "AT+WIND=0" + NEWLINE ENABLETEXTMODE = "AT+CMGF=1" + NEWLINE )
serial modem constant functions calls
Variables ¶
View Source
var GSMModem []interface{}
GSMModem are interfaces :D
Functions ¶
Types ¶
type GSM ¶
type GSM interface { Connect() error Expect(possibilities []string) (string, error) Write(message string) bool Read(message_size int) string Send(command string, waitForOk bool) string SMS(mobileno, message string) string // send sms function // contains filtered or unexported methods }
interfrace function for all modems
type GSMADBModem ¶
func ModemList ¶
func ModemList() ([]GSMADBModem, error)
func NewADBModem ¶
func NewADBModem(DeviceId string, version int) *GSMADBModem
func (*GSMADBModem) Connnect ¶
func (m *GSMADBModem) Connnect() error
func (*GSMADBModem) Read ¶
func (m *GSMADBModem) Read(message_size int) string
func (*GSMADBModem) SMS ¶
func (m *GSMADBModem) SMS(mobileno, message string) string
func (*GSMADBModem) Write ¶
func (m *GSMADBModem) Write(message string) bool
type GSMSerialModem ¶
serial modem
func NewSerialModem ¶
func NewSerialModem(ComPort, DeviceId string, BaudRate int) (modem *GSMSerialModem)
new modem object
func (*GSMSerialModem) Connect ¶
func (m *GSMSerialModem) Connect() (err error)
connect to the modem utilizing the serial port
func (*GSMSerialModem) Expect ¶
func (m *GSMSerialModem) Expect(possibilities []string) (string, error)
expect output on bus
func (*GSMSerialModem) Read ¶
func (m *GSMSerialModem) Read(message_size int) string
read a message vom serial
func (*GSMSerialModem) SMS ¶
func (m *GSMSerialModem) SMS(mobileno, message string) string
send a sms
func (*GSMSerialModem) Send ¶
func (m *GSMSerialModem) Send(command string, waitForOk bool) string
send message and may wait for a success
func (*GSMSerialModem) Write ¶
func (m *GSMSerialModem) Write(message string)
write a message to serial bus
Click to show internal directories.
Click to hide internal directories.