Merge remote-tracking branch 'github/master' into pcap

This commit is contained in:
Paul Hollinsky
2019-05-06 13:27:28 -04:00
13 changed files with 101 additions and 19 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ public:
Decoder(device_errorhandler_t err) : err(err) {}
bool decode(std::shared_ptr<Message>& result, const std::shared_ptr<Packet>& packet);
int timestampMultiplier = 25;
uint16_t timestampResolution = 25;
private:
device_errorhandler_t err;
+1
View File
@@ -29,6 +29,7 @@ public:
static uint32_t SerialStringToNum(const std::string& serial);
static bool SerialStringIsNumeric(const std::string& serial);
uint16_t getTimestampResolution() const;
DeviceType getType() const { return DeviceType(data.type); }
uint16_t getProductId() const { return productId; }
std::string getSerial() const { return data.serial; }
+1 -1
View File
@@ -99,7 +99,7 @@ protected:
virtual void setupDecoder(Decoder& decoder) override {
Device::setupDecoder(decoder);
decoder.timestampMultiplier = 10; // Timestamps are in 10ns increments instead of the usual 25ns
decoder.timestampResolution = 10; // Timestamps are in 10ns increments instead of the usual 25ns
}
virtual void setupSupportedRXNetworks(std::vector<Network>& rxNetworks) override {
+1 -1
View File
@@ -41,7 +41,7 @@ protected:
virtual void setupDecoder(Decoder& decoder) override {
Device::setupDecoder(decoder);
decoder.timestampMultiplier = 10; // Timestamps are in 10ns increments instead of the usual 25ns
decoder.timestampResolution = 10; // Timestamps are in 10ns increments instead of the usual 25ns
}
virtual void setupSupportedRXNetworks(std::vector<Network>& rxNetworks) override {
@@ -23,7 +23,7 @@ public:
protected:
virtual void setupDecoder(Decoder& decoder) override {
decoder.timestampMultiplier = 10; // Timestamps are in 10ns increments instead of the usual 25ns
decoder.timestampResolution = 10; // Timestamps are in 10ns increments instead of the usual 25ns
}
private:
+12
View File
@@ -398,6 +398,18 @@ typedef unsigned __int64 uint64_t;
#define NEOVI_RED_TIMESTAMP_2_10NS 429.4967296
#define NEOVI_RED_TIMESTAMP_1_10NS 0.000000010
#define HARDWARE_TIMESTAMP_ID_NONE (unsigned char)0
#define HARDWARE_TIMESTAMP_ID_VSI (unsigned char)1
#define HARDWARE_TIMESTAMP_ID_AVT_716 (unsigned char)2
#define HARDWARE_TIMESTAMP_ID_NI_CAN (unsigned char)3
#define HARDWARE_TIMESTAMP_ID_NEOVI (unsigned char)4
#define HARDWARE_TIMESTAMP_ID_AVT_717 (unsigned char)5
#define HARDWARE_TIMESTAMP_ID_NEOv6_VCAN (unsigned char)6
#define HARDWARE_TIMESTAMP_ID_DOUBLE_SEC (unsigned char)7
#define HARDWARE_TIMESTAMP_ID_NEORED_10US (unsigned char)8
#define HARDWARE_TIMESTAMP_ID_NEORED_25NS (unsigned char)9
#define HARDWARE_TIMESTAMP_ID_NEORED_10NS (unsigned char)10
typedef struct
{
uint32_t DeviceType;
+12
View File
@@ -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 timestamp resolution for the given device
* \param[out] device A pointer to the neodevice_t structure specifying the device to read out the timestamp for.
* \param[out] resolution A pointer to a uint16_t where the resolution will be stored. This value is in nanoseconds.
* \returns True if the resolution was written
*/
extern bool DLLExport icsneo_getTimestampResolution(const neodevice_t* device, uint16_t* resolution);
#ifdef __cplusplus
} // extern "C"
#endif