Compare commits
No commits in common. "d42c51d772ee055faf5ead30c9ef733185c7a6ff" and "49e578a6578f88db6c26f826803e4d515ded3d0d" have entirely different histories.
d42c51d772
...
49e578a657
|
|
@ -230,7 +230,6 @@ set(SRC_FILES
|
||||||
communication/message/logdatamessage.cpp
|
communication/message/logdatamessage.cpp
|
||||||
communication/message/tc10statusmessage.cpp
|
communication/message/tc10statusmessage.cpp
|
||||||
communication/message/gptpstatusmessage.cpp
|
communication/message/gptpstatusmessage.cpp
|
||||||
communication/message/allmacaddressesmessage.cpp
|
|
||||||
communication/message/ethernetstatusmessage.cpp
|
communication/message/ethernetstatusmessage.cpp
|
||||||
communication/message/networkmutexmessage.cpp
|
communication/message/networkmutexmessage.cpp
|
||||||
communication/message/clientidmessage.cpp
|
communication/message/clientidmessage.cpp
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
using namespace icsneo;
|
using namespace icsneo;
|
||||||
|
|
||||||
|
|
@ -459,78 +458,27 @@ icsneoc2_error_t icsneoc2_device_pcb_serial_get(const icsneoc2_device_t* device,
|
||||||
return icsneoc2_error_success;
|
return icsneoc2_error_success;
|
||||||
}
|
}
|
||||||
|
|
||||||
icsneoc2_error_t icsneoc2_device_mac_addresses_enumerate(const icsneoc2_device_t* device, icsneoc2_mac_addr_entry_t** mac_entries) {
|
icsneoc2_error_t icsneoc2_device_mac_address_get(const icsneoc2_device_t* device, uint8_t* value, size_t* value_length) {
|
||||||
auto res = icsneoc2_device_is_valid(device);
|
auto res = icsneoc2_device_is_valid(device);
|
||||||
if(res != icsneoc2_error_success) {
|
if(res != icsneoc2_error_success) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
if(!mac_entries) {
|
if(!value_length) {
|
||||||
return icsneoc2_error_invalid_parameters;
|
return icsneoc2_error_invalid_parameters;
|
||||||
}
|
}
|
||||||
const auto result = device->device->getMACAddresses();
|
auto macAddress = device->device->getMACAddress();
|
||||||
if(result.empty()) {
|
if(!macAddress.has_value()) {
|
||||||
return icsneoc2_error_invalid_type;
|
return icsneoc2_error_invalid_type;
|
||||||
}
|
}
|
||||||
icsneoc2_mac_addr_entry_t* head = nullptr;
|
const auto& data = *macAddress;
|
||||||
icsneoc2_mac_addr_entry_t* tail = nullptr;
|
|
||||||
for(auto addr_pair : result) {
|
|
||||||
auto* node = new (std::nothrow) icsneoc2_mac_addr_entry_t;
|
|
||||||
if(!node) {
|
|
||||||
icsneoc2_mac_addresses_free(head);
|
|
||||||
return icsneoc2_error_out_of_memory;
|
|
||||||
}
|
|
||||||
node->network_id = static_cast<uint16_t>(addr_pair.first);
|
|
||||||
std::copy(addr_pair.second.begin(), addr_pair.second.end(), node->address);
|
|
||||||
node->next = nullptr;
|
|
||||||
if(!head) {
|
|
||||||
head = node;
|
|
||||||
} else {
|
|
||||||
tail->next = node;
|
|
||||||
}
|
|
||||||
tail = node;
|
|
||||||
}
|
|
||||||
return icsneoc2_error_success;
|
|
||||||
}
|
|
||||||
|
|
||||||
icsneoc2_error_t icsneoc2_mac_network_id_get(const icsneoc2_mac_addr_entry_t* mac_address, _icsneoc2_netid_t* network_id) {
|
|
||||||
if(!mac_address || !network_id) {
|
|
||||||
return icsneoc2_error_invalid_parameters;
|
|
||||||
}
|
|
||||||
*network_id = static_cast<_icsneoc2_netid_t>(mac_address->network_id);
|
|
||||||
return icsneoc2_error_success;
|
|
||||||
}
|
|
||||||
|
|
||||||
icsneoc2_error_t icsneoc2_mac_address_get(const icsneoc2_mac_addr_entry_t* mac_address, uint8_t* value, size_t* value_length) {
|
|
||||||
if(!mac_address || !value || !value_length) {
|
|
||||||
return icsneoc2_error_invalid_parameters;
|
|
||||||
}
|
|
||||||
if(value) {
|
if(value) {
|
||||||
size_t copyLen = std::min(*value_length, static_cast<size_t>(ICSNEO_MAC_ADDRESS_LEN));
|
size_t copyLen = std::min(*value_length, data.size());
|
||||||
std::copy(mac_address->address, mac_address->address + copyLen, value);
|
std::copy(data.begin(), data.begin() + copyLen, value);
|
||||||
}
|
}
|
||||||
*value_length = static_cast<size_t>(ICSNEO_MAC_ADDRESS_LEN);
|
*value_length = data.size();
|
||||||
return icsneoc2_error_success;
|
return icsneoc2_error_success;
|
||||||
}
|
}
|
||||||
|
|
||||||
icsneoc2_mac_addr_entry_t* icsneoc2_mac_addresses_next(const icsneoc2_mac_addr_entry_t* mac_address) {
|
|
||||||
if(!mac_address) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
return mac_address->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
icsneoc2_error_t icsneoc2_mac_addresses_free(icsneoc2_mac_addr_entry_t* mac_address) {
|
|
||||||
if(!mac_address) {
|
|
||||||
return icsneoc2_error_invalid_parameters;
|
|
||||||
}
|
|
||||||
|
|
||||||
while(mac_address) {
|
|
||||||
auto* next = mac_address->next;
|
|
||||||
delete mac_address;
|
|
||||||
mac_address = next;
|
|
||||||
}
|
|
||||||
return icsneoc2_error_success;
|
|
||||||
}
|
|
||||||
|
|
||||||
icsneoc2_error_t icsneoc2_device_go_online(const icsneoc2_device_t* device, bool go_online) {
|
icsneoc2_error_t icsneoc2_device_go_online(const icsneoc2_device_t* device, bool go_online) {
|
||||||
auto res = icsneoc2_device_is_valid(device);
|
auto res = icsneoc2_device_is_valid(device);
|
||||||
|
|
|
||||||
|
|
@ -48,12 +48,6 @@ typedef struct icsneoc2_chip_versions_t {
|
||||||
icsneoc2_chip_versions_t* next;
|
icsneoc2_chip_versions_t* next;
|
||||||
} icsneoc2_chip_versions_t;
|
} icsneoc2_chip_versions_t;
|
||||||
|
|
||||||
typedef struct icsneoc2_mac_addr_entry_t {
|
|
||||||
uint16_t network_id;
|
|
||||||
uint8_t address[ICSNEO_MAC_ADDRESS_LEN];
|
|
||||||
icsneoc2_mac_addr_entry_t* next;
|
|
||||||
} icsneoc2_mac_addr_entry_t;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Safely copies a std::string to a char array.
|
* Safely copies a std::string to a char array.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@
|
||||||
using namespace icsneo;
|
using namespace icsneo;
|
||||||
|
|
||||||
EventManager& EventManager::GetInstance() {
|
EventManager& EventManager::GetInstance() {
|
||||||
static EventManager* inst = new EventManager();
|
static EventManager inst;
|
||||||
return *inst;
|
return inst;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventManager::downgradeErrorsOnCurrentThread() {
|
void EventManager::downgradeErrorsOnCurrentThread() {
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ pybind11_add_module(icsneopy
|
||||||
icsneopy/communication/message/tc10statusmessage.cpp
|
icsneopy/communication/message/tc10statusmessage.cpp
|
||||||
icsneopy/communication/message/mdiomessage.cpp
|
icsneopy/communication/message/mdiomessage.cpp
|
||||||
icsneopy/communication/message/gptpstatusmessage.cpp
|
icsneopy/communication/message/gptpstatusmessage.cpp
|
||||||
icsneopy/communication/message/allmacaddressesmessage.cpp
|
|
||||||
icsneopy/communication/message/ethernetstatusmessage.cpp
|
icsneopy/communication/message/ethernetstatusmessage.cpp
|
||||||
icsneopy/communication/message/spimessage.cpp
|
icsneopy/communication/message/spimessage.cpp
|
||||||
icsneopy/communication/message/scriptstatusmessage.cpp
|
icsneopy/communication/message/scriptstatusmessage.cpp
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
#include <pybind11/pybind11.h>
|
|
||||||
#include <pybind11/stl.h>
|
|
||||||
|
|
||||||
#include "icsneo/communication/message/allmacaddressesmessage.h"
|
|
||||||
|
|
||||||
namespace icsneo {
|
|
||||||
|
|
||||||
void init_allmacaddressesmessage(pybind11::module_& m) {
|
|
||||||
pybind11::classh<AllMACAddressesMessage, Message>(m, "AllMACAddressesMessage")
|
|
||||||
.def_readonly("addresses", &AllMACAddressesMessage::addresses);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace icsneo
|
|
||||||
|
|
@ -33,7 +33,7 @@ void init_device(pybind11::module_& m) {
|
||||||
.def("get_serial_number", &Device::getSerialNumber)
|
.def("get_serial_number", &Device::getSerialNumber)
|
||||||
.def("get_serial", &Device::getSerial)
|
.def("get_serial", &Device::getSerial)
|
||||||
.def("get_pcb_serial", &Device::getPCBSerial, pybind11::call_guard<pybind11::gil_scoped_release>())
|
.def("get_pcb_serial", &Device::getPCBSerial, pybind11::call_guard<pybind11::gil_scoped_release>())
|
||||||
.def("get_mac_addresses", &Device::getMACAddresses, pybind11::call_guard<pybind11::gil_scoped_release>())
|
.def("get_mac_address", &Device::getMACAddress, pybind11::call_guard<pybind11::gil_scoped_release>())
|
||||||
.def("get_supported_rx_networks", &Device::getSupportedRXNetworks, pybind11::return_value_policy::reference)
|
.def("get_supported_rx_networks", &Device::getSupportedRXNetworks, pybind11::return_value_policy::reference)
|
||||||
.def("get_supported_tx_networks", &Device::getSupportedTXNetworks, pybind11::return_value_policy::reference)
|
.def("get_supported_tx_networks", &Device::getSupportedTXNetworks, pybind11::return_value_policy::reference)
|
||||||
.def("get_tc10_status", &Device::getTC10Status, pybind11::call_guard<pybind11::gil_scoped_release>())
|
.def("get_tc10_status", &Device::getTC10Status, pybind11::call_guard<pybind11::gil_scoped_release>())
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ void init_ethernetmessage(pybind11::module_&);
|
||||||
void init_linmessage(pybind11::module_&);
|
void init_linmessage(pybind11::module_&);
|
||||||
void init_tc10statusmessage(pybind11::module_&);
|
void init_tc10statusmessage(pybind11::module_&);
|
||||||
void init_gptpstatusmessage(pybind11::module_&);
|
void init_gptpstatusmessage(pybind11::module_&);
|
||||||
void init_allmacaddressesmessage(pybind11::module_&);
|
|
||||||
void init_mdiomessage(pybind11::module_&);
|
void init_mdiomessage(pybind11::module_&);
|
||||||
void init_spimessage(pybind11::module_&);
|
void init_spimessage(pybind11::module_&);
|
||||||
void init_ethernetstatusmessage(pybind11::module_&);
|
void init_ethernetstatusmessage(pybind11::module_&);
|
||||||
|
|
@ -60,7 +59,6 @@ PYBIND11_MODULE(icsneopy, m) {
|
||||||
init_linmessage(m);
|
init_linmessage(m);
|
||||||
init_tc10statusmessage(m);
|
init_tc10statusmessage(m);
|
||||||
init_gptpstatusmessage(m);
|
init_gptpstatusmessage(m);
|
||||||
init_allmacaddressesmessage(m);
|
|
||||||
init_mdiomessage(m);
|
init_mdiomessage(m);
|
||||||
init_ethernetstatusmessage(m);
|
init_ethernetstatusmessage(m);
|
||||||
init_macsecconfig(m);
|
init_macsecconfig(m);
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
#include "icsneo/communication/message/hardwareinfo.h"
|
#include "icsneo/communication/message/hardwareinfo.h"
|
||||||
#include "icsneo/communication/message/tc10statusmessage.h"
|
#include "icsneo/communication/message/tc10statusmessage.h"
|
||||||
#include "icsneo/communication/message/gptpstatusmessage.h"
|
#include "icsneo/communication/message/gptpstatusmessage.h"
|
||||||
#include "icsneo/communication/message/allmacaddressesmessage.h"
|
|
||||||
#include "icsneo/communication/message/apperrormessage.h"
|
#include "icsneo/communication/message/apperrormessage.h"
|
||||||
#include "icsneo/communication/message/ethernetstatusmessage.h"
|
#include "icsneo/communication/message/ethernetstatusmessage.h"
|
||||||
#include "icsneo/communication/message/networkmutexmessage.h"
|
#include "icsneo/communication/message/networkmutexmessage.h"
|
||||||
|
|
@ -344,9 +343,6 @@ bool Decoder::decode(std::shared_ptr<Message>& result, const std::shared_ptr<Pac
|
||||||
case ExtendedCommand::GetTC10Status:
|
case ExtendedCommand::GetTC10Status:
|
||||||
result = TC10StatusMessage::DecodeToMessage(packet->data);
|
result = TC10StatusMessage::DecodeToMessage(packet->data);
|
||||||
return true;
|
return true;
|
||||||
case ExtendedCommand::GetAllMACAddresses:
|
|
||||||
result = AllMACAddressesMessage::DecodeToMessage(packet->data);
|
|
||||||
return true;
|
|
||||||
case ExtendedCommand::GetGPTPStatus: {
|
case ExtendedCommand::GetGPTPStatus: {
|
||||||
result = GPTPStatus::DecodeToMessage(packet->data, report);
|
result = GPTPStatus::DecodeToMessage(packet->data, report);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
#include "icsneo/communication/message/allmacaddressesmessage.h"
|
|
||||||
#include "icsneo/communication/command.h"
|
|
||||||
#include "icsneo/communication/network.h"
|
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
using namespace icsneo;
|
|
||||||
|
|
||||||
#pragma pack(push, 2)
|
|
||||||
struct ResponseHeader {
|
|
||||||
ExtendedCommand command;
|
|
||||||
uint16_t length;
|
|
||||||
uint16_t count;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct MacAddrEntryPacket {
|
|
||||||
uint16_t networkId;
|
|
||||||
uint8_t address[MACAddressLength];
|
|
||||||
};
|
|
||||||
#pragma pack(pop)
|
|
||||||
|
|
||||||
std::shared_ptr<AllMACAddressesMessage> AllMACAddressesMessage::DecodeToMessage(const std::vector<uint8_t>& bytestream) {
|
|
||||||
if(bytestream.size() < sizeof(ResponseHeader))
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
const auto* hdr = reinterpret_cast<const ResponseHeader*>(bytestream.data());
|
|
||||||
|
|
||||||
if(hdr->command != ExtendedCommand::GetAllMACAddresses)
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
if(hdr->count > MaxMACAddressCount)
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
const size_t required = sizeof(ResponseHeader) + hdr->count * sizeof(MacAddrEntryPacket);
|
|
||||||
if(bytestream.size() < required)
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
auto msg = std::make_shared<AllMACAddressesMessage>();
|
|
||||||
|
|
||||||
const auto* entries = reinterpret_cast<const MacAddrEntryPacket*>(bytestream.data() + sizeof(ResponseHeader));
|
|
||||||
for(uint16_t i = 0; i < hdr->count; ++i) {
|
|
||||||
// The firmware sends CoreMini network IDs — convert to NetID for consistent use in libicsneo
|
|
||||||
Network::NetID netId = Network::GetNetIDFromCoreMiniNetwork(static_cast<Network::CoreMini>(entries[i].networkId));
|
|
||||||
auto addr = entries[i].address;
|
|
||||||
MACAddress arrAddr;
|
|
||||||
std::copy(addr, addr + MACAddressLength, arrAddr.begin());
|
|
||||||
msg->addresses.emplace(std::make_pair(netId, arrAddr));
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg;
|
|
||||||
}
|
|
||||||
|
|
@ -2263,34 +2263,13 @@ std::optional<std::vector<uint8_t>> Device::getPCBSerial() {
|
||||||
return std::vector<uint8_t>(serialMsg->pcbSerial, serialMsg->pcbSerial + sizeof(serialMsg->pcbSerial));
|
return std::vector<uint8_t>(serialMsg->pcbSerial, serialMsg->pcbSerial + sizeof(serialMsg->pcbSerial));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unordered_map<Network::NetID, MACAddress> Device::getMACAddresses() {
|
std::optional<std::vector<uint8_t>> Device::getMACAddress() {
|
||||||
if(supportsGetAllMACAddresses()) {
|
|
||||||
if(!isOpen()) {
|
|
||||||
report(APIEvent::Type::DeviceCurrentlyClosed, APIEvent::Severity::Error);
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
auto msg = com->waitForMessageSync(
|
|
||||||
[this](){ return com->sendCommand(ExtendedCommand::GetAllMACAddresses, {}); },
|
|
||||||
std::make_shared<MessageFilter>(Message::Type::AllMACAddresses),
|
|
||||||
std::chrono::milliseconds(100)
|
|
||||||
);
|
|
||||||
if(msg) {
|
|
||||||
const auto typed = std::dynamic_pointer_cast<AllMACAddressesMessage>(msg);
|
|
||||||
if(typed)
|
|
||||||
return typed->addresses;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
auto serialMsg = com->getSerialNumberSync();
|
auto serialMsg = com->getSerialNumberSync();
|
||||||
if(!serialMsg || !serialMsg->hasMacAddress)
|
if(!serialMsg || !serialMsg->hasMacAddress) {
|
||||||
return {};
|
return std::nullopt;
|
||||||
|
}
|
||||||
|
|
||||||
std::unordered_map<Network::NetID, MACAddress> addresses;
|
return std::vector<uint8_t>(serialMsg->macAddress, serialMsg->macAddress + sizeof(serialMsg->macAddress));
|
||||||
auto addr = serialMsg->macAddress;
|
|
||||||
MACAddress arrAddr;
|
|
||||||
std::copy(addr, addr + MACAddressLength, arrAddr.begin());
|
|
||||||
addresses.emplace(std::make_pair(Network::NetID::ETHERNET_01, arrAddr));
|
|
||||||
return addresses;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<std::set<SupportedFeature>> Device::getSupportedFeatures() {
|
std::optional<std::set<SupportedFeature>> Device::getSupportedFeatures() {
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ option(LIBICSNEO_BUILD_C2_ETHERNET_RECEIVE_EXAMPLE "Build the C2 ethernet receiv
|
||||||
option(LIBICSNEO_BUILD_C2_T1S_LOOPBACK_EXAMPLE "Build the C2 RAD-Comet3 T1S loopback example." ON)
|
option(LIBICSNEO_BUILD_C2_T1S_LOOPBACK_EXAMPLE "Build the C2 RAD-Comet3 T1S loopback example." ON)
|
||||||
option(LIBICSNEO_BUILD_C2_TC10_EXAMPLE "Build the C2 TC10 example." ON)
|
option(LIBICSNEO_BUILD_C2_TC10_EXAMPLE "Build the C2 TC10 example." ON)
|
||||||
option(LIBICSNEO_BUILD_CPP_SIMPLE_EXAMPLE "Build the simple C++ example." ON)
|
option(LIBICSNEO_BUILD_CPP_SIMPLE_EXAMPLE "Build the simple C++ example." ON)
|
||||||
option(LIBICSNEO_BUILD_CPP_DEVICE_INFO_EXAMPLE "Build the C++ device info example." ON)
|
|
||||||
option(LIBICSNEO_BUILD_CPP_INTERACTIVE_EXAMPLE "Build the command-line interactive C++ example." ON)
|
option(LIBICSNEO_BUILD_CPP_INTERACTIVE_EXAMPLE "Build the command-line interactive C++ example." ON)
|
||||||
option(LIBICSNEO_BUILD_CPP_A2B_EXAMPLE "Build the A2B example." ON)
|
option(LIBICSNEO_BUILD_CPP_A2B_EXAMPLE "Build the A2B example." ON)
|
||||||
option(LIBICSNEO_BUILD_CPP_LIN_EXAMPLE "Build the LIN example." ON)
|
option(LIBICSNEO_BUILD_CPP_LIN_EXAMPLE "Build the LIN example." ON)
|
||||||
|
|
@ -102,10 +101,6 @@ if(LIBICSNEO_BUILD_CPP_SIMPLE_EXAMPLE)
|
||||||
add_subdirectory(cpp/simple)
|
add_subdirectory(cpp/simple)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LIBICSNEO_BUILD_CPP_DEVICE_INFO_EXAMPLE)
|
|
||||||
add_subdirectory(cpp/device_info)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(LIBICSNEO_BUILD_CPP_INTERACTIVE_EXAMPLE)
|
if(LIBICSNEO_BUILD_CPP_INTERACTIVE_EXAMPLE)
|
||||||
add_subdirectory(cpp/interactive)
|
add_subdirectory(cpp/interactive)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -102,31 +102,19 @@ int main() {
|
||||||
print_error_code("Failed to get PCB serial (device may not support it)", res);
|
print_error_code("Failed to get PCB serial (device may not support it)", res);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== MAC Addresses ===== */
|
/* ===== MAC Address ===== */
|
||||||
icsneoc2_mac_addr_entry_t* macs = NULL;
|
uint8_t mac[6] = {0};
|
||||||
res = icsneoc2_device_mac_addresses_enumerate(device, &macs);
|
size_t mac_len = sizeof(mac);
|
||||||
|
res = icsneoc2_device_mac_address_get(device, mac, &mac_len);
|
||||||
if(res == icsneoc2_error_success) {
|
if(res == icsneoc2_error_success) {
|
||||||
uint16_t mac_count = 0;
|
printf("MAC: ");
|
||||||
for(icsneoc2_mac_addr_entry_t* cur = macs; cur; cur = icsneoc2_mac_addresses_next(cur)) {
|
for(size_t i = 0; i < mac_len; i++) {
|
||||||
mac_count++;
|
if(i > 0) printf(":");
|
||||||
}
|
printf("%02X", mac[i]);
|
||||||
printf("MACs: %u entr%s\n", mac_count, mac_count == 1 ? "y" : "ies");
|
|
||||||
for(icsneoc2_mac_addr_entry_t* cur = macs; cur; cur = icsneoc2_mac_addresses_next(cur)) {
|
|
||||||
_icsneoc2_netid_t network_id;
|
|
||||||
icsneoc2_mac_network_id_get(cur, &network_id);
|
|
||||||
printf(" Network %-5u ", (unsigned)network_id);
|
|
||||||
uint8_t address[6];
|
|
||||||
size_t address_size = 6;
|
|
||||||
icsneoc2_mac_address_get(cur, address, &address_size);
|
|
||||||
for(int j = 0; j < 6; j++) {
|
|
||||||
if(j > 0) printf(":");
|
|
||||||
printf("%02X", (unsigned)address[j]);
|
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
|
||||||
icsneoc2_mac_addresses_free(macs);
|
|
||||||
} else {
|
} else {
|
||||||
print_error_code("Failed to get MAC addresses (device may not support it)", res);
|
print_error_code("Failed to get MAC address (device may not support it)", res);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Cleanup */
|
/* Cleanup */
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
add_executable(libicsneocpp-device-info-example src/DeviceInfoExample.cpp)
|
|
||||||
target_link_libraries(libicsneocpp-device-info-example icsneocpp)
|
|
||||||
|
|
@ -1,80 +0,0 @@
|
||||||
#include <iostream>
|
|
||||||
#include <iomanip>
|
|
||||||
#include <sstream>
|
|
||||||
|
|
||||||
#include "icsneo/icsneocpp.h"
|
|
||||||
|
|
||||||
static std::string formatMAC(const std::array<uint8_t, icsneo::MACAddressLength> addr) {
|
|
||||||
std::ostringstream oss;
|
|
||||||
for(size_t i = 0; i < icsneo::MACAddressLength; i++) {
|
|
||||||
if(i > 0) {
|
|
||||||
oss << ':';
|
|
||||||
}
|
|
||||||
oss << std::hex << std::uppercase << std::setw(2) << std::setfill('0') << static_cast<unsigned>(addr[i]);
|
|
||||||
}
|
|
||||||
return oss.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
// ===== Device Selection =====
|
|
||||||
std::cout << "Searching for devices...\n";
|
|
||||||
auto devices = icsneo::FindAllDevices();
|
|
||||||
|
|
||||||
if(devices.empty()) {
|
|
||||||
std::cout << "No devices found.\n";
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(size_t i = 0; i < devices.size(); i++) {
|
|
||||||
std::cout << " [" << (i + 1) << "] " << devices[i]->describe() << "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
int choice;
|
|
||||||
std::cout << "Select device (1-" << devices.size() << "): ";
|
|
||||||
if(!(std::cin >> choice) || choice < 1 || choice > (int)devices.size()) {
|
|
||||||
std::cout << "Invalid selection.\n";
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto& device = devices[choice - 1];
|
|
||||||
|
|
||||||
std::cout << "\nOpening " << device->describe() << "... ";
|
|
||||||
if(!device->open()) {
|
|
||||||
std::cout << "FAIL\n" << icsneo::GetLastError() << "\n";
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
std::cout << "OK\n\n";
|
|
||||||
|
|
||||||
// ===== Serial Number =====
|
|
||||||
std::cout << "Serial: " << device->getSerial() << "\n";
|
|
||||||
|
|
||||||
// ===== PCB Serial Number =====
|
|
||||||
auto pcbSerial = device->getPCBSerial();
|
|
||||||
if(pcbSerial.has_value()) {
|
|
||||||
std::cout << "PCB Serial: ";
|
|
||||||
for(auto b : *pcbSerial)
|
|
||||||
std::cout << (char)b;
|
|
||||||
std::cout << "\n";
|
|
||||||
} else {
|
|
||||||
std::cout << "PCB Serial: Not supported\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
auto macs = device->getMACAddresses();
|
|
||||||
if(!macs.empty()) {
|
|
||||||
std::cout << "MACs: " << macs.size()
|
|
||||||
<< (macs.size() == 1 ? " entry" : " entries") << "\n";
|
|
||||||
for(auto macPair : macs) {
|
|
||||||
std::cout << " " << std::left << std::setw(20)
|
|
||||||
<< icsneo::Network::GetNetIDString(static_cast<icsneo::Network::NetID>(macPair.first))
|
|
||||||
<< " " << formatMAC(macPair.second) << "\n";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
std::cout << "MACs: Not supported\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
// ===== Cleanup =====
|
|
||||||
std::cout << "\nClosing device... ";
|
|
||||||
std::cout << (device->close() ? "OK" : "FAIL") << "\n";
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
@ -64,7 +64,6 @@ enum class ExtendedCommand : uint16_t {
|
||||||
RequestTC10Wake = 0x003D,
|
RequestTC10Wake = 0x003D,
|
||||||
RequestTC10Sleep = 0x003E,
|
RequestTC10Sleep = 0x003E,
|
||||||
GetTC10Status = 0x003F,
|
GetTC10Status = 0x003F,
|
||||||
GetAllMACAddresses = 0x0040,
|
|
||||||
ProtobufAPI = 0x0041,
|
ProtobufAPI = 0x0041,
|
||||||
TransmitMessage = 0x0042,
|
TransmitMessage = 0x0042,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
#ifndef __ALLMACADDRESSESMESSAGE_H_
|
|
||||||
#define __ALLMACADDRESSESMESSAGE_H_
|
|
||||||
|
|
||||||
#define ICSNEO_MAC_ADDRESS_LEN 6
|
|
||||||
#define ICSNEO_MAX_MAC_COUNT 32
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
|
|
||||||
#include "icsneo/communication/message/message.h"
|
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
#include <vector>
|
|
||||||
#include <unordered_map>
|
|
||||||
#include <array>
|
|
||||||
namespace icsneo {
|
|
||||||
|
|
||||||
static constexpr uint16_t MaxMACAddressCount = ICSNEO_MAX_MAC_COUNT;
|
|
||||||
static constexpr uint8_t MACAddressLength = ICSNEO_MAC_ADDRESS_LEN;
|
|
||||||
|
|
||||||
using MACAddress = std::array<uint8_t, MACAddressLength>;
|
|
||||||
|
|
||||||
class AllMACAddressesMessage : public Message {
|
|
||||||
public:
|
|
||||||
static std::shared_ptr<AllMACAddressesMessage> DecodeToMessage(const std::vector<uint8_t>& bytestream);
|
|
||||||
|
|
||||||
AllMACAddressesMessage() : Message(Type::AllMACAddresses) {}
|
|
||||||
|
|
||||||
std::unordered_map<Network::NetID, MACAddress> addresses;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace icsneo
|
|
||||||
|
|
||||||
#endif // __cplusplus
|
|
||||||
|
|
||||||
#endif // __ALLMACADDRESSESMESSAGE_H_
|
|
||||||
|
|
@ -47,7 +47,6 @@ public:
|
||||||
LogData = 0x8015,
|
LogData = 0x8015,
|
||||||
NetworkMutex = 0x8016,
|
NetworkMutex = 0x8016,
|
||||||
ClientId = 0x8017,
|
ClientId = 0x8017,
|
||||||
AllMACAddresses = 0x8018,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Message(Type t) : type(t) {}
|
Message(Type t) : type(t) {}
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,6 @@
|
||||||
#include "icsneo/communication/message/versionmessage.h"
|
#include "icsneo/communication/message/versionmessage.h"
|
||||||
#include "icsneo/communication/message/gptpstatusmessage.h"
|
#include "icsneo/communication/message/gptpstatusmessage.h"
|
||||||
#include "icsneo/communication/message/networkmutexmessage.h"
|
#include "icsneo/communication/message/networkmutexmessage.h"
|
||||||
#include "icsneo/communication/message/allmacaddressesmessage.h"
|
|
||||||
|
|
||||||
#define ICSNEO_FINDABLE_DEVICE_BASE(className, type) \
|
#define ICSNEO_FINDABLE_DEVICE_BASE(className, type) \
|
||||||
static constexpr DeviceType::Enum DEVICE_TYPE = type; \
|
static constexpr DeviceType::Enum DEVICE_TYPE = type; \
|
||||||
|
|
@ -184,7 +183,7 @@ public:
|
||||||
std::string getSerial() const { return data.serial; }
|
std::string getSerial() const { return data.serial; }
|
||||||
uint32_t getSerialNumber() const { return Device::SerialStringToNum(getSerial()); }
|
uint32_t getSerialNumber() const { return Device::SerialStringToNum(getSerial()); }
|
||||||
std::optional<std::vector<uint8_t>> getPCBSerial();
|
std::optional<std::vector<uint8_t>> getPCBSerial();
|
||||||
std::unordered_map<Network::NetID, MACAddress> getMACAddresses();
|
std::optional<std::vector<uint8_t>> getMACAddress();
|
||||||
const neodevice_t& getNeoDevice() const { return data; }
|
const neodevice_t& getNeoDevice() const { return data; }
|
||||||
virtual std::string getProductName() const { return getType().getGenericProductName(); }
|
virtual std::string getProductName() const { return getType().getGenericProductName(); }
|
||||||
std::string describe() const;
|
std::string describe() const;
|
||||||
|
|
@ -999,8 +998,6 @@ protected:
|
||||||
|
|
||||||
bool supportsNetworkMutex = false;
|
bool supportsNetworkMutex = false;
|
||||||
|
|
||||||
virtual bool supportsGetAllMACAddresses() const { return true; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
neodevice_t data;
|
neodevice_t data;
|
||||||
std::shared_ptr<ResetStatusMessage> latestResetStatus;
|
std::shared_ptr<ResetStatusMessage> latestResetStatus;
|
||||||
|
|
|
||||||
|
|
@ -62,9 +62,6 @@ protected:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool supportsGetAllMACAddresses() const override {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,11 +26,6 @@ public:
|
||||||
return ProductID::neoOBD2Pro;
|
return ProductID::neoOBD2Pro;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
|
||||||
bool supportsGetAllMACAddresses() const override {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NeoOBD2PRO(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
NeoOBD2PRO(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||||
initialize(makeDriver);
|
initialize(makeDriver);
|
||||||
|
|
|
||||||
|
|
@ -25,12 +25,6 @@ public:
|
||||||
ProductID getProductID() const override {
|
ProductID getProductID() const override {
|
||||||
return ProductID::neoOBD2Sim;
|
return ProductID::neoOBD2Sim;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
|
||||||
bool supportsGetAllMACAddresses() const override {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NeoOBD2SIM(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
NeoOBD2SIM(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||||
initialize(makeDriver);
|
initialize(makeDriver);
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,7 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool supportsGPTP() const override { return true; }
|
bool supportsGPTP() const override { return true; }
|
||||||
|
|
||||||
size_t getDiskCount() const override {
|
size_t getDiskCount() const override {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,12 +60,6 @@ public:
|
||||||
ProductID getProductID() const override {
|
ProductID getProductID() const override {
|
||||||
return ProductID::neoVIFIRE;
|
return ProductID::neoVIFIRE;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
|
||||||
bool supportsGetAllMACAddresses() const override {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NeoVIFIRE(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
NeoVIFIRE(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||||
initialize<NeoVIFIRESettings>(makeDriver);
|
initialize<NeoVIFIRESettings>(makeDriver);
|
||||||
|
|
|
||||||
|
|
@ -92,10 +92,6 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool supportsWiVI() const override { return true; }
|
bool supportsWiVI() const override { return true; }
|
||||||
|
|
||||||
bool supportsGetAllMACAddresses() const override {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,10 +79,6 @@ protected:
|
||||||
size_t getDiskCount() const override {
|
size_t getDiskCount() const override {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool supportsGetAllMACAddresses() const override {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,10 +85,6 @@ protected:
|
||||||
size_t getDiskCount() const override {
|
size_t getDiskCount() const override {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool supportsGetAllMACAddresses() const override {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}; // namespace icsneo
|
}; // namespace icsneo
|
||||||
|
|
|
||||||
|
|
@ -80,10 +80,6 @@ protected:
|
||||||
bool supportsEraseMemory() const override {
|
bool supportsEraseMemory() const override {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool supportsGetAllMACAddresses() const override {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,10 +60,6 @@ protected:
|
||||||
bool supportsEraseMemory() const override {
|
bool supportsEraseMemory() const override {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool supportsGetAllMACAddresses() const override {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,10 +71,6 @@ protected:
|
||||||
std::optional<MemoryAddress> getCoreminiStartAddressSD() const override {
|
std::optional<MemoryAddress> getCoreminiStartAddressSD() const override {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool supportsGetAllMACAddresses() const override {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,6 @@ public:
|
||||||
ProductID getProductID() const override {
|
ProductID getProductID() const override {
|
||||||
return ProductID::ValueCAN3;
|
return ProductID::ValueCAN3;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
|
||||||
bool supportsGetAllMACAddresses() const override {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
private:
|
private:
|
||||||
ValueCAN3(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
ValueCAN3(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||||
initialize<ValueCAN3Settings>(makeDriver);
|
initialize<ValueCAN3Settings>(makeDriver);
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,6 @@ protected:
|
||||||
std::optional<MemoryAddress> getCoreminiStartAddressSD() const override {
|
std::optional<MemoryAddress> getCoreminiStartAddressSD() const override {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool supportsGetAllMACAddresses() const override {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,10 +68,6 @@ protected:
|
||||||
bool supportsEraseMemory() const override {
|
bool supportsEraseMemory() const override {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool supportsGetAllMACAddresses() const override {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -343,52 +343,15 @@ icsneoc2_error_t icsneoc2_device_serial_get(const icsneoc2_device_t* device, cha
|
||||||
icsneoc2_error_t icsneoc2_device_pcb_serial_get(const icsneoc2_device_t* device, uint8_t* value, size_t* value_length);
|
icsneoc2_error_t icsneoc2_device_pcb_serial_get(const icsneoc2_device_t* device, uint8_t* value, size_t* value_length);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enumerate MAC addresses from a device.
|
* Get the MAC address of a device.
|
||||||
*
|
*
|
||||||
* @param[in] device The device to query.
|
* @param[in] device The device to get the MAC address of.
|
||||||
* @param[out] mac_entries Pointer to receive the head of the MAC addresses linked list.
|
|
||||||
*
|
|
||||||
* @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters on failure.
|
|
||||||
*/
|
|
||||||
icsneoc2_error_t icsneoc2_device_mac_addresses_enumerate(const icsneoc2_device_t* device, icsneoc2_mac_addr_entry_t** mac_entries);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the network ID of a MAC address.
|
|
||||||
*
|
|
||||||
* @param[in] mac_address The MAC address object to get the network ID of.
|
|
||||||
* @param[out] network_id Pointer to an icsneoc2_netid_t to copy the network ID into.
|
|
||||||
*
|
|
||||||
* @return icsneoc2_error_t icsneoc2_error success if successful, icsneoc2_error_invalid_parameters on failure.
|
|
||||||
*/
|
|
||||||
icsneoc2_error_t icsneoc2_mac_network_id_get(const icsneoc2_mac_addr_entry_t* mac_address, _icsneoc2_netid_t* network_id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the MAC Address bytes of a MAC address.
|
|
||||||
*
|
|
||||||
* @param[in] mac_address The MAC address object to get the MAC address bytes of.
|
|
||||||
* @param[out] value Pointer to a buffer to copy the MAC address into. If NULL, only value_length is written.
|
* @param[out] value Pointer to a buffer to copy the MAC address into. If NULL, only value_length is written.
|
||||||
|
* @param[in,out] value_length Size of the value buffer in bytes. Modified with the length of the MAC address.
|
||||||
*
|
*
|
||||||
* @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters on failure.
|
* @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_type if the device does not have a MAC address.
|
||||||
*/
|
*/
|
||||||
icsneoc2_error_t icsneoc2_mac_address_get(const icsneoc2_mac_addr_entry_t* mac_address, uint8_t* value, size_t* value_length);
|
icsneoc2_error_t icsneoc2_device_mac_address_get(const icsneoc2_device_t* device, uint8_t* value, size_t* value_length);
|
||||||
|
|
||||||
/**
|
|
||||||
* Advance to the next MAC address in an enumeration list.
|
|
||||||
*
|
|
||||||
* @param[in] mac_address The current MAC address node.
|
|
||||||
*
|
|
||||||
* @return icsneoc2_mac_addr_entry_t The next MAC address node.
|
|
||||||
*/
|
|
||||||
icsneoc2_mac_addr_entry_t* icsneoc2_mac_addresses_next(const icsneoc2_mac_addr_entry_t* mac_address);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Free all MAC addresses in enumeration handle returned by icsneoc2_device_mac_addresses_enumerate().
|
|
||||||
*
|
|
||||||
* @param[in] mac_address The head of the MAC address enumeration to free. May be NULL.
|
|
||||||
*
|
|
||||||
* @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise.
|
|
||||||
*/
|
|
||||||
icsneoc2_error_t icsneoc2_mac_addresses_free(icsneoc2_mac_addr_entry_t* mac_address);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the online state of a device.
|
* Set the online state of a device.
|
||||||
|
|
|
||||||
|
|
@ -583,8 +583,6 @@ typedef enum _icsneoc2_chip_id_t {
|
||||||
|
|
||||||
typedef uint8_t icsneoc2_chip_id_t;
|
typedef uint8_t icsneoc2_chip_id_t;
|
||||||
|
|
||||||
typedef struct icsneoc2_mac_addr_entry_t icsneoc2_mac_addr_entry_t;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -214,10 +214,7 @@ TEST(icsneoc2, test_icsneoc2_error_invalid_parameters_and_invalid_device)
|
||||||
ASSERT_EQ(icsneoc2_error_invalid_parameters, icsneoc2_device_rtc_set(NULL, 0));
|
ASSERT_EQ(icsneoc2_error_invalid_parameters, icsneoc2_device_rtc_set(NULL, 0));
|
||||||
ASSERT_EQ(icsneoc2_error_invalid_parameters, icsneoc2_device_serial_get(NULL, placeholderStr, &placeholderSizeT));
|
ASSERT_EQ(icsneoc2_error_invalid_parameters, icsneoc2_device_serial_get(NULL, placeholderStr, &placeholderSizeT));
|
||||||
ASSERT_EQ(icsneoc2_error_invalid_parameters, icsneoc2_device_pcb_serial_get(NULL, &placeholderInteger8, &placeholderSizeT));
|
ASSERT_EQ(icsneoc2_error_invalid_parameters, icsneoc2_device_pcb_serial_get(NULL, &placeholderInteger8, &placeholderSizeT));
|
||||||
ASSERT_EQ(icsneoc2_error_invalid_parameters, icsneoc2_device_mac_addresses_enumerate(NULL, NULL));
|
ASSERT_EQ(icsneoc2_error_invalid_parameters, icsneoc2_device_mac_address_get(NULL, &placeholderInteger8, &placeholderSizeT));
|
||||||
ASSERT_EQ(icsneoc2_error_invalid_parameters, icsneoc2_mac_network_id_get(NULL, NULL));
|
|
||||||
ASSERT_EQ(icsneoc2_error_invalid_parameters, icsneoc2_mac_address_get(NULL, &placeholderInteger8, &placeholderSizeT));
|
|
||||||
ASSERT_EQ(icsneoc2_error_invalid_parameters, icsneoc2_mac_addresses_free(NULL));
|
|
||||||
ASSERT_EQ(icsneoc2_error_invalid_parameters, icsneoc2_device_supports_tc10(NULL, &placeholderBool));
|
ASSERT_EQ(icsneoc2_error_invalid_parameters, icsneoc2_device_supports_tc10(NULL, &placeholderBool));
|
||||||
ASSERT_EQ(icsneoc2_error_invalid_parameters, icsneoc2_device_tc10_wake_request(NULL, icsneoc2_netid_dwcan_01));
|
ASSERT_EQ(icsneoc2_error_invalid_parameters, icsneoc2_device_tc10_wake_request(NULL, icsneoc2_netid_dwcan_01));
|
||||||
ASSERT_EQ(icsneoc2_error_invalid_parameters, icsneoc2_device_tc10_sleep_request(NULL, icsneoc2_netid_dwcan_01));
|
ASSERT_EQ(icsneoc2_error_invalid_parameters, icsneoc2_device_tc10_sleep_request(NULL, icsneoc2_netid_dwcan_01));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue