示例#1
0
func main() {
	flag.Parse()

	ecuCfg := ecu.DefaultECUConfig()
	ecuCfg.ControlAddress = *controlAddress
	ecuCfg.MonitorAddress = *monitorAddress

	ecu := ecu.NewECU(&ecuCfg)
	server.ShutdownHandler(ecu)
	ecu.Run()
}
示例#2
0
// Author: [email protected] (Joel Sing)

// The seesaw_ecu binary implements the Seesaw ECU component, which provides
// an externally accessible interface to monitor and control the Seesaw Node.
package main

import (
	"flag"

	"github.com/google/seesaw/common/server"
	"github.com/google/seesaw/ecu"
)

var (
	controlAddress = flag.String("control_address",
		ecu.DefaultECUConfig().ControlAddress, "ECU control address")
	monitorAddress = flag.String("monitor_address",
		ecu.DefaultECUConfig().MonitorAddress, "ECU monitor address")
)

func main() {
	flag.Parse()

	ecuCfg := ecu.DefaultECUConfig()
	ecuCfg.ControlAddress = *controlAddress
	ecuCfg.MonitorAddress = *monitorAddress

	ecu := ecu.NewECU(&ecuCfg)
	server.ShutdownHandler(ecu)
	ecu.Run()
}