Beispiel #1
0
func (i *Input) newRequest(function string, parameter interface{}, ctype messages.CallType) (req *messages.Request) {
	req = messages.NewRequest(i.cfg.UUID(), function, ctype, parameter)
	return
}
Beispiel #2
0
// Emit acts like a ThingiverseIO Trigger, which is initiated by the Output.
func (o *Output) Emit(function string, inparams interface{}, outparams interface{}) {
	req := messages.NewRequest(o.cfg.UUID(), function, messages.TRIGGER, inparams)
	o.Reply(req, outparams)
}