func main() {
	var id uint32 = 782346
	status := "UpdateCommandTestStatus"
	result := "UpdateCommandTestResult"

	f, c, err := conf.FromArgs()
	if err != nil {
		say.Infof("Load conf err: %s", err.Error())
		return
	}

	say.Infof("Conf(%s): %+v", f, c)

	err = rest.DeviceCmdUpdate(c.URL, c.DeviceID, c.AccessKey, id, status, result)

	if err != nil {
		say.Infof("Error: %s", err.Error())
	} else {
		say.Infof("ok")
	}
}
Example #2
0
func (w *DbusRestWrapper) UpdateCommand(id uint32, status, result string) *dbus.Error {
	rest.DeviceCmdUpdate(w.URL, w.DeviceID, w.AccessKey, id, status, result)
	return nil
}