Karpova Lab fork of stateScript

Dependencies:   SMARTWAV mbed

Fork of stateScript_v2 by Mattias Karlsson

Revision:
3:d7b0a0890d96
Parent:
2:35266b266eaa
diff -r 35266b266eaa -r d7b0a0890d96 hardwareInterface.h
--- a/hardwareInterface.h	Wed Jun 03 23:41:16 2015 +0000
+++ b/hardwareInterface.h	Sat Oct 10 22:37:17 2015 +0000
@@ -3,6 +3,8 @@
 
 #include <stdint.h>
 #include <string>
+#include <cstdlib>
+#include <string.h>
 
 #define PENDINGTRIGGERBUFFERSIZE 10
 
@@ -63,6 +65,8 @@
     virtual bool readable() = 0;
     virtual char readChar() = 0;
     virtual void writeChar(char s)= 0;
+    virtual int  requestToWriteString(char *s, int numBytes) = 0;
+
 protected:
 
 
@@ -106,17 +110,22 @@
     virtual int getPendingFunctionTriggers(uint16_t *bufferPtr); //Returns the number of pending shortcut triggers
     virtual uint32_t getDigitalOutputChangeFlags();
     virtual uint32_t getDigitalInputChangeFlags();
+    void setPortUpdatesOn(int portNum);
+    void setPortUpdatesOff(int portNum);
+    bool* getIgnoreUpdates();
+
 
 
 protected:
 
     //virtual void timerInterrupt() = 0;
 
-    void immediateClockReset();
+    void immediateClockReset();   
     int currentDINPin;
     int currentDOUTPin;
     uint32_t currentDigitalOuputStates;
     uint32_t currentDigitalInputStates;
+    bool ignorePortUpdates[32];
 
 
 
@@ -134,9 +143,10 @@
     outputStream(int bufferSizeIn);
     ~outputStream();
     void setSerial(sSerialPort *s);
-    void send(string outputString);
+    void send(const string &outputString);
+    void send(const char* s);
     void debug(const char* s);
-    outputStream &operator<<(string outputString);
+    outputStream &operator<<(const string &outputString);
     outputStream &operator<<(int outputNum);
     outputStream &operator<<(uint32_t outputNum);
     outputStream &operator<<(const char* s);