示例#1
0
func main() {

	d := dusk.OpenDatabase("mongo", "wengine", "OpenStack123", "127.0.0.1", "wengine")
	time_now := common.GetTime()
	my_motion := activa.Motion{Id: time_now, InitTime: time_now}
	err := d.WriteMotion(&my_motion)
	fmt.Printf("Insert err:%v", err)

}
示例#2
0
文件: activa.go 项目: gtfour/actuator
func CreateMotion() (m Motion) {

	time_now := common.GetTime()
	m.Id = time_now
	m.InitTime = time_now
	m.TaskState = TASK_STATE_new
	return m

}