C API: Expose icsneo_getNetworkByNumber

This commit is contained in:
Paul Hollinsky
2021-04-12 20:20:48 -04:00
parent 40be68e744
commit 3b6b4f0541
2 changed files with 23 additions and 0 deletions
+6
View File
@@ -262,6 +262,12 @@ bool icsneo_removeMessageCallback(const neodevice_t* device, int id) {
return device->device->removeMessageCallback(id);
}
neonetid_t icsneo_getNetworkByNumber(const neodevice_t* device, neonettype_t type, unsigned int number) {
if(!icsneo_isValidNeoDevice(device))
return false;
return neonetid_t(device->device->getNetworkByNumber(icsneo::Network::Type(type), size_t(number)).getNetID());
}
bool icsneo_getProductName(const neodevice_t* device, char* str, size_t* maxLength) {
// TAG String copy function
if(maxLength == nullptr) {