contact

package
v0.0.0-...-0dfdac3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectNats

func ConnectNats()

ConnectNats is

func GetMacAddr

func GetMacAddr() (addr string)

GetMacAddr is

func ReciveMessage

func ReciveMessage(m *nats.Msg)

ReciveMessage is get servers

func SendMessage

func SendMessage(subject string, message interface{})

SendMessage is

Types

type DeviceInformation

type DeviceInformation struct {
	DeviceID  string
	TopicList []string
}

DeviceInformation is

type MotorControlMessageJSON

type MotorControlMessageJSON struct {
	Subject string `json:"subject"`
	Type    string `json:"type"`
	Motors  []struct {
		ID        int `json:"id"`
		Direction int `json:"direction"`
		Pwm       int `json:"pwm"`
	} `json:"motors"`
}

MotorControlMessageJSON is

{
  "subject": "motor",
  "type": "wheel",
  "motors": [
    {
      "id": 1,
      "direction": 1,
      "pwm": 50
    },
    {
      "id": 2,
      "direction": 1,
      "pwm": 50
    },
    {
      "id": 3,
      "direction": 0,
      "pwm": 80
    },
    {
      "id": 4,
      "direction": 0,
      "pwm": 80
    }
  ]
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL