mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
The icsneolegacy API finds devices correctly now
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
#ifndef __DEVICETYPE_H_
|
||||
#define __DEVICETYPE_H_
|
||||
|
||||
typedef uint32_t devicetype_t;
|
||||
|
||||
// Hold the length of the longest name, so that C applications can allocate memory accordingly
|
||||
// Currently the longest is "Intrepid Ethernet Evaluation Board"
|
||||
#define DEVICE_TYPE_LONGEST_NAME (35 + 1) // Add 1 so that if someone forgets, they still have space for null terminator
|
||||
|
||||
#ifndef __cplusplus
|
||||
#include <stdint.h>
|
||||
typedef uint32_t devicetype_t;
|
||||
#else
|
||||
#include <ostream>
|
||||
#include <cstdint>
|
||||
|
||||
typedef uint32_t devicetype_t;
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
class DeviceType {
|
||||
@@ -147,8 +148,8 @@ public:
|
||||
DeviceType(DeviceType::Enum netid) { value = netid; }
|
||||
DeviceType::Enum getDeviceType() const { return value; }
|
||||
std::string toString() const { return GetDeviceTypeString(getDeviceType()); }
|
||||
friend std::ostream& operator<<(std::ostream& os, const DeviceType& DeviceType) {
|
||||
os << DeviceType.toString();
|
||||
friend std::ostream& operator<<(std::ostream& os, const DeviceType& type) {
|
||||
os << type.toString().c_str();
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user