Documentation
¶
Index ¶
- type Simulator
- func (s *Simulator) AddWebSocket(WebSocket *socketio.Conn)
- func (s *Simulator) ChangeLocation(l socket.NewLocation) bool
- func (s *Simulator) ChangePayload(pl socket.NewPayload) (string, bool)
- func (s *Simulator) DeleteDevice(Id int) bool
- func (s *Simulator) DeleteGateway(Id int) bool
- func (s *Simulator) GetBridgeAddress() models.AddressIP
- func (s *Simulator) GetDevices() []dev.Device
- func (s *Simulator) GetGateways() []gw.Gateway
- func (s *Simulator) Print(content string, err error, printType int)
- func (s *Simulator) Run()
- func (s *Simulator) SaveBridgeAddress(remoteAddr models.AddressIP) error
- func (s *Simulator) SendMACCommand(cid lorawan.CID, data socket.MacCommand)
- func (s *Simulator) SendUplink(pl socket.NewPayload)
- func (s *Simulator) SetDevice(device *dev.Device, update bool) (int, int, error)
- func (s *Simulator) SetGateway(gateway *gw.Gateway, update bool) (int, int, error)
- func (s *Simulator) Stop()
- func (s *Simulator) ToggleStateDevice(Id int)
- func (s *Simulator) ToggleStateGateway(Id int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Simulator ¶
type Simulator struct { State uint8 `json:"-"` Devices map[int]*dev.Device `json:"-"` ActiveDevices map[int]int `json:"-"` ActiveGateways map[int]int `json:"-"` ComponentsInactiveTmp int `json:"-"` Gateways map[int]*gw.Gateway `json:"-"` Forwarder f.Forwarder `json:"-"` NextIDDev int `json:"nextIDDev"` NextIDGw int `json:"nextIDGw"` BridgeAddress string `json:"bridgeAddress"` Resources res.Resources `json:"-"` }
Simulator is a model
func GetIstance ¶
func GetIstance() *Simulator
func (*Simulator) AddWebSocket ¶
func (*Simulator) ChangeLocation ¶
func (s *Simulator) ChangeLocation(l socket.NewLocation) bool
func (*Simulator) ChangePayload ¶
func (s *Simulator) ChangePayload(pl socket.NewPayload) (string, bool)
func (*Simulator) DeleteDevice ¶
func (*Simulator) DeleteGateway ¶
func (*Simulator) GetBridgeAddress ¶
func (*Simulator) GetDevices ¶
func (*Simulator) GetGateways ¶
func (*Simulator) SaveBridgeAddress ¶
func (*Simulator) SendMACCommand ¶
func (s *Simulator) SendMACCommand(cid lorawan.CID, data socket.MacCommand)
func (*Simulator) SendUplink ¶
func (s *Simulator) SendUplink(pl socket.NewPayload)
func (*Simulator) SetGateway ¶
func (*Simulator) ToggleStateDevice ¶
func (*Simulator) ToggleStateGateway ¶
Click to show internal directories.
Click to hide internal directories.