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.
Diff: slcan.h
- Revision:
- 2:1327e61cc56b
- Parent:
- 0:f2565808eea5
- Child:
- 3:bc163d555ddc
diff -r 3644b10bce2f -r 1327e61cc56b slcan.h
--- a/slcan.h	Thu Jun 09 05:30:21 2016 +0000
+++ b/slcan.h	Thu Jun 09 06:29:08 2016 +0000
@@ -21,14 +21,20 @@
     virtual bool processCANMessages() = 0;
     virtual bool flush() = 0;
     
+    virtual uint8_t getFirmwareVersion();
+    virtual uint8_t getHardwareVersion();
+    virtual const char* getSerialString();
+    
     // Shared amongst subclasses
     static size_t formatCANMessage(const CANMessage& msg, char* buf, size_t max_len);
     static size_t formattedCANMessageLength(const CANMessage& msg);
-    bool execCommand(const char* command);
+    static size_t commandResponseLength(const char* command);
+    bool execCommand(const char* command, char* response=NULL);
     
 private:
     bool execConfigCommand(const char* command);
     bool execTransmitCommand(const char* command);
+    bool execDiagnosticCommand(const char *command, char* response);
 };
 
 class USBSLCAN : public SLCANBase {