Documentation ¶
Index ¶
- Constants
- type Call
- type CallHandler
- type CallerIDMode
- type Cmd
- type FaxClass
- type Modem
- func (m *Modem) Answer() error
- func (m *Modem) CallerIDMode() (CallerIDMode, error)
- func (m *Modem) CallerIDModes() ([]CallerIDMode, error)
- func (m *Modem) Close()
- func (m *Modem) EnableSoftwareCache(v bool)
- func (m *Modem) FaxClass() (FaxClass, error)
- func (m *Modem) FaxClasses() ([]FaxClass, error)
- func (m *Modem) Hangup() error
- func (m *Modem) Info() ([]string, error)
- func (m *Modem) Reset() error
- func (m *Modem) Send(req *Request) error
- func (m *Modem) SetCallHandler(ch CallHandler)
- func (m *Modem) SetCallerIDMode(mode CallerIDMode) error
- func (m *Modem) SetFaxClass(fc FaxClass) error
- func (m *Modem) SetVolume(n int) error
- type Request
- type Response
Constants ¶
View Source
const ( ResetCmd Cmd = "ATZ" InfoCmd = "ATI%d" VolumnCmd = "ATL%d" FaxClassesCmd = "AT+FCLASS=?" FaxClassCmd = "AT+FCLASS?" SetFaxClassCmd = "AT+FCLASS=%s" CallerIDModesCmd = "AT+VCID=?" CallerIDCmd = "AT+VCID?" SetCallerIDCmd = "AT+VCID=%s" AnswerCmd = "ATA" HangupCmd = "ATH0" )
View Source
const ( FaxClass0 FaxClass = "0" FaxClass1 = "1" FaxClass1_0 = "1.0" FaxClass2 = "2" FaxClass8 = "8" )
View Source
const ( CallerIDOff CallerIDMode = "0" CallerIDOn = "1" CallerIDUnformatted = "2" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Call ¶
type CallHandler ¶
type CallHandler interface {
Handle(c *Call)
}
type CallerIDMode ¶
type CallerIDMode string
func ParseCallerIDMode ¶
func ParseCallerIDMode(s string) (CallerIDMode, error)
ParseCallerIDMode parses a string and returns a CallerIDMode.
type FaxClass ¶
type FaxClass string
func ParseFaxClass ¶
ParseFaxClass parses a string and returns a FaxClass.
type Modem ¶
type Modem struct {
// contains filtered or unexported fields
}
func (*Modem) CallerIDMode ¶
func (m *Modem) CallerIDMode() (CallerIDMode, error)
CallerIDMode returns the current caller ID mode.
func (*Modem) CallerIDModes ¶
func (m *Modem) CallerIDModes() ([]CallerIDMode, error)
CallerIDModes returns the supported caller ID modes.
func (*Modem) EnableSoftwareCache ¶
func (*Modem) FaxClasses ¶
FaxClasses returns the supported fax service classes.
func (*Modem) SetCallHandler ¶
func (m *Modem) SetCallHandler(ch CallHandler)
func (*Modem) SetCallerIDMode ¶
func (m *Modem) SetCallerIDMode(mode CallerIDMode) error
SetCallerIDMode sets the caller ID mode.
func (*Modem) SetFaxClass ¶
SetFaxClass sets the current fax class.
Click to show internal directories.
Click to hide internal directories.