コード例 #1
0
func setControllerResponse(m mp.Message) string {
	//unpack needed Value and call function
	// func foobar()
	resp := mp.Message{
		"id":     []string{MyID},
		"action": []string{"setControllerResponse"},
		"status": []string{"0"},
	}
	return resp.Encode()
}
コード例 #2
0
func getDataResponse(m mp.Message) string {
	//unpack needed Value and call function
	// func foobar()
	resp := mp.Message{
		"id":     []string{MyID},
		"action": []string{"getDataResponse"},
		"th":     []string{"40.00"},
		"tr":     []string{"20.07"},
		"tpco":   []string{"62.33"},
		"p":      []string{"2"},
		"i":      []string{"0.34"},
		"d":      []string{"0.444"},
	}
	return resp.Encode()
}