Documentation ¶
Index ¶
- Constants
- type Config
- type EventResponse
- type Lora
- func (l *Lora) ClearRadioStatus() (string, error)
- func (l *Lora) Close()
- func (l *Lora) Debug(mode bool)
- func (l *Lora) GetABPInfo() (string, error)
- func (l *Lora) GetBand() (string, error)
- func (l *Lora) GetConfig(key string) (string, error)
- func (l *Lora) GetDataRate() (string, error)
- func (l *Lora) GetLinkCnt() (string, error)
- func (l *Lora) GetMode() (string, error)
- func (l *Lora) GetRadioStatus() (string, error)
- func (l *Lora) GetRecvEx() (string, error)
- func (l *Lora) GetRfConfig() (string, error)
- func (l *Lora) GetUART() (string, error)
- func (l *Lora) HardReset() (string, error)
- func (l *Lora) JoinABP() (string, error)
- func (l *Lora) JoinOTAA() (string, error)
- func (l *Lora) Recv(data string) (string, error)
- func (l *Lora) Reload() (string, error)
- func (l *Lora) Reset(mode int) (string, error)
- func (l *Lora) RxStop() (string, error)
- func (l *Lora) Rxc(enable int) (string, error)
- func (l *Lora) Send(data string) (string, error)
- func (l *Lora) SetBand(band string) (string, error)
- func (l *Lora) SetConfig(config string) (string, error)
- func (l *Lora) SetDataRate(datarate string) (string, error)
- func (l *Lora) SetLinkCnt(uplinkCnt, downlinkCnt float32) (string, error)
- func (l *Lora) SetMode(mode int) (string, error)
- func (l *Lora) SetRecvEx(mode int) (string, error)
- func (l *Lora) SetRfConfig(parameters string) (string, error)
- func (l *Lora) SetUART(configuration string) (string, error)
- func (l *Lora) Signal() (string, error)
- func (l *Lora) Sleep() (string, error)
- func (l *Lora) TxStop() (string, error)
- func (l *Lora) Txc(parameters string) (string, error)
- func (l *Lora) Version() (string, error)
- type LoraError
- type Parity
- type StopBits
Constants ¶
const ( CodeArgErr = -1 CodeArgNotFind = -2 CodeJoinAbpErr = -3 CodeJoinOtaaErr = -4 CodeNotJoin = -5 CodeMacBusyErr = -6 CodeTxErr = -7 CodeInterErr = -8 CodeWrCfgErr = -11 CodeRdCfgErr = -12 CodeTxLenLimitErr = -13 CodeUnknownErr = -20 StatusRecvData = 0 StatusTxConfirmed = 1 StatusTxUnconfirmed = 2 StatusJoinedSuccess = 3 StatusJoinedFailed = 4 StatusTxTimeout = 5 StatusRx2Timeout = 6 StatusDownlinkRepeated = 7 StatusWakeUp = 8 StatusP2pComplete = 9 StatusUnknown = 100 // JoinSuccess successful join. JoinSuccess = "at+recv=3,0,0" // JoinFail incorrect join config parameters. JoinFail = "at+recv=4,0,0" // JoinTimeout no response from a gateway. JoinTimeout = "at+recv=6,0,0" OK = "OK" ERROR = "ERROR" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventResponse ¶
type EventResponse struct {
// contains filtered or unexported fields
}
func WhichEventResponse ¶
func WhichEventResponse(resp string) *EventResponse
func (*EventResponse) Code ¶
func (e *EventResponse) Code() int
func (*EventResponse) Description ¶
func (e *EventResponse) Description() string
type Lora ¶
type Lora struct {
// contains filtered or unexported fields
}
func (*Lora) ClearRadioStatus ¶
SetStatus clear radio statistics
func (*Lora) GetDataRate ¶
GetDataRate get next send data rate
func (*Lora) GetLinkCnt ¶
GetLinkCnt get LoRaWAN uplink and downlink counter
func (*Lora) GetRadioStatus ¶
GetStatus get radio statistics
func (*Lora) GetRfConfig ¶
GetRfConfig get RF parameters
func (*Lora) JoinOTAA ¶
JoinOTAA join the configured network in OTAA mode. The module doesn't accept any other command before it returns a response. Response: JoinSuccess, JoinFail, JoinTimeout
func (*Lora) Reset ¶
Reset module or LoRaWAN stack 0: reset and restart module 1: reset LoRaWAN stack and the module will reload LoRa configuration from EEPROM
func (*Lora) SetDataRate ¶
SetDataRate set next send data rate
func (*Lora) SetLinkCnt ¶
SetLinkCnt set LoRaWAN uplink and downlink counter
func (*Lora) SetRfConfig ¶
SetRfConfig Set RF parameters
type LoraError ¶
type LoraError struct {
// contains filtered or unexported fields
}
LoraError type that describes the LoRaWAN errors
func WhichError ¶
WhichError translates an error string to a LoraError