diff --git a/common/avbts_clock.hpp b/common/avbts_clock.hpp index 22a7246..b817a5a 100644 --- a/common/avbts_clock.hpp +++ b/common/avbts_clock.hpp @@ -78,7 +78,7 @@ struct ClockQuality { unsigned char clockAccuracy; /*!< Clock Accuracy - clause 8.6.2.3. Indicates the expected time accuracy of a clock master.*/ - int16_t offsetScaledLogVariance; /*!< ::Offset Scaled log variance - Clause 8.6.2.4. + uint16_t offsetScaledLogVariance; /*!< ::Offset Scaled log variance - Clause 8.6.2.4. Is the scaled, offset representation of an estimate of the PTP variance. The PTP variance characterizes the diff --git a/common/avbts_osipc.hpp b/common/avbts_osipc.hpp index 2adb3db..22e96c4 100644 --- a/common/avbts_osipc.hpp +++ b/common/avbts_osipc.hpp @@ -119,7 +119,7 @@ class OS_IPC { uint8_t clock_identity[], uint8_t priority1, uint8_t clock_class, - int16_t offset_scaled_log_variance, + uint16_t offset_scaled_log_variance, uint8_t clock_accuracy, uint8_t priority2, uint8_t domain_number, diff --git a/common/ipcdef.hpp b/common/ipcdef.hpp index 670aeee..1854fc4 100644 --- a/common/ipcdef.hpp +++ b/common/ipcdef.hpp @@ -82,7 +82,7 @@ typedef struct { uint8_t clock_identity[PTP_CLOCK_IDENTITY_LENGTH]; //!< The clock identity of the interface uint8_t priority1; //!< The priority1 field of the grandmaster functionality of the interface, or 0xFF if not supported uint8_t clock_class; //!< The clockClass field of the grandmaster functionality of the interface, or 0xFF if not supported - int16_t offset_scaled_log_variance; //!< The offsetScaledLogVariance field of the grandmaster functionality of the interface, or 0x0000 if not supported + uint16_t offset_scaled_log_variance; //!< The offsetScaledLogVariance field of the grandmaster functionality of the interface, or 0x0000 if not supported uint8_t clock_accuracy; //!< The clockAccuracy field of the grandmaster functionality of the interface, or 0xFF if not supported uint8_t priority2; //!< The priority2 field of the grandmaster functionality of the interface, or 0xFF if not supported uint8_t domain_number; //!< The domainNumber field of the grandmaster functionality of the interface, or 0 if not supported diff --git a/linux/shm_test/shm_test.cpp b/linux/shm_test/shm_test.cpp index dbe01c5..4348ea1 100644 --- a/linux/shm_test/shm_test.cpp +++ b/linux/shm_test/shm_test.cpp @@ -113,7 +113,7 @@ int main(int argc, char *argv[]) (unsigned int) ptpData->clock_identity[6], (unsigned int) ptpData->clock_identity[7]); fprintf(stdout, "priority1 %u\n", (unsigned int) ptpData->priority1); fprintf(stdout, "clock_class %u\n", (unsigned int) ptpData->clock_class); - fprintf(stdout, "offset_scaled_log_variance %d\n", (int) ptpData->offset_scaled_log_variance); + fprintf(stdout, "offset_scaled_log_variance %d\n", (unsigned int) ptpData->offset_scaled_log_variance); fprintf(stdout, "clock_accuracy %u\n", (unsigned int) ptpData->clock_accuracy); fprintf(stdout, "priority2 %u\n", (unsigned int) ptpData->priority2); fprintf(stdout, "domain_number %u\n", (unsigned int) ptpData->domain_number); diff --git a/linux/src/linux_hal_common.cpp b/linux/src/linux_hal_common.cpp index b651b88..cb3a13a 100644 --- a/linux/src/linux_hal_common.cpp +++ b/linux/src/linux_hal_common.cpp @@ -992,7 +992,7 @@ bool LinuxSharedMemoryIPC::update_network_interface( uint8_t clock_identity[], uint8_t priority1, uint8_t clock_class, - int16_t offset_scaled_log_variance, + uint16_t offset_scaled_log_variance, uint8_t clock_accuracy, uint8_t priority2, uint8_t domain_number, diff --git a/linux/src/linux_hal_common.hpp b/linux/src/linux_hal_common.hpp index d6aa651..14d20b2 100644 --- a/linux/src/linux_hal_common.hpp +++ b/linux/src/linux_hal_common.hpp @@ -706,7 +706,7 @@ class LinuxSharedMemoryIPC:public OS_IPC { uint8_t clock_identity[], uint8_t priority1, uint8_t clock_class, - int16_t offset_scaled_log_variance, + uint16_t offset_scaled_log_variance, uint8_t clock_accuracy, uint8_t priority2, uint8_t domain_number,