Allow version and supported devices to be printed at runtime

This commit is contained in:
Paul Hollinsky
2018-11-20 10:41:42 -05:00
parent 2ade9116eb
commit 8a4e33c8df
7 changed files with 36 additions and 2 deletions
+13 -1
View File
@@ -3,7 +3,14 @@
#include <stdint.h>
typedef struct {
#ifdef __cplusplus
#include <ostream>
#define NEOVERSION_DEFINE_BEGIN struct neoversion_t {
#else
#define NEOVERSION_DEFINE_BEGIN typedef struct {
#endif
NEOVERSION_DEFINE_BEGIN
uint16_t major;
uint16_t minor;
uint16_t patch;
@@ -11,7 +18,12 @@ typedef struct {
const char* buildBranch;
const char* buildTag;
char reserved[32];
#ifdef __cplusplus
friend std::ostream& operator<<(std::ostream& os, const neoversion_t& version);
};
#else
} neoversion_t;
#endif
#ifdef __cplusplus
namespace icsneo {
+1 -1
View File
@@ -135,7 +135,7 @@ public:
case VividCAN:
return "VividCAN";
case OBD2_SIM:
return "neoOBD2-SIM";
return "neoOBD2 SIM";
case DONT_REUSE0:
case DONT_REUSE1:
case DONT_REUSE2:
+1
View File
@@ -11,6 +11,7 @@
namespace icsneo {
std::vector<std::shared_ptr<Device>> FindAllDevices();
std::vector<DeviceType> GetSupportedDevices();
size_t ErrorCount(ErrorFilter filter = ErrorFilter());
std::vector<APIError> GetErrors(ErrorFilter filter, size_t max = 0);