Newer
Older
int ButtonHeld::start(String args)
{
//This is where you do your stuff for a simple behaviour
String str = "{\"id\":\"" + String(_node->getId()) + "\",\"Input\":{\"type\":\"" + String(name()) + "\",\"button\":\"" + args + "\"}}";
_node->announce(str);
return "ButtonHeld behaviour " + _name + " with (" + args + ")";
};
ButtonReleased::ButtonReleased(VizBlocks* node, String name = "ButtonReleased") :
int ButtonReleased::start(String args)
{
//This is where you do your stuff for a simple behaviour
String str = "{\"id\":\"" + String(_node->getId()) + "\",\"Input\":{\"type\":\"" + String(name()) + "\",\"button\":\"" + args + "\"}}";
_node->announce(str);
return "ButtonReleased behaviour " + _name + " with (" + args + ")";
char * ButtonReleased::args()
{
return "<String buttonId>";
};
ButtonClicked::ButtonClicked(VizBlocks* node, String name = "ButtonClicked") :
int ButtonClicked::start(String args)
{
//This is where you do your stuff for a simple behaviour
String str = "{\"id\":\"" + String(_node->getId()) + "\",\"Input\":{\"type\":\"" + String(name()) + "\",\"button\":\"" + args + "\"}}";
_node->announce(str);
return "ButtonClicked behaviour " + _name + " with (" + args + ")";
};
ButtonPressed::ButtonPressed(VizBlocks* node, String name = "ButtonPressed") :
Behaviour(name), _node(node)
{}
int ButtonPressed::start(String args)
{
//This is where you do your stuff for a simple behaviour
String str = "{\"id\":\"" + String(_node->getId()) + "\",\"Input\":{\"type\":\"" + String(name()) + "\",\"button\":\"" + args + "\"}}";
_node->announce(str);
return "ButtonPressed behaviour " + _name + " with (" + args + ")";
};
char * ButtonPressed::args()
{
return "<String buttonId>";
};
ButtonTick::ButtonTick(VizBlocks* node, String name = "ButtonTick") :
Behaviour(name), _node(node)
{ }
int ButtonTick::start(String args)
{
//This is where you do your stuff for a simple behaviour
String str = "{\"id\":\"" + String(_node->getId()) + "\",\"Input\":{\"type\":\"" + String(name()) + "\",\"button\":\"" + args + "\"}}";
_node->announce(str);
return "ButtonTick behaviour " + _name + " with (" + args + ")";
};
char * ButtonTick::args()
{
return "<String buttonId>";