Go to the documentation of this file. 1 #ifndef ROTARYENCODER_BEHAVIOUR_h
2 #define ROTARYENCODER_BEHAVIOUR_h
19 char*
args() {
return "<String rotaryEncoderId> <int position>"; };
23 int index =
args.indexOf(
" ");
28 encoder =
args.substring(0, index);
29 position =
args.substring(index+1);
31 return "RotaryEncoderUpdated behaviour args error!";
34 String str =
"{\"id\":\"" + String(_node->
getId()) +
"\",\"Input\":{\"type\":\"" + String(
name()) +
"\",\"encoder\":\"" + encoder +
"\",\"position\":\"" + position +
"\"}}";
36 return "RotaryEncoderUpdated behaviour " +
_name +
" with (" +
args +
")";
RotaryEncoderUpdated(VizBlocks *node, String name="RotaryEncoderUpdated")
Definition: RotaryEncoderBehaviours.h:16
virtual String name()
Definition: Behaviours.h:28
char * getId()
Definition: VizBlocks.h:291
char * args()
Definition: RotaryEncoderBehaviours.h:19
String _name
Definition: Behaviours.h:11
Definition: Behaviours.h:4
void announce(String doc)
Definition: VizBlocks.h:270
Definition: VizBlocks.h:15
Definition: RotaryEncoderBehaviours.h:7
String start(String args)
Definition: RotaryEncoderBehaviours.h:21