mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Merge remote-tracking branch 'drebbe-intrepid/master' into timestamp
This commit is contained in:
@@ -12,6 +12,7 @@ public:
|
||||
Network network;
|
||||
std::vector<uint8_t> data;
|
||||
uint64_t timestamp = 0;
|
||||
int timestampMultiplier = 0;
|
||||
uint16_t description = 0;
|
||||
bool transmitted = false;
|
||||
bool error = false;
|
||||
|
||||
@@ -108,7 +108,8 @@ typedef struct {
|
||||
uint8_t header[4];
|
||||
uint16_t netid;
|
||||
uint8_t type;
|
||||
uint8_t reserved[17];
|
||||
uint8_t reserved[15];
|
||||
uint16_t timestampMultiplier;
|
||||
} neomessage_t; // 72 bytes total
|
||||
// Any time you add another neomessage_*_t type, make sure to add it to the static_asserts below!
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ public:
|
||||
static uint32_t SerialStringToNum(const std::string& serial);
|
||||
static bool SerialStringIsNumeric(const std::string& serial);
|
||||
|
||||
int getTimestampMultiplier() const;
|
||||
DeviceType getType() const { return DeviceType(data.type); }
|
||||
uint16_t getProductId() const { return productId; }
|
||||
std::string getSerial() const { return data.serial; }
|
||||
|
||||
@@ -626,6 +626,18 @@ extern size_t DLLExport icsneo_getErrorLimit(void);
|
||||
*/
|
||||
extern bool DLLExport icsneo_getSupportedDevices(devicetype_t* devices, size_t* count);
|
||||
|
||||
/**
|
||||
* \brief Get the devices timestamp multiplier
|
||||
* \param[out] device A pointer to a buffer of devicetype_t structures which will be written to.
|
||||
* \param[inout] multiplier A pointer to an int, for legacy tick rate to ns
|
||||
|
||||
* \returns True unless device is invalid
|
||||
*/
|
||||
extern bool DLLExport icsneo_getTimestampMultiplier(const neodevice_t* device, int* multiplier);
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user