mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Version info
This commit is contained in:
@@ -363,4 +363,8 @@ bool icsneo_describeDevice(const neodevice_t* device, char* str, size_t* maxLeng
|
||||
ErrorManager::GetInstance().add(APIError::OutputTruncated);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
neoversion_t icsneo_getVersion(void) {
|
||||
return icsneo::GetVersion();
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef __ICSNEO_API_BUILDINFO_H_
|
||||
#define __ICSNEO_API_BUILDINFO_H_
|
||||
|
||||
const char* GIT_BRANCH = "@GIT_BRANCH@";
|
||||
const char* GIT_DESCRIBE = "@GIT_DESCRIBE@";
|
||||
const uint16_t BUILD_MAJOR = (@PROJECT_VERSION_MAJOR@);
|
||||
const uint16_t BUILD_MINOR = (@PROJECT_VERSION_MINOR@);
|
||||
const uint16_t BUILD_PATCH = (@PROJECT_VERSION_PATCH@);
|
||||
const char* BUILD_METADATA = "@BUILD_METADATA@";
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,15 @@
|
||||
#include "icsneo/api/version.h"
|
||||
#include "generated/buildinfo.h"
|
||||
|
||||
using namespace icsneo;
|
||||
|
||||
neoversion_t icsneo::GetVersion(void) {
|
||||
neoversion_t version = {};
|
||||
version.major = BUILD_MAJOR;
|
||||
version.minor = BUILD_MINOR;
|
||||
version.patch = BUILD_PATCH;
|
||||
version.metadata = BUILD_METADATA;
|
||||
version.buildBranch = GIT_BRANCH;
|
||||
version.buildTag = GIT_DESCRIBE;
|
||||
return version;
|
||||
}
|
||||
@@ -322,8 +322,7 @@ int icsneoValidateHObject(void* hObject) {
|
||||
}
|
||||
|
||||
int icsneoGetDLLVersion(void) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
return 804;
|
||||
}
|
||||
|
||||
int icsneoGetSerialNumber(void* hObject, unsigned int*iSerialNumber) {
|
||||
|
||||
Reference in New Issue
Block a user