Devan Lai
/
SLCAN
SLCAN/CAN-USB implementation for mbed targets
Diff: slcan.h
- Revision:
- 2:1327e61cc56b
- Parent:
- 0:f2565808eea5
- Child:
- 3:bc163d555ddc
--- 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 {