mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Allow version and supported devices to be printed at runtime
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user