Go to the documentation of this file. 1 #ifndef COMMS_BEHAVIOUR_h
2 #define COMMS_BEHAVIOUR_h
4 #include "Behaviours.h"
28 _node->announce_capabilities();
30 return "SendCapabilities behaviour " +
_name;
45 const int _timeoutInterval = 5000;
59 return "<String peerId>";
71 return "Invalid args (" +
args +
") in behaviour " +
name();
78 return "Link ping from (" + _peerId +
")";
83 String str =
"{\"id\":\"" + String(
_node->getId()) +
"\",\"Link\":{\"peerId\":\"" + _peerId +
"\"}}";
86 return "New link with (" + _peerId +
")";
94 if (millis() > (_t+_timeoutInterval))
96 String str =
"{\"id\":\"" + String(
_node->getId()) +
"\",\"Unlink\":{\"peerId\":\"" + _peerId +
"\"}}";
115 const int _interval = 4000;
116 unsigned long _t = 0;
SendCapabilities(VizBlocks *node, String name="SendCapabilities")
Definition: CommsBehaviours.hpp:18
boolean _background
Definition: Behaviours.hpp:15
String start(String args)
What does this do?
Definition: CommsBehaviours.hpp:65
char * args()
What does this do?
Definition: CommsBehaviours.hpp:57
String start(String args)
String _name
Definition: Behaviours.hpp:16
Definition: Behaviours.hpp:9
Definition: CommsBehaviours.hpp:42
Definition: CommsBehaviours.hpp:14
Definition: CommsBehaviours.hpp:112
String start(String args)
What does this do?
Definition: CommsBehaviours.hpp:25
Link(VizBlocks *node, String name="Link")
Definition: CommsBehaviours.hpp:49
boolean _running
Definition: Behaviours.hpp:14
Definition: VizBlocks.hpp:18
void update()
What does this do?
Definition: CommsBehaviours.hpp:92
PingServer(VizBlocks *node, String name="PingServer")