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() }
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() }