Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetInterface LM75B mbed-rtos mbed
Diff: H_files/master.h
- Revision:
- 8:556a5738c2fa
- Parent:
- 6:4f13276fd1e2
diff -r 2de256f902c8 -r 556a5738c2fa H_files/master.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/H_files/master.h Fri Mar 23 11:06:09 2018 +0000
@@ -0,0 +1,28 @@
+#ifndef master_h
+#define master_h
+#include "mbed.h"
+#include "EthernetInterface.h"
+
+class Master
+{
+public:
+ Master();//Constructor
+
+ /**
+ * @param Ip char array (const)
+ *
+ * MAXIMUM buffer = 512; POORT = 4000;
+ * Deze methode is de master_run, dit wil zeggen dat hij nooit meer uit deze methode zal gaan (while lus).
+ * Je geeft het IP address mee aan deze methode.
+ * Eerst zal hij wachten op het commando dat je wilt versturen. Daarna wordt er gevraagd naar het ID dat je wilt versturen.
+ * Nadien zal hij wachten totdat hij een antwoord terugkrijgt van de slave (ACK).
+ * Het antwoord van de slave wordt dan uitgeprint op het consolescherm.
+ */
+ void masterRun(const char*);
+private:
+ char buffer[512];
+ char receiveID[14];
+ const char* IP;
+};
+
+#endif
\ No newline at end of file