Documentation ¶
Index ¶
Constants ¶
View Source
const ( ProtocolVersion1 uint8 = 0x01 ProtocolVersion2 uint8 = 0x02 )
Protocol versions
Variables ¶
This section is empty.
Functions ¶
func GetGatewayID ¶
GetGatewayID returns the gateway ID for the given packet data.
Types ¶
type BackendConfig ¶
type BackendConfig struct { Host string `mapstructure:"host"` UplinkOnly bool `mapstructure:"uplink_only"` GatewayIDs []string `mapstructure:"gateway_ids"` }
BackendConfig holds the config for a single backend.
type Config ¶
type Config struct { Bind string `mapstructure:"bind"` Backends []BackendConfig `mapstructure:"backend"` PacketThreshold int `mapstructure:"concentrators"` MainGatewayID string `mapstructure:"maingatewayid"` }
Config holds the multiplexer config.
type Multiplexer ¶
MIMO-Packet-Forwarder forwards UDP data from multiple gateways to multiple backends.
type PacketType ¶
type PacketType byte
PacketType defines the packet type.
const ( PushData PacketType = iota PushACK PullData PullResp PullACK TXACK )
Available packet types
func GetPacketType ¶
func GetPacketType(data []byte) (PacketType, error)
GetPacketType returns the packet type for the given packet data.
func (PacketType) String ¶
func (i PacketType) String() string
Click to show internal directories.
Click to hide internal directories.