Documentation
¶
Index ¶
- Constants
- func PrintMACCommand(cmd string, content string) string
- type Device
- func (d *Device) ADRProcedure()
- func (d *Device) CanExecute() bool
- func (d *Device) ChangeLocation(lat float64, lng float64, alt int32)
- func (d *Device) ChangePayload(mtype lorawan.MType, payload lorawan.Payload)
- func (d *Device) CreateACK() []byte
- func (d *Device) CreateEmptyFrame() []byte
- func (d *Device) CreateJoinRequest() []byte
- func (d *Device) CreateUplink() [][]byte
- func (d *Device) DataRateToString() string
- func (d *Device) DownlinkReceivedRX2ClassC()
- func (d *Device) Execute()
- func (d *Device) ExecuteMACCommand(downlink dl.InformationDownlink)
- func (d *Device) FPendingProcedure(downlink *dl.InformationDownlink)
- func (d *Device) GetModulation() string
- func (d *Device) IsOn() bool
- func (d *Device) NewUplink(mtype lorawan.MType, payload string)
- func (d *Device) OtaaActivation()
- func (d *Device) Print(content string, err error, printType int)
- func (d *Device) ProcessDownlink(phy lorawan.PHYPayload) (*dl.InformationDownlink, error)
- func (d *Device) ProcessJoinAccept(JoinAccPayload *lorawan.JoinAcceptPayload) (*dl.InformationDownlink, error)
- func (d *Device) Run()
- func (d *Device) SendAck()
- func (d *Device) SendEmptyFrame()
- func (d *Device) SendJoinRequest()
- func (d *Device) SendMACCommand(cid lorawan.CID, periodicity uint8) error
- func (d *Device) SetInfo(payload []byte, joinRequest bool) pkt.RXPK
- func (d *Device) Setup(Resources *res.Resources, forwarder *f.Forwarder)
- func (d *Device) SwitchChannel()
- func (d *Device) SwitchClass(class int)
- func (d *Device) TurnOFF()
- func (d *Device) TurnON()
- func (d *Device) UnJoined() bool
Constants ¶
View Source
const ( JOINACCEPTDELAY1 = time.Duration(5 * time.Second) JOINACCEPTDELAY2 = time.Duration(1 * time.Second) )
View Source
const ( //MaxMargin is max value for margin (DevStatusReq) MaxMargin = int8(64) )
Variables ¶
This section is empty.
Functions ¶
func PrintMACCommand ¶
Types ¶
type Device ¶
type Device struct { State int `json:"-"` Exit chan struct{} `json:"-"` Id int `json:"id"` Info models.InformationDevice `json:"info"` Class classes.Class `json:"-"` Resources *res.Resources `json:"-"` Mutex sync.Mutex `json:"-"` }
func (*Device) ADRProcedure ¶
func (d *Device) ADRProcedure()
func (*Device) CanExecute ¶
func (*Device) ChangeLocation ¶
func (*Device) ChangePayload ¶
func (*Device) CreateEmptyFrame ¶
func (*Device) CreateJoinRequest ¶
func (*Device) CreateUplink ¶
func (*Device) DataRateToString ¶
func (*Device) DownlinkReceivedRX2ClassC ¶
func (d *Device) DownlinkReceivedRX2ClassC()
func (*Device) ExecuteMACCommand ¶
func (d *Device) ExecuteMACCommand(downlink dl.InformationDownlink)
func (*Device) FPendingProcedure ¶
func (d *Device) FPendingProcedure(downlink *dl.InformationDownlink)
func (*Device) GetModulation ¶
func (*Device) OtaaActivation ¶
func (d *Device) OtaaActivation()
func (*Device) ProcessDownlink ¶
func (d *Device) ProcessDownlink(phy lorawan.PHYPayload) (*dl.InformationDownlink, error)
func (*Device) ProcessJoinAccept ¶
func (d *Device) ProcessJoinAccept(JoinAccPayload *lorawan.JoinAcceptPayload) (*dl.InformationDownlink, error)
func (*Device) SendEmptyFrame ¶
func (d *Device) SendEmptyFrame()
func (*Device) SendJoinRequest ¶
func (d *Device) SendJoinRequest()
func (*Device) SendMACCommand ¶
func (*Device) SwitchChannel ¶
func (d *Device) SwitchChannel()
func (*Device) SwitchClass ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.