From 0206859f77c12ded5b28ecbe041aa11bdc4e0b5d Mon Sep 17 00:00:00 2001 From: Benjamin Reese Date: Mon, 29 Apr 2024 11:14:45 -0700 Subject: [PATCH 1/2] Run clang-format --- include/rogue/hardware/drivers/AxisDriver.h | 30 +- include/rogue/hardware/drivers/DmaDriver.h | 563 +++++++++--------- src/rogue/interfaces/ZmqClient.cpp | 27 +- src/rogue/interfaces/memory/Variable.cpp | 109 ++-- src/rogue/interfaces/stream/Slave.cpp | 2 +- .../protocols/packetizer/ControllerV2.cpp | 5 +- tests/api_test/src/api_test.cpp | 59 +- 7 files changed, 404 insertions(+), 391 deletions(-) diff --git a/include/rogue/hardware/drivers/AxisDriver.h b/include/rogue/hardware/drivers/AxisDriver.h index 104b98289..21107b3d5 100644 --- a/include/rogue/hardware/drivers/AxisDriver.h +++ b/include/rogue/hardware/drivers/AxisDriver.h @@ -25,8 +25,8 @@ #include "DmaDriver.h" // Command definitions -#define AXIS_Read_Ack 0x2001 // Command to acknowledge read -#define AXIS_Write_ReqMissed 0x2002 // Command to indicate a missed write request +#define AXIS_Read_Ack 0x2001 // Command to acknowledge read +#define AXIS_Write_ReqMissed 0x2002 // Command to indicate a missed write request // Only define the following if not compiling for kernel space #ifndef DMA_IN_KERNEL @@ -41,14 +41,14 @@ * @return The combined flags value. */ static inline uint32_t axisSetFlags(uint32_t fuser, uint32_t luser, uint32_t cont) { - uint32_t flags; + uint32_t flags; - // Set flags based on input parameters, ensuring each is in its correct position - flags = fuser & 0xFF; // First user-defined flag - flags |= (luser << 8) & 0xFF00; // Last user-defined flag - flags |= (cont << 16) & 0x10000; // Continuation flag + // Set flags based on input parameters, ensuring each is in its correct position + flags = fuser & 0xFF; // First user-defined flag + flags |= (luser << 8) & 0xFF00; // Last user-defined flag + flags |= (cont << 16) & 0x10000; // Continuation flag - return flags; + return flags; } /** @@ -59,7 +59,7 @@ static inline uint32_t axisSetFlags(uint32_t fuser, uint32_t luser, uint32_t con * @return The first user-defined flag. */ static inline uint32_t axisGetFuser(uint32_t flags) { - return flags & 0xFF; + return flags & 0xFF; } /** @@ -70,7 +70,7 @@ static inline uint32_t axisGetFuser(uint32_t flags) { * @return The last user-defined flag. */ static inline uint32_t axisGetLuser(uint32_t flags) { - return (flags >> 8) & 0xFF; + return (flags >> 8) & 0xFF; } /** @@ -81,7 +81,7 @@ static inline uint32_t axisGetLuser(uint32_t flags) { * @return The continuation flag. */ static inline uint32_t axisGetCont(uint32_t flags) { - return (flags >> 16) & 0x1; + return (flags >> 16) & 0x1; } /** @@ -90,7 +90,7 @@ static inline uint32_t axisGetCont(uint32_t flags) { * @param fd File descriptor for the AXIS device. */ static inline void axisReadAck(int32_t fd) { - ioctl(fd, AXIS_Read_Ack, 0); + ioctl(fd, AXIS_Read_Ack, 0); } /** @@ -99,8 +99,8 @@ static inline void axisReadAck(int32_t fd) { * @param fd File descriptor for the AXIS device. */ static inline void axisWriteReqMissed(int32_t fd) { - ioctl(fd, AXIS_Write_ReqMissed, 0); + ioctl(fd, AXIS_Write_ReqMissed, 0); } -#endif // !DMA_IN_KERNEL -#endif // __ASIS_DRIVER_H__ +#endif // !DMA_IN_KERNEL +#endif // __ASIS_DRIVER_H__ diff --git a/include/rogue/hardware/drivers/DmaDriver.h b/include/rogue/hardware/drivers/DmaDriver.h index d07214c92..accc3bb94 100644 --- a/include/rogue/hardware/drivers/DmaDriver.h +++ b/include/rogue/hardware/drivers/DmaDriver.h @@ -17,19 +17,19 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #ifndef __DMA_DRIVER_H__ #define __DMA_DRIVER_H__ #ifdef DMA_IN_KERNEL - #include +#include #else - #include +#include #endif /* API Version */ -#define DMA_VERSION 0x06 +#define DMA_VERSION 0x06 /* Error values */ #define DMA_ERR_FIFO 0x01 @@ -38,29 +38,29 @@ #define DMA_ERR_BUS 0x08 /* Commands */ -#define DMA_Get_Buff_Count 0x1001 -#define DMA_Get_Buff_Size 0x1002 -#define DMA_Set_Debug 0x1003 -#define DMA_Set_Mask 0x1004 -#define DMA_Ret_Index 0x1005 -#define DMA_Get_Index 0x1006 -#define DMA_Read_Ready 0x1007 -#define DMA_Set_MaskBytes 0x1008 -#define DMA_Get_Version 0x1009 -#define DMA_Write_Register 0x100A -#define DMA_Read_Register 0x100B -#define DMA_Get_RxBuff_Count 0x100C -#define DMA_Get_TxBuff_Count 0x100D -#define DMA_Get_TxBuffinUser_Count 0x100F -#define DMA_Get_TxBuffinHW_Count 0x1010 +#define DMA_Get_Buff_Count 0x1001 +#define DMA_Get_Buff_Size 0x1002 +#define DMA_Set_Debug 0x1003 +#define DMA_Set_Mask 0x1004 +#define DMA_Ret_Index 0x1005 +#define DMA_Get_Index 0x1006 +#define DMA_Read_Ready 0x1007 +#define DMA_Set_MaskBytes 0x1008 +#define DMA_Get_Version 0x1009 +#define DMA_Write_Register 0x100A +#define DMA_Read_Register 0x100B +#define DMA_Get_RxBuff_Count 0x100C +#define DMA_Get_TxBuff_Count 0x100D +#define DMA_Get_TxBuffinUser_Count 0x100F +#define DMA_Get_TxBuffinHW_Count 0x1010 #define DMA_Get_TxBuffinPreHWQ_Count 0x1011 -#define DMA_Get_TxBuffinSWQ_Count 0x1012 -#define DMA_Get_TxBuffMiss_Count 0x1013 -#define DMA_Get_RxBuffinUser_Count 0x1014 -#define DMA_Get_RxBuffinHW_Count 0x1015 +#define DMA_Get_TxBuffinSWQ_Count 0x1012 +#define DMA_Get_TxBuffMiss_Count 0x1013 +#define DMA_Get_RxBuffinUser_Count 0x1014 +#define DMA_Get_RxBuffinHW_Count 0x1015 #define DMA_Get_RxBuffinPreHWQ_Count 0x1016 -#define DMA_Get_RxBuffinSWQ_Count 0x1017 -#define DMA_Get_RxBuffMiss_Count 0x1018 +#define DMA_Get_RxBuffinSWQ_Count 0x1017 +#define DMA_Get_RxBuffMiss_Count 0x1018 /* Mask size */ #define DMA_MASK_SIZE 512 @@ -80,13 +80,13 @@ * control flags. */ struct DmaWriteData { - uint64_t data; - uint32_t dest; - uint32_t flags; - uint32_t index; - uint32_t size; - uint32_t is32; - uint32_t pad; + uint64_t data; + uint32_t dest; + uint32_t flags; + uint32_t index; + uint32_t size; + uint32_t is32; + uint32_t pad; }; /** @@ -105,14 +105,14 @@ struct DmaWriteData { * and various control flags. */ struct DmaReadData { - uint64_t data; - uint32_t dest; - uint32_t flags; - uint32_t index; - uint32_t error; - uint32_t size; - uint32_t is32; - int32_t ret; + uint64_t data; + uint32_t dest; + uint32_t flags; + uint32_t index; + uint32_t error; + uint32_t size; + uint32_t is32; + int32_t ret; }; /** @@ -124,22 +124,22 @@ struct DmaReadData { * within a DMA context. */ struct DmaRegisterData { - uint64_t address; - uint32_t data; + uint64_t address; + uint32_t data; }; // Conditional inclusion for non-kernel environments #ifndef DMA_IN_KERNEL +#include +#include #include #include -#include -#include -#include -#include +#include #include +#include #include -#include #include +#include /** * dmaWrite - Writes data to a DMA channel. @@ -156,17 +156,17 @@ struct DmaRegisterData { * * Return: Number of bytes written, or a negative error code on failure. */ -static inline ssize_t dmaWrite(int32_t fd, const void *buf, size_t size, uint32_t flags, uint32_t dest) { - struct DmaWriteData w; +static inline ssize_t dmaWrite(int32_t fd, const void* buf, size_t size, uint32_t flags, uint32_t dest) { + struct DmaWriteData w; - memset(&w, 0, sizeof(struct DmaWriteData)); - w.dest = dest; - w.flags = flags; - w.size = size; - w.is32 = (sizeof(void *) == 4); - w.data = (uint64_t)buf; + memset(&w, 0, sizeof(struct DmaWriteData)); + w.dest = dest; + w.flags = flags; + w.size = size; + w.is32 = (sizeof(void*) == 4); + w.data = (uint64_t)buf; - return(write(fd, &w, sizeof(struct DmaWriteData))); + return (write(fd, &w, sizeof(struct DmaWriteData))); } /** @@ -184,16 +184,16 @@ static inline ssize_t dmaWrite(int32_t fd, const void *buf, size_t size, uint32_ * Return: Number of bytes written, or a negative error code on failure. */ static inline ssize_t dmaWriteIndex(int32_t fd, uint32_t index, size_t size, uint32_t flags, uint32_t dest) { - struct DmaWriteData w; + struct DmaWriteData w; - memset(&w, 0, sizeof(struct DmaWriteData)); - w.dest = dest; - w.flags = flags; - w.size = size; - w.is32 = (sizeof(void *) == 4); - w.index = index; + memset(&w, 0, sizeof(struct DmaWriteData)); + w.dest = dest; + w.flags = flags; + w.size = size; + w.is32 = (sizeof(void*) == 4); + w.index = index; - return(write(fd, &w, sizeof(struct DmaWriteData))); + return (write(fd, &w, sizeof(struct DmaWriteData))); } /** @@ -214,32 +214,40 @@ static inline ssize_t dmaWriteIndex(int32_t fd, uint32_t index, size_t size, uin * * Return: Total number of bytes written, or a negative error code on failure. */ -static inline ssize_t dmaWriteVector(int32_t fd, struct iovec *iov, size_t iovlen, - uint32_t begFlags, uint32_t midFlags, uint32_t endFlags, uint32_t dest) { - uint32_t x; - ssize_t ret; - ssize_t res; - struct DmaWriteData w; - - ret = 0; - - for (x=0; x < iovlen; x++) { - memset(&w,0,sizeof(struct DmaWriteData)); - w.dest = dest; - w.flags = (x==0)?begFlags:((x==(iovlen-1))?endFlags:midFlags); - w.size = iov[x].iov_len; - w.is32 = (sizeof(void *)==4); - w.data = (uint64_t)iov[x].iov_base; - - do { - res = write(fd,&w,sizeof(struct DmaWriteData)); - - if ( res < 0 ) return(res); - else if ( res == 0 ) usleep(10); - else ret += res; - } while (res == 0); - } - return(ret); +static inline ssize_t dmaWriteVector(int32_t fd, + struct iovec* iov, + size_t iovlen, + uint32_t begFlags, + uint32_t midFlags, + uint32_t endFlags, + uint32_t dest) { + uint32_t x; + ssize_t ret; + ssize_t res; + struct DmaWriteData w; + + ret = 0; + + for (x = 0; x < iovlen; x++) { + memset(&w, 0, sizeof(struct DmaWriteData)); + w.dest = dest; + w.flags = (x == 0) ? begFlags : ((x == (iovlen - 1)) ? endFlags : midFlags); + w.size = iov[x].iov_len; + w.is32 = (sizeof(void*) == 4); + w.data = (uint64_t)iov[x].iov_base; + + do { + res = write(fd, &w, sizeof(struct DmaWriteData)); + + if (res < 0) + return (res); + else if (res == 0) + usleep(10); + else + ret += res; + } while (res == 0); + } + return (ret); } /** @@ -257,32 +265,40 @@ static inline ssize_t dmaWriteVector(int32_t fd, struct iovec *iov, size_t iovle * * Return: Total number of bytes written, or negative on failure. */ -static inline ssize_t dmaWriteIndexVector(int32_t fd, struct iovec *iov, size_t iovlen, - uint32_t begFlags, uint32_t midFlags, uint32_t endFlags, uint32_t dest) { - uint32_t x; - ssize_t ret; - ssize_t res; - struct DmaWriteData w; - - ret = 0; - - for (x = 0; x < iovlen; x++) { - memset(&w, 0, sizeof(struct DmaWriteData)); - w.dest = dest; - w.flags = (x == 0) ? begFlags : ((x == (iovlen - 1)) ? endFlags : midFlags); - w.size = iov[x].iov_len; - w.is32 = (sizeof(void *) == 4); - w.index = (uint32_t)(((uint64_t)iov[x].iov_base) & 0xFFFFFFFF); - - do { - res = write(fd, &w, sizeof(struct DmaWriteData)); - - if (res < 0) return(res); - else if (res == 0) usleep(10); - else ret += res; - } while (res == 0); - } - return(ret); +static inline ssize_t dmaWriteIndexVector(int32_t fd, + struct iovec* iov, + size_t iovlen, + uint32_t begFlags, + uint32_t midFlags, + uint32_t endFlags, + uint32_t dest) { + uint32_t x; + ssize_t ret; + ssize_t res; + struct DmaWriteData w; + + ret = 0; + + for (x = 0; x < iovlen; x++) { + memset(&w, 0, sizeof(struct DmaWriteData)); + w.dest = dest; + w.flags = (x == 0) ? begFlags : ((x == (iovlen - 1)) ? endFlags : midFlags); + w.size = iov[x].iov_len; + w.is32 = (sizeof(void*) == 4); + w.index = (uint32_t)(((uint64_t)iov[x].iov_base) & 0xFFFFFFFF); + + do { + res = write(fd, &w, sizeof(struct DmaWriteData)); + + if (res < 0) + return (res); + else if (res == 0) + usleep(10); + else + ret += res; + } while (res == 0); + } + return (ret); } /** @@ -298,24 +314,24 @@ static inline ssize_t dmaWriteIndexVector(int32_t fd, struct iovec *iov, size_t * * Return: Size of the data received, or negative on failure. */ -static inline ssize_t dmaRead(int32_t fd, void *buf, size_t maxSize, uint32_t *flags, uint32_t *error, uint32_t *dest) { - struct DmaReadData r; - ssize_t ret; +static inline ssize_t dmaRead(int32_t fd, void* buf, size_t maxSize, uint32_t* flags, uint32_t* error, uint32_t* dest) { + struct DmaReadData r; + ssize_t ret; - memset(&r, 0, sizeof(struct DmaReadData)); - r.size = maxSize; - r.is32 = (sizeof(void *) == 4); - r.data = (uint64_t)buf; + memset(&r, 0, sizeof(struct DmaReadData)); + r.size = maxSize; + r.is32 = (sizeof(void*) == 4); + r.data = (uint64_t)buf; - ret = read(fd, &r, sizeof(struct DmaReadData)); + ret = read(fd, &r, sizeof(struct DmaReadData)); - if (ret <= 0) return(ret); + if (ret <= 0) return (ret); - if (dest != NULL) *dest = r.dest; - if (flags != NULL) *flags = r.flags; - if (error != NULL) *error = r.error; + if (dest != NULL) *dest = r.dest; + if (flags != NULL) *flags = r.flags; + if (error != NULL) *error = r.error; - return(r.ret); + return (r.ret); } /** @@ -331,22 +347,22 @@ static inline ssize_t dmaRead(int32_t fd, void *buf, size_t maxSize, uint32_t *f * * Return: Size of the data received, or negative on failure. */ -static inline ssize_t dmaReadIndex(int32_t fd, uint32_t *index, uint32_t *flags, uint32_t *error, uint32_t *dest) { - struct DmaReadData r; - size_t ret; +static inline ssize_t dmaReadIndex(int32_t fd, uint32_t* index, uint32_t* flags, uint32_t* error, uint32_t* dest) { + struct DmaReadData r; + size_t ret; - memset(&r, 0, sizeof(struct DmaReadData)); + memset(&r, 0, sizeof(struct DmaReadData)); - ret = read(fd, &r, sizeof(struct DmaReadData)); + ret = read(fd, &r, sizeof(struct DmaReadData)); - if (ret <= 0) return(ret); + if (ret <= 0) return (ret); - if (dest != NULL) *dest = r.dest; - if (flags != NULL) *flags = r.flags; - if (error != NULL) *error = r.error; + if (dest != NULL) *dest = r.dest; + if (flags != NULL) *flags = r.flags; + if (error != NULL) *error = r.error; - *index = r.index; - return(r.ret); + *index = r.index; + return (r.ret); } /** @@ -365,25 +381,30 @@ static inline ssize_t dmaReadIndex(int32_t fd, uint32_t *index, uint32_t *flags, * * Returns: The number of bytes read. */ -static inline ssize_t dmaReadBulkIndex(int32_t fd, uint32_t count, int32_t *ret, uint32_t *index, - uint32_t *flags, uint32_t *error, uint32_t *dest) { - struct DmaReadData r[count]; - size_t res; - size_t x; - - memset(r, 0, count * sizeof(struct DmaReadData)); - - res = read(fd, r, count * sizeof(struct DmaReadData)); - - for (x = 0; x < res; ++x) { - if (dest != NULL) dest[x] = r[x].dest; - if (flags != NULL) flags[x] = r[x].flags; - if (error != NULL) error[x] = r[x].error; - - index[x] = r[x].index; - ret[x] = r[x].ret; - } - return(res); +static inline ssize_t dmaReadBulkIndex(int32_t fd, + uint32_t count, + int32_t* ret, + uint32_t* index, + uint32_t* flags, + uint32_t* error, + uint32_t* dest) { + struct DmaReadData r[count]; + size_t res; + size_t x; + + memset(r, 0, count * sizeof(struct DmaReadData)); + + res = read(fd, r, count * sizeof(struct DmaReadData)); + + for (x = 0; x < res; ++x) { + if (dest != NULL) dest[x] = r[x].dest; + if (flags != NULL) flags[x] = r[x].flags; + if (error != NULL) error[x] = r[x].error; + + index[x] = r[x].index; + ret[x] = r[x].ret; + } + return (res); } /** @@ -397,9 +418,9 @@ static inline ssize_t dmaReadBulkIndex(int32_t fd, uint32_t count, int32_t *ret, * Returns: Result of the IOCTL operation. */ static inline ssize_t dmaRetIndex(int32_t fd, uint32_t index) { - uint32_t cmd = DMA_Ret_Index | 0x10000; + uint32_t cmd = DMA_Ret_Index | 0x10000; - return(ioctl(fd, cmd, &index)); + return (ioctl(fd, cmd, &index)); } /** @@ -413,10 +434,10 @@ static inline ssize_t dmaRetIndex(int32_t fd, uint32_t index) { * * Returns: Result of the IOCTL operation. */ -static inline ssize_t dmaRetIndexes(int32_t fd, uint32_t count, uint32_t *indexes) { - uint32_t cmd = DMA_Ret_Index | ((count << 16) & 0xFFFF0000); +static inline ssize_t dmaRetIndexes(int32_t fd, uint32_t count, uint32_t* indexes) { + uint32_t cmd = DMA_Ret_Index | ((count << 16) & 0xFFFF0000); - return(ioctl(fd, cmd, indexes)); + return (ioctl(fd, cmd, indexes)); } /** @@ -428,7 +449,7 @@ static inline ssize_t dmaRetIndexes(int32_t fd, uint32_t count, uint32_t *indexe * Returns: The current write buffer index. */ static inline uint32_t dmaGetIndex(int32_t fd) { - return(ioctl(fd, DMA_Get_Index, 0)); + return (ioctl(fd, DMA_Get_Index, 0)); } /** @@ -440,7 +461,7 @@ static inline uint32_t dmaGetIndex(int32_t fd) { * Returns: Result of the IOCTL operation, indicating read readiness. */ static inline ssize_t dmaReadReady(int32_t fd) { - return(ioctl(fd, DMA_Read_Ready, 0)); + return (ioctl(fd, DMA_Read_Ready, 0)); } /** @@ -452,7 +473,7 @@ static inline ssize_t dmaReadReady(int32_t fd) { * Returns: The count of receive buffers. */ static inline ssize_t dmaGetRxBuffCount(int32_t fd) { - return(ioctl(fd, DMA_Get_RxBuff_Count, 0)); + return (ioctl(fd, DMA_Get_RxBuff_Count, 0)); } /** @@ -464,7 +485,7 @@ static inline ssize_t dmaGetRxBuffCount(int32_t fd) { * Returns: The count of transmit buffers. */ static inline ssize_t dmaGetTxBuffCount(int32_t fd) { - return(ioctl(fd, DMA_Get_TxBuff_Count, 0)); + return (ioctl(fd, DMA_Get_TxBuff_Count, 0)); } /** @@ -476,7 +497,7 @@ static inline ssize_t dmaGetTxBuffCount(int32_t fd) { * Returns: The size of DMA buffers. */ static inline ssize_t dmaGetBuffSize(int32_t fd) { - return(ioctl(fd, DMA_Get_Buff_Size, 0)); + return (ioctl(fd, DMA_Get_Buff_Size, 0)); } /** @@ -489,38 +510,38 @@ static inline ssize_t dmaGetBuffSize(int32_t fd) { * * Returns: Pointer to an array of pointers to the mapped buffers, or NULL on failure. */ -static inline void **dmaMapDma(int32_t fd, uint32_t *count, uint32_t *size) { - void *temp; - void **ret; - uint32_t bCount; - uint32_t gCount; - uint32_t bSize; - off_t offset; - - bSize = ioctl(fd, DMA_Get_Buff_Size, 0); - bCount = ioctl(fd, DMA_Get_Buff_Count, 0); - - if (count != NULL) *count = bCount; - if (size != NULL) *size = bSize; - - if ( (ret = (void **)malloc(sizeof(void *) * bCount)) == 0 ) return(NULL); - - // Attempt to map - gCount = 0; - while (gCount < bCount) { - offset = (off_t)bSize * (off_t)gCount; - - if ((temp = mmap(0, bSize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, offset)) == MAP_FAILED) break; - ret[gCount++] = temp; - } - - // Map failed - if (gCount != bCount) { - while (gCount != 0) munmap(ret[--gCount], bSize); - free(ret); - ret = NULL; - } - return(ret); +static inline void** dmaMapDma(int32_t fd, uint32_t* count, uint32_t* size) { + void* temp; + void** ret; + uint32_t bCount; + uint32_t gCount; + uint32_t bSize; + off_t offset; + + bSize = ioctl(fd, DMA_Get_Buff_Size, 0); + bCount = ioctl(fd, DMA_Get_Buff_Count, 0); + + if (count != NULL) *count = bCount; + if (size != NULL) *size = bSize; + + if ((ret = (void**)malloc(sizeof(void*) * bCount)) == 0) return (NULL); + + // Attempt to map + gCount = 0; + while (gCount < bCount) { + offset = (off_t)bSize * (off_t)gCount; + + if ((temp = mmap(0, bSize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, offset)) == MAP_FAILED) break; + ret[gCount++] = temp; + } + + // Map failed + if (gCount != bCount) { + while (gCount != 0) munmap(ret[--gCount], bSize); + free(ret); + ret = NULL; + } + return (ret); } /** @@ -532,18 +553,18 @@ static inline void **dmaMapDma(int32_t fd, uint32_t *count, uint32_t *size) { * * Returns: 0 on success. */ -static inline ssize_t dmaUnMapDma(int32_t fd, void **buffer) { - uint32_t bCount; - uint32_t bSize; - uint32_t x; +static inline ssize_t dmaUnMapDma(int32_t fd, void** buffer) { + uint32_t bCount; + uint32_t bSize; + uint32_t x; - bCount = ioctl(fd, DMA_Get_Buff_Count, 0); - bSize = ioctl(fd, DMA_Get_Buff_Size, 0); + bCount = ioctl(fd, DMA_Get_Buff_Count, 0); + bSize = ioctl(fd, DMA_Get_Buff_Size, 0); - for (x = 0; x < bCount; x++) munmap(buffer[x], bSize); + for (x = 0; x < bCount; x++) munmap(buffer[x], bSize); - free(buffer); - return(0); + free(buffer); + return (0); } /** @@ -557,7 +578,7 @@ static inline ssize_t dmaUnMapDma(int32_t fd, void **buffer) { * Return: Result from the IOCTL call. */ static inline ssize_t dmaSetDebug(int32_t fd, uint32_t level) { - return(ioctl(fd, DMA_Set_Debug, level)); + return (ioctl(fd, DMA_Set_Debug, level)); } /** @@ -570,17 +591,17 @@ static inline ssize_t dmaSetDebug(int32_t fd, uint32_t level) { * receive signals for asynchronous I/O. */ static inline void dmaAssignHandler(int32_t fd, void (*handler)(int32_t)) { - struct sigaction act; - int32_t oflags; + struct sigaction act; + int32_t oflags; - act.sa_handler = handler; - sigemptyset(&act.sa_mask); - act.sa_flags = 0; + act.sa_handler = handler; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; - sigaction(SIGIO, &act, NULL); - fcntl(fd, F_SETOWN, getpid()); - oflags = fcntl(fd, F_GETFL); - fcntl(fd, F_SETFL, oflags | FASYNC); + sigaction(SIGIO, &act, NULL); + fcntl(fd, F_SETOWN, getpid()); + oflags = fcntl(fd, F_GETFL); + fcntl(fd, F_SETFL, oflags | FASYNC); } /** @@ -593,7 +614,7 @@ static inline void dmaAssignHandler(int32_t fd, void (*handler)(int32_t)) { * Return: Result from the IOCTL call. */ static inline ssize_t dmaSetMask(int32_t fd, uint32_t mask) { - return(ioctl(fd, DMA_Set_Mask, mask)); + return (ioctl(fd, DMA_Set_Mask, mask)); } /** @@ -602,8 +623,8 @@ static inline ssize_t dmaSetMask(int32_t fd, uint32_t mask) { * * Initializes the DMA mask byte array to zeros. */ -static inline void dmaInitMaskBytes(uint8_t *mask) { - memset(mask, 0, DMA_MASK_SIZE); +static inline void dmaInitMaskBytes(uint8_t* mask) { + memset(mask, 0, DMA_MASK_SIZE); } /** @@ -614,15 +635,15 @@ static inline void dmaInitMaskBytes(uint8_t *mask) { * Adds a destination to the DMA mask byte array by setting the appropriate * bit based on the destination index. */ -static inline void dmaAddMaskBytes(uint8_t *mask, uint32_t dest) { - uint32_t byte; - uint32_t bit; - - if (dest < 8 * (DMA_MASK_SIZE)) { - byte = dest / 8; - bit = dest % 8; - mask[byte] += (1 << bit); - } +static inline void dmaAddMaskBytes(uint8_t* mask, uint32_t dest) { + uint32_t byte; + uint32_t bit; + + if (dest < 8 * (DMA_MASK_SIZE)) { + byte = dest / 8; + bit = dest % 8; + mask[byte] += (1 << bit); + } } /** @@ -634,8 +655,8 @@ static inline void dmaAddMaskBytes(uint8_t *mask, uint32_t dest) { * * Return: Result from the IOCTL call. */ -static inline ssize_t dmaSetMaskBytes(int32_t fd, uint8_t *mask) { - return(ioctl(fd, DMA_Set_MaskBytes, mask)); +static inline ssize_t dmaSetMaskBytes(int32_t fd, uint8_t* mask) { + return (ioctl(fd, DMA_Set_MaskBytes, mask)); } /** @@ -647,9 +668,9 @@ static inline ssize_t dmaSetMaskBytes(int32_t fd, uint8_t *mask) { * Return: 0 if the version matches, -1 otherwise. */ static inline ssize_t dmaCheckVersion(int32_t fd) { - int32_t version; - version = ioctl(fd, DMA_Get_Version); - return((version == DMA_VERSION) ? 0 : -1); + int32_t version; + version = ioctl(fd, DMA_Get_Version); + return ((version == DMA_VERSION) ? 0 : -1); } /** @@ -663,11 +684,11 @@ static inline ssize_t dmaCheckVersion(int32_t fd) { * Return: Result from the IOCTL call. */ static inline ssize_t dmaWriteRegister(int32_t fd, uint64_t address, uint32_t data) { - struct DmaRegisterData reg; + struct DmaRegisterData reg; - reg.address = address; - reg.data = data; - return(ioctl(fd, DMA_Write_Register, ®)); + reg.address = address; + reg.data = data; + return (ioctl(fd, DMA_Write_Register, ®)); } /** @@ -681,23 +702,21 @@ static inline ssize_t dmaWriteRegister(int32_t fd, uint64_t address, uint32_t da * * Return: The result of the ioctl operation, indicating success or failure. */ -static inline ssize_t dmaReadRegister(int32_t fd, uint64_t address, uint32_t *data) -{ - struct DmaRegisterData reg; - ssize_t res; +static inline ssize_t dmaReadRegister(int32_t fd, uint64_t address, uint32_t* data) { + struct DmaRegisterData reg; + ssize_t res; - // Initialize register data structure - reg.address = address; - reg.data = 0; + // Initialize register data structure + reg.address = address; + reg.data = 0; - // Perform ioctl to read the register - res = ioctl(fd, DMA_Read_Register, ®); + // Perform ioctl to read the register + res = ioctl(fd, DMA_Read_Register, ®); - // If data pointer is valid, update it with the read value - if (data != NULL) - *data = reg.data; + // If data pointer is valid, update it with the read value + if (data != NULL) *data = reg.data; - return res; + return res; } /** @@ -712,21 +731,20 @@ static inline ssize_t dmaReadRegister(int32_t fd, uint64_t address, uint32_t *da * * Return: A pointer to the mapped memory region in user space, or MAP_FAILED on failure. */ -static inline void *dmaMapRegister(int32_t fd, off_t offset, uint32_t size) -{ - uint32_t bSize; - uint32_t bCount; - off_t intOffset; +static inline void* dmaMapRegister(int32_t fd, off_t offset, uint32_t size) { + uint32_t bSize; + uint32_t bCount; + off_t intOffset; - // Obtain buffer size and count from the DMA device - bSize = ioctl(fd, DMA_Get_Buff_Size, 0); - bCount = ioctl(fd, DMA_Get_Buff_Count, 0); + // Obtain buffer size and count from the DMA device + bSize = ioctl(fd, DMA_Get_Buff_Size, 0); + bCount = ioctl(fd, DMA_Get_Buff_Count, 0); - // Calculate internal offset - intOffset = (bSize * bCount) + offset; + // Calculate internal offset + intOffset = (bSize * bCount) + offset; - // Attempt to map the memory region into user space - return mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, intOffset); + // Attempt to map the memory region into user space + return mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, intOffset); } /** @@ -740,12 +758,11 @@ static inline void *dmaMapRegister(int32_t fd, off_t offset, uint32_t size) * * Return: Always returns 0 indicating success. */ -static inline ssize_t dmaUnMapRegister(int32_t fd, void *ptr, uint32_t size) -{ - // Unmap the memory region - munmap(ptr, size); - return 0; +static inline ssize_t dmaUnMapRegister(int32_t fd, void* ptr, uint32_t size) { + // Unmap the memory region + munmap(ptr, size); + return 0; } -#endif // !DMA_IN_KERNEL -#endif // __DMA_DRIVER_H__ +#endif // !DMA_IN_KERNEL +#endif // __DMA_DRIVER_H__ diff --git a/src/rogue/interfaces/ZmqClient.cpp b/src/rogue/interfaces/ZmqClient.cpp index f496a760b..58e01fd65 100644 --- a/src/rogue/interfaces/ZmqClient.cpp +++ b/src/rogue/interfaces/ZmqClient.cpp @@ -183,19 +183,20 @@ std::string rogue::interfaces::ZmqClient::sendString(std::string path, std::stri rogue::GilRelease noGil; zmq_send(this->zmqReq_, snd.c_str(), snd.size(), 0); - while (1) { - zmq_msg_init(&msg); - if ( zmq_recvmsg(this->zmqReq_,&msg,0) <= 0 ) { - seconds += (float)timeout_ / 1000.0; - if ( waitRetry_ ) { - log_->error("Timeout waiting for response after %f Seconds, server may be busy! Waiting...", seconds); - zmq_msg_close(&msg); - } - else - throw rogue::GeneralError::create("ZmqClient::sendString","Timeout waiting for response after %f Seconds.",seconds); - } - else break; - } + while (1) { + zmq_msg_init(&msg); + if (zmq_recvmsg(this->zmqReq_, &msg, 0) <= 0) { + seconds += (float)timeout_ / 1000.0; + if (waitRetry_) { + log_->error("Timeout waiting for response after %f Seconds, server may be busy! Waiting...", seconds); + zmq_msg_close(&msg); + } else + throw rogue::GeneralError::create("ZmqClient::sendString", + "Timeout waiting for response after %f Seconds.", + seconds); + } else + break; + } if (seconds != 0) log_->error("Finally got response from server after %f seconds!", seconds); diff --git a/src/rogue/interfaces/memory/Variable.cpp b/src/rogue/interfaces/memory/Variable.cpp index 01934be9b..cfb92dc56 100644 --- a/src/rogue/interfaces/memory/Variable.cpp +++ b/src/rogue/interfaces/memory/Variable.cpp @@ -43,68 +43,65 @@ namespace bp = boost::python; #endif //! Class factory which returns a pointer to a Variable (VariablePtr) -rim::VariablePtr rim::Variable::create( - std::string name, - std::string mode, - double minimum, - double maximum, - uint64_t offset, - std::vector bitOffset, - std::vector bitSize, - bool overlapEn, - bool verify, - bool bulkOpEn, - bool updateNotify, - uint32_t modelId, - bool byteReverse, - bool bitReverse, - uint32_t binPoint, - uint32_t numValues, - uint32_t valueBits, - uint32_t valueStride, - uint32_t retryCount) { - rim::VariablePtr v = std::make_shared( - name, - mode, - minimum, - maximum, - offset, - bitOffset, - bitSize, - overlapEn, - verify, - bulkOpEn, - updateNotify, - modelId, - byteReverse, - bitReverse, - binPoint, - numValues, - valueBits, - valueStride, - retryCount); +rim::VariablePtr rim::Variable::create(std::string name, + std::string mode, + double minimum, + double maximum, + uint64_t offset, + std::vector bitOffset, + std::vector bitSize, + bool overlapEn, + bool verify, + bool bulkOpEn, + bool updateNotify, + uint32_t modelId, + bool byteReverse, + bool bitReverse, + uint32_t binPoint, + uint32_t numValues, + uint32_t valueBits, + uint32_t valueStride, + uint32_t retryCount) { + rim::VariablePtr v = std::make_shared(name, + mode, + minimum, + maximum, + offset, + bitOffset, + bitSize, + overlapEn, + verify, + bulkOpEn, + updateNotify, + modelId, + byteReverse, + bitReverse, + binPoint, + numValues, + valueBits, + valueStride, + retryCount); return (v); } // Setup class for use in python void rim::Variable::setup_python() { #ifndef NO_PYTHON - bp::class_( - "Variable", - bp::init()) + bp::class_("Variable", + bp::init()) .def("_varBytes", &rim::Variable::varBytes) .def("_offset", &rim::Variable::offset) .def("_shiftOffsetDown", &rim::Variable::shiftOffsetDown) diff --git a/src/rogue/interfaces/stream/Slave.cpp b/src/rogue/interfaces/stream/Slave.cpp index 3ba5107c7..1aee647b1 100644 --- a/src/rogue/interfaces/stream/Slave.cpp +++ b/src/rogue/interfaces/stream/Slave.cpp @@ -171,7 +171,7 @@ bool ris::Slave::ensureSingleBuffer(ris::FramePtr& frame, bool reqEn) { // Process a local frame request ris::FramePtr ris::Slave::reqLocalFrame(uint32_t size, bool zeroCopyEn) { - return ris::Pool::acceptReq(size,zeroCopyEn); + return ris::Pool::acceptReq(size, zeroCopyEn); } void ris::Slave::setup_python() { diff --git a/src/rogue/protocols/packetizer/ControllerV2.cpp b/src/rogue/protocols/packetizer/ControllerV2.cpp index 84b4019af..210f1882c 100644 --- a/src/rogue/protocols/packetizer/ControllerV2.cpp +++ b/src/rogue/protocols/packetizer/ControllerV2.cpp @@ -235,8 +235,7 @@ void rpp::ControllerV2::transportRx(ris::FramePtr frame) { tranFrame_[tmpDest]->setLastUser(tmpLuser); transSof_[tmpDest] = true; tranCount_[tmpDest] = 0; - if (app_[tmpDest]) { - app_[tmpDest]->pushFrame(tranFrame_[tmpDest]); } + if (app_[tmpDest]) { app_[tmpDest]->pushFrame(tranFrame_[tmpDest]); } tranFrame_[tmpDest].reset(); // Detect SSI error @@ -359,7 +358,7 @@ void rpp::ControllerV2::applicationRx(ris::FramePtr frame, uint8_t tDest) { fUser, tDest, segment, - data[7]>>7, + data[7] >> 7, lUser, data[size - 7], last); diff --git a/tests/api_test/src/api_test.cpp b/tests/api_test/src/api_test.cpp index 6cfbb78d6..0e1523c2a 100644 --- a/tests/api_test/src/api_test.cpp +++ b/tests/api_test/src/api_test.cpp @@ -9,7 +9,7 @@ * ---------------------------------------------------------------------------- **/ -#include +#include "rogue/interfaces/api/Bsp.h" void varListener(std::string path, std::string value) { printf("Var Listener: %s = %s\n", path.c_str(), value.c_str()); @@ -20,42 +20,41 @@ void varDone() { } int main(int argc, char** argv) { - try { + try { + rogue::interfaces::api::Bsp bsp("pyrogue.examples", "ExampleRoot"); + bsp.addVarListener(&varListener, &varDone); - rogue::interfaces::api::Bsp bsp("pyrogue.examples", "ExampleRoot"); - bsp.addVarListener(&varListener, &varDone); + // Get running uptime clock + printf("LocalTime = %s\n", bsp["LocalTime"].get().c_str()); - // Get running uptime clock - printf("LocalTime = %s\n", bsp["LocalTime"].get().c_str()); + // Set and get scratchpad + bsp["AxiVersion"]["ScratchPad"].setWrite("0x1111"); + printf("ScratchPad = %s\n", bsp["AxiVersion"]["ScratchPad"].readGet().c_str()); - // Set and get scratchpad - bsp["AxiVersion"]["ScratchPad"].setWrite("0x1111"); - printf("ScratchPad = %s\n", bsp["AxiVersion"]["ScratchPad"].readGet().c_str()); + // Get object as a pointer using full path, and get scratchpad + printf("ScratchPad = %s\n", bsp.getNode("ExampleRoot.AxiVersion.ScratchPad")->get().c_str()); - // Get object as a pointer using full path, and get scratchpad - printf("ScratchPad = %s\n", bsp.getNode("ExampleRoot.AxiVersion.ScratchPad")->get().c_str()); + // Get yaml config + std::string cfg = bsp["GetYamlConfig"]("True"); + printf("Config = %s\n", cfg.c_str()); - // Get yaml config - std::string cfg = bsp["GetYamlConfig"]("True"); - printf("Config = %s\n", cfg.c_str()); + // Set yaml config, example + // bsp["SetYamlConfig"]("Some Yaml String"); - // Set yaml config, example - // bsp["SetYamlConfig"]("Some Yaml String"); + // Write Entrire Tree + bsp["WriteAll"](); - // Write Entrire Tree - bsp["WriteAll"](); + // Read Entrire Tree + bsp["ReadAll"](); - // Read Entrire Tree - bsp["ReadAll"](); + Py_BEGIN_ALLOW_THREADS; + sleep(60); + Py_END_ALLOW_THREADS; - Py_BEGIN_ALLOW_THREADS; - sleep(60); - Py_END_ALLOW_THREADS; - - } catch (...) { - fprintf(stderr, "Found error running API example:\n"); - PyErr_Print(); - return -1; - } - return 0; + } catch (...) { + fprintf(stderr, "Found error running API example:\n"); + PyErr_Print(); + return -1; + } + return 0; } From 641820bdde1260cb7b6ea98055ee95714ca138b2 Mon Sep 17 00:00:00 2001 From: Benjamin Reese Date: Mon, 29 Apr 2024 11:15:48 -0700 Subject: [PATCH 2/2] Indent PP directives --- .clang-format | 1 + include/rogue/Directives.h | 2 +- include/rogue/GeneralError.h | 2 +- include/rogue/GilRelease.h | 2 +- include/rogue/ScopedGil.h | 2 +- include/rogue/hardware/drivers/DmaDriver.h | 24 ++--- include/rogue/interfaces/ZmqClient.h | 2 +- include/rogue/interfaces/ZmqServer.h | 2 +- include/rogue/interfaces/memory/Block.h | 2 +- include/rogue/interfaces/memory/Emulate.h | 2 +- include/rogue/interfaces/memory/Hub.h | 2 +- include/rogue/interfaces/memory/Master.h | 2 +- include/rogue/interfaces/memory/Slave.h | 2 +- include/rogue/interfaces/memory/Transaction.h | 2 +- include/rogue/interfaces/memory/Variable.h | 2 +- include/rogue/interfaces/stream/Frame.h | 2 +- include/rogue/interfaces/stream/Master.h | 2 +- include/rogue/interfaces/stream/Slave.h | 2 +- include/rogue/protocols/packetizer/CRC.h | 98 +++++++++---------- src/rogue/GeneralError.cpp | 2 +- src/rogue/GilRelease.cpp | 2 +- src/rogue/Logging.cpp | 6 +- src/rogue/Version.cpp | 2 +- src/rogue/hardware/MemMap.cpp | 2 +- src/rogue/hardware/axi/AxiMemMap.cpp | 2 +- src/rogue/hardware/axi/AxiStreamDma.cpp | 2 +- src/rogue/interfaces/ZmqClient.cpp | 2 +- src/rogue/interfaces/ZmqServer.cpp | 2 +- src/rogue/interfaces/memory/Block.cpp | 6 +- src/rogue/interfaces/memory/Emulate.cpp | 2 +- src/rogue/interfaces/memory/Hub.cpp | 2 +- src/rogue/interfaces/memory/Master.cpp | 2 +- src/rogue/interfaces/memory/Slave.cpp | 2 +- src/rogue/interfaces/memory/TcpClient.cpp | 2 +- src/rogue/interfaces/memory/TcpServer.cpp | 2 +- src/rogue/interfaces/memory/Transaction.cpp | 2 +- .../interfaces/memory/TransactionLock.cpp | 2 +- src/rogue/interfaces/memory/Variable.cpp | 2 +- src/rogue/interfaces/stream/Fifo.cpp | 2 +- src/rogue/interfaces/stream/Filter.cpp | 2 +- src/rogue/interfaces/stream/Frame.cpp | 6 +- src/rogue/interfaces/stream/FrameLock.cpp | 2 +- src/rogue/interfaces/stream/Master.cpp | 2 +- src/rogue/interfaces/stream/Pool.cpp | 2 +- src/rogue/interfaces/stream/RateDrop.cpp | 2 +- src/rogue/interfaces/stream/Slave.cpp | 2 +- src/rogue/interfaces/stream/TcpClient.cpp | 2 +- src/rogue/interfaces/stream/TcpCore.cpp | 2 +- src/rogue/interfaces/stream/TcpServer.cpp | 2 +- src/rogue/protocols/batcher/InverterV1.cpp | 2 +- src/rogue/protocols/batcher/SplitterV1.cpp | 2 +- .../protocols/packetizer/Application.cpp | 2 +- src/rogue/protocols/packetizer/Core.cpp | 2 +- src/rogue/protocols/packetizer/CoreV2.cpp | 2 +- src/rogue/protocols/packetizer/Transport.cpp | 2 +- src/rogue/protocols/rssi/Application.cpp | 2 +- src/rogue/protocols/rssi/Client.cpp | 2 +- src/rogue/protocols/rssi/Server.cpp | 2 +- src/rogue/protocols/rssi/Transport.cpp | 2 +- src/rogue/protocols/srp/Cmd.cpp | 2 +- src/rogue/protocols/srp/SrpV0.cpp | 2 +- src/rogue/protocols/srp/SrpV3.cpp | 2 +- src/rogue/protocols/udp/Client.cpp | 2 +- src/rogue/protocols/udp/Core.cpp | 2 +- src/rogue/protocols/udp/Server.cpp | 2 +- src/rogue/protocols/xilinx/JtagDriver.cpp | 2 +- src/rogue/protocols/xilinx/Xvc.cpp | 2 +- src/rogue/utilities/Prbs.cpp | 2 +- src/rogue/utilities/StreamUnZip.cpp | 2 +- src/rogue/utilities/StreamZip.cpp | 2 +- .../utilities/fileio/LegacyStreamReader.cpp | 2 +- .../utilities/fileio/LegacyStreamWriter.cpp | 2 +- src/rogue/utilities/fileio/StreamReader.cpp | 2 +- src/rogue/utilities/fileio/StreamWriter.cpp | 2 +- .../utilities/fileio/StreamWriterChannel.cpp | 2 +- 75 files changed, 140 insertions(+), 139 deletions(-) diff --git a/.clang-format b/.clang-format index 319be06cf..c7881cb4e 100644 --- a/.clang-format +++ b/.clang-format @@ -15,6 +15,7 @@ AlignConsecutiveAssignments: true AlignConsecutiveMacros: true AccessModifierOffset: -2 SortIncludes: true +IndentPPDirectives: BeforeHash IncludeBlocks: Regroup IncludeCategories: # Rogue Directives.h goes first diff --git a/include/rogue/Directives.h b/include/rogue/Directives.h index eba2e103f..f0c7218f8 100644 --- a/include/rogue/Directives.h +++ b/include/rogue/Directives.h @@ -27,7 +27,7 @@ #define CRCPP_USE_CPP11 #ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS + #define __STDC_FORMAT_MACROS #endif #endif diff --git a/include/rogue/GeneralError.h b/include/rogue/GeneralError.h index 1b05d3a5d..3a54dc259 100644 --- a/include/rogue/GeneralError.h +++ b/include/rogue/GeneralError.h @@ -28,7 +28,7 @@ #include #ifndef NO_PYTHON -#include + #include #endif namespace rogue { diff --git a/include/rogue/GilRelease.h b/include/rogue/GilRelease.h index 32148ada0..6892288dd 100644 --- a/include/rogue/GilRelease.h +++ b/include/rogue/GilRelease.h @@ -23,7 +23,7 @@ #include #ifndef NO_PYTHON -#include + #include #endif namespace rogue { diff --git a/include/rogue/ScopedGil.h b/include/rogue/ScopedGil.h index 373a659a1..bdc40525e 100644 --- a/include/rogue/ScopedGil.h +++ b/include/rogue/ScopedGil.h @@ -22,7 +22,7 @@ #include "rogue/Directives.h" #ifndef NO_PYTHON -#include + #include #endif namespace rogue { diff --git a/include/rogue/hardware/drivers/DmaDriver.h b/include/rogue/hardware/drivers/DmaDriver.h index accc3bb94..ebb560a38 100644 --- a/include/rogue/hardware/drivers/DmaDriver.h +++ b/include/rogue/hardware/drivers/DmaDriver.h @@ -23,9 +23,9 @@ #define __DMA_DRIVER_H__ #ifdef DMA_IN_KERNEL -#include + #include #else -#include + #include #endif /* API Version */ @@ -130,16 +130,16 @@ struct DmaRegisterData { // Conditional inclusion for non-kernel environments #ifndef DMA_IN_KERNEL -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include /** * dmaWrite - Writes data to a DMA channel. diff --git a/include/rogue/interfaces/ZmqClient.h b/include/rogue/interfaces/ZmqClient.h index 45c7c6356..46af6ca2c 100644 --- a/include/rogue/interfaces/ZmqClient.h +++ b/include/rogue/interfaces/ZmqClient.h @@ -24,7 +24,7 @@ #include "rogue/Logging.h" #ifndef NO_PYTHON -#include + #include #endif namespace rogue { diff --git a/include/rogue/interfaces/ZmqServer.h b/include/rogue/interfaces/ZmqServer.h index 8a4ef7168..75e68dbed 100644 --- a/include/rogue/interfaces/ZmqServer.h +++ b/include/rogue/interfaces/ZmqServer.h @@ -24,7 +24,7 @@ #include "rogue/Logging.h" #ifndef NO_PYTHON -#include + #include #endif namespace rogue { diff --git a/include/rogue/interfaces/memory/Block.h b/include/rogue/interfaces/memory/Block.h index 41cef7ad8..37b6b2ad4 100644 --- a/include/rogue/interfaces/memory/Block.h +++ b/include/rogue/interfaces/memory/Block.h @@ -29,7 +29,7 @@ #include "rogue/interfaces/memory/Master.h" #ifndef NO_PYTHON -#include + #include #endif namespace rogue { diff --git a/include/rogue/interfaces/memory/Emulate.h b/include/rogue/interfaces/memory/Emulate.h index 9448ddc80..716eed097 100644 --- a/include/rogue/interfaces/memory/Emulate.h +++ b/include/rogue/interfaces/memory/Emulate.h @@ -30,7 +30,7 @@ #include "rogue/interfaces/memory/Slave.h" #ifndef NO_PYTHON -#include + #include #endif #define MAP_TYPE std::map diff --git a/include/rogue/interfaces/memory/Hub.h b/include/rogue/interfaces/memory/Hub.h index 9f09b18a9..41ea84e51 100644 --- a/include/rogue/interfaces/memory/Hub.h +++ b/include/rogue/interfaces/memory/Hub.h @@ -33,7 +33,7 @@ #include "rogue/interfaces/memory/Slave.h" #ifndef NO_PYTHON -#include + #include #endif namespace rogue { diff --git a/include/rogue/interfaces/memory/Master.h b/include/rogue/interfaces/memory/Master.h index d2c8f0b61..98c8cbdaf 100644 --- a/include/rogue/interfaces/memory/Master.h +++ b/include/rogue/interfaces/memory/Master.h @@ -32,7 +32,7 @@ #include "rogue/Logging.h" #ifndef NO_PYTHON -#include + #include #endif namespace rogue { diff --git a/include/rogue/interfaces/memory/Slave.h b/include/rogue/interfaces/memory/Slave.h index 3ea573fab..7444904b1 100644 --- a/include/rogue/interfaces/memory/Slave.h +++ b/include/rogue/interfaces/memory/Slave.h @@ -32,7 +32,7 @@ #include "rogue/interfaces/memory/Transaction.h" #ifndef NO_PYTHON -#include + #include #endif namespace rogue { diff --git a/include/rogue/interfaces/memory/Transaction.h b/include/rogue/interfaces/memory/Transaction.h index 2f6908d09..fc641f067 100644 --- a/include/rogue/interfaces/memory/Transaction.h +++ b/include/rogue/interfaces/memory/Transaction.h @@ -33,7 +33,7 @@ #include "rogue/Logging.h" #ifndef NO_PYTHON -#include + #include #endif namespace rogue { diff --git a/include/rogue/interfaces/memory/Variable.h b/include/rogue/interfaces/memory/Variable.h index 349e5329c..74cee1d6b 100644 --- a/include/rogue/interfaces/memory/Variable.h +++ b/include/rogue/interfaces/memory/Variable.h @@ -31,7 +31,7 @@ #include "rogue/EnableSharedFromThis.h" #ifndef NO_PYTHON -#include + #include #endif namespace rogue { diff --git a/include/rogue/interfaces/stream/Frame.h b/include/rogue/interfaces/stream/Frame.h index 138206663..2291cfb01 100644 --- a/include/rogue/interfaces/stream/Frame.h +++ b/include/rogue/interfaces/stream/Frame.h @@ -33,7 +33,7 @@ #include "rogue/EnableSharedFromThis.h" #ifndef NO_PYTHON -#include + #include #endif namespace rogue { diff --git a/include/rogue/interfaces/stream/Master.h b/include/rogue/interfaces/stream/Master.h index 10ceb5c35..04e8226b3 100644 --- a/include/rogue/interfaces/stream/Master.h +++ b/include/rogue/interfaces/stream/Master.h @@ -34,7 +34,7 @@ #include "rogue/EnableSharedFromThis.h" #ifndef NO_PYTHON -#include + #include #endif namespace rogue { diff --git a/include/rogue/interfaces/stream/Slave.h b/include/rogue/interfaces/stream/Slave.h index 029d44b1e..35955348b 100644 --- a/include/rogue/interfaces/stream/Slave.h +++ b/include/rogue/interfaces/stream/Slave.h @@ -32,7 +32,7 @@ #include "rogue/interfaces/stream/Pool.h" #ifndef NO_PYTHON -#include + #include #endif namespace rogue { diff --git a/include/rogue/protocols/packetizer/CRC.h b/include/rogue/protocols/packetizer/CRC.h index 4bec680b7..de4cb73e0 100644 --- a/include/rogue/protocols/packetizer/CRC.h +++ b/include/rogue/protocols/packetizer/CRC.h @@ -60,71 +60,71 @@ #include // Includes CHAR_BIT #ifdef CRCPP_USE_CPP11 -#include // Includes ::std::size_t -#include // Includes ::std::uint8_t, ::std::uint16_t, ::std::uint32_t, ::std::uint64_t + #include // Includes ::std::size_t + #include // Includes ::std::uint8_t, ::std::uint16_t, ::std::uint32_t, ::std::uint64_t #else -#include // Includes size_t -#include // Includes uint8_t, uint16_t, uint32_t, uint64_t + #include // Includes size_t + #include // Includes uint8_t, uint16_t, uint32_t, uint64_t #endif #include // Includes ::std::numeric_limits #include // Includes ::std::move #ifndef crcpp_uint8 -#ifdef CRCPP_USE_CPP11 -/// @brief Unsigned 8-bit integer definition, used primarily for parameter definitions. -#define crcpp_uint8 ::std::uint8_t -#else -/// @brief Unsigned 8-bit integer definition, used primarily for parameter definitions. -#define crcpp_uint8 uint8_t -#endif + #ifdef CRCPP_USE_CPP11 + /// @brief Unsigned 8-bit integer definition, used primarily for parameter definitions. + #define crcpp_uint8 ::std::uint8_t + #else + /// @brief Unsigned 8-bit integer definition, used primarily for parameter definitions. + #define crcpp_uint8 uint8_t + #endif #endif #ifndef crcpp_uint16 -#ifdef CRCPP_USE_CPP11 -/// @brief Unsigned 16-bit integer definition, used primarily for parameter definitions. -#define crcpp_uint16 ::std::uint16_t -#else -/// @brief Unsigned 16-bit integer definition, used primarily for parameter definitions. -#define crcpp_uint16 uint16_t -#endif + #ifdef CRCPP_USE_CPP11 + /// @brief Unsigned 16-bit integer definition, used primarily for parameter definitions. + #define crcpp_uint16 ::std::uint16_t + #else + /// @brief Unsigned 16-bit integer definition, used primarily for parameter definitions. + #define crcpp_uint16 uint16_t + #endif #endif #ifndef crcpp_uint32 -#ifdef CRCPP_USE_CPP11 -/// @brief Unsigned 32-bit integer definition, used primarily for parameter definitions. -#define crcpp_uint32 ::std::uint32_t -#else -/// @brief Unsigned 32-bit integer definition, used primarily for parameter definitions. -#define crcpp_uint32 uint32_t -#endif + #ifdef CRCPP_USE_CPP11 + /// @brief Unsigned 32-bit integer definition, used primarily for parameter definitions. + #define crcpp_uint32 ::std::uint32_t + #else + /// @brief Unsigned 32-bit integer definition, used primarily for parameter definitions. + #define crcpp_uint32 uint32_t + #endif #endif #ifndef crcpp_uint64 -#ifdef CRCPP_USE_CPP11 -/// @brief Unsigned 64-bit integer definition, used primarily for parameter definitions. -#define crcpp_uint64 ::std::uint64_t -#else -/// @brief Unsigned 64-bit integer definition, used primarily for parameter definitions. -#define crcpp_uint64 uint64_t -#endif + #ifdef CRCPP_USE_CPP11 + /// @brief Unsigned 64-bit integer definition, used primarily for parameter definitions. + #define crcpp_uint64 ::std::uint64_t + #else + /// @brief Unsigned 64-bit integer definition, used primarily for parameter definitions. + #define crcpp_uint64 uint64_t + #endif #endif #ifndef crcpp_size -#ifdef CRCPP_USE_CPP11 -/// @brief Unsigned size definition, used for specifying data sizes. -#define crcpp_size ::std::size_t -#else -/// @brief Unsigned size definition, used for specifying data sizes. -#define crcpp_size size_t -#endif + #ifdef CRCPP_USE_CPP11 + /// @brief Unsigned size definition, used for specifying data sizes. + #define crcpp_size ::std::size_t + #else + /// @brief Unsigned size definition, used for specifying data sizes. + #define crcpp_size size_t + #endif #endif #ifdef CRCPP_USE_CPP11 -/// @brief Compile-time expression definition. -#define crcpp_constexpr constexpr + /// @brief Compile-time expression definition. + #define crcpp_constexpr constexpr #else -/// @brief Compile-time expression definition. -#define crcpp_constexpr const + /// @brief Compile-time expression definition. + #define crcpp_constexpr const #endif #ifdef CRCPP_USE_NAMESPACE @@ -722,15 +722,15 @@ inline CRCType CRC::CalculateRemainder(const void* data, if (lookupTable.GetParameters().reflectInput) { while (size--) { #if defined(WIN32) || defined(_WIN32) || defined(WINCE) - // Disable warning about data loss when doing (remainder >> CHAR_BIT) when - // remainder is one byte long. The algorithm is still correct in this case, - // though it's possible that one additional machine instruction will be executed. -#pragma warning(push) -#pragma warning(disable : 4333) + // Disable warning about data loss when doing (remainder >> CHAR_BIT) when + // remainder is one byte long. The algorithm is still correct in this case, + // though it's possible that one additional machine instruction will be executed. + #pragma warning(push) + #pragma warning(disable : 4333) #endif remainder = (remainder >> CHAR_BIT) ^ lookupTable[static_cast(remainder ^ *current++)]; #if defined(WIN32) || defined(_WIN32) || defined(WINCE) -#pragma warning(pop) + #pragma warning(pop) #endif } } else if (CRCWidth >= CHAR_BIT) { diff --git a/src/rogue/GeneralError.cpp b/src/rogue/GeneralError.cpp index 8c5c21299..3bc634287 100644 --- a/src/rogue/GeneralError.cpp +++ b/src/rogue/GeneralError.cpp @@ -24,7 +24,7 @@ #include #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; PyObject* rogue::generalErrorObj = 0; diff --git a/src/rogue/GilRelease.cpp b/src/rogue/GilRelease.cpp index 36dcce827..1d558b74d 100644 --- a/src/rogue/GilRelease.cpp +++ b/src/rogue/GilRelease.cpp @@ -24,7 +24,7 @@ #include #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/Logging.cpp b/src/rogue/Logging.cpp index cf824be02..5feac4d73 100644 --- a/src/rogue/Logging.cpp +++ b/src/rogue/Logging.cpp @@ -31,13 +31,13 @@ #include #if defined(__linux__) -#include + #include #elif defined(__APPLE__) && defined(__MACH__) -#include + #include #endif #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/Version.cpp b/src/rogue/Version.cpp index 24128c661..1f6cc82bb 100644 --- a/src/rogue/Version.cpp +++ b/src/rogue/Version.cpp @@ -32,7 +32,7 @@ #include "rogue/GilRelease.h" #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/hardware/MemMap.cpp b/src/rogue/hardware/MemMap.cpp index b39168c6a..9279b1056 100644 --- a/src/rogue/hardware/MemMap.cpp +++ b/src/rogue/hardware/MemMap.cpp @@ -40,7 +40,7 @@ namespace rh = rogue::hardware; namespace rim = rogue::interfaces::memory; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/hardware/axi/AxiMemMap.cpp b/src/rogue/hardware/axi/AxiMemMap.cpp index 213d93d57..7898d960c 100644 --- a/src/rogue/hardware/axi/AxiMemMap.cpp +++ b/src/rogue/hardware/axi/AxiMemMap.cpp @@ -41,7 +41,7 @@ namespace rha = rogue::hardware::axi; namespace rim = rogue::interfaces::memory; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/hardware/axi/AxiStreamDma.cpp b/src/rogue/hardware/axi/AxiStreamDma.cpp index 9f043264b..f8929d9a2 100644 --- a/src/rogue/hardware/axi/AxiStreamDma.cpp +++ b/src/rogue/hardware/axi/AxiStreamDma.cpp @@ -38,7 +38,7 @@ namespace rha = rogue::hardware::axi; namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/ZmqClient.cpp b/src/rogue/interfaces/ZmqClient.cpp index 58e01fd65..ba60f1a07 100644 --- a/src/rogue/interfaces/ZmqClient.cpp +++ b/src/rogue/interfaces/ZmqClient.cpp @@ -30,7 +30,7 @@ #include "rogue/ScopedGil.h" #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/ZmqServer.cpp b/src/rogue/interfaces/ZmqServer.cpp index eb5359189..9aa15d10c 100644 --- a/src/rogue/interfaces/ZmqServer.cpp +++ b/src/rogue/interfaces/ZmqServer.cpp @@ -30,7 +30,7 @@ #include "rogue/ScopedGil.h" #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/memory/Block.cpp b/src/rogue/interfaces/memory/Block.cpp index f717bf465..51a78c00d 100644 --- a/src/rogue/interfaces/memory/Block.cpp +++ b/src/rogue/interfaces/memory/Block.cpp @@ -42,10 +42,10 @@ namespace rim = rogue::interfaces::memory; #ifndef NO_PYTHON -#include -#include + #include + #include -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/memory/Emulate.cpp b/src/rogue/interfaces/memory/Emulate.cpp index e873d2304..181fbbd1e 100644 --- a/src/rogue/interfaces/memory/Emulate.cpp +++ b/src/rogue/interfaces/memory/Emulate.cpp @@ -35,7 +35,7 @@ namespace rim = rogue::interfaces::memory; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/memory/Hub.cpp b/src/rogue/interfaces/memory/Hub.cpp index 708d05ea8..ea4c51250 100644 --- a/src/rogue/interfaces/memory/Hub.cpp +++ b/src/rogue/interfaces/memory/Hub.cpp @@ -37,7 +37,7 @@ namespace rim = rogue::interfaces::memory; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/memory/Master.cpp b/src/rogue/interfaces/memory/Master.cpp index 33ef620f4..db1656152 100644 --- a/src/rogue/interfaces/memory/Master.cpp +++ b/src/rogue/interfaces/memory/Master.cpp @@ -38,7 +38,7 @@ namespace rim = rogue::interfaces::memory; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/memory/Slave.cpp b/src/rogue/interfaces/memory/Slave.cpp index 5754ae993..ca2e34327 100644 --- a/src/rogue/interfaces/memory/Slave.cpp +++ b/src/rogue/interfaces/memory/Slave.cpp @@ -31,7 +31,7 @@ #include "rogue/interfaces/memory/Transaction.h" #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/memory/TcpClient.cpp b/src/rogue/interfaces/memory/TcpClient.cpp index 682a3865d..64bdf4839 100644 --- a/src/rogue/interfaces/memory/TcpClient.cpp +++ b/src/rogue/interfaces/memory/TcpClient.cpp @@ -38,7 +38,7 @@ namespace rim = rogue::interfaces::memory; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/memory/TcpServer.cpp b/src/rogue/interfaces/memory/TcpServer.cpp index 8a96ed785..40547802d 100644 --- a/src/rogue/interfaces/memory/TcpServer.cpp +++ b/src/rogue/interfaces/memory/TcpServer.cpp @@ -36,7 +36,7 @@ namespace rim = rogue::interfaces::memory; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/memory/Transaction.cpp b/src/rogue/interfaces/memory/Transaction.cpp index 872964269..55218fdd2 100644 --- a/src/rogue/interfaces/memory/Transaction.cpp +++ b/src/rogue/interfaces/memory/Transaction.cpp @@ -39,7 +39,7 @@ namespace rim = rogue::interfaces::memory; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/memory/TransactionLock.cpp b/src/rogue/interfaces/memory/TransactionLock.cpp index 228ea2339..e7fd587d5 100644 --- a/src/rogue/interfaces/memory/TransactionLock.cpp +++ b/src/rogue/interfaces/memory/TransactionLock.cpp @@ -29,7 +29,7 @@ namespace rim = rogue::interfaces::memory; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/memory/Variable.cpp b/src/rogue/interfaces/memory/Variable.cpp index cfb92dc56..d6d8a0abf 100644 --- a/src/rogue/interfaces/memory/Variable.cpp +++ b/src/rogue/interfaces/memory/Variable.cpp @@ -38,7 +38,7 @@ namespace rim = rogue::interfaces::memory; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/stream/Fifo.cpp b/src/rogue/interfaces/stream/Fifo.cpp index 175163c01..b79502943 100644 --- a/src/rogue/interfaces/stream/Fifo.cpp +++ b/src/rogue/interfaces/stream/Fifo.cpp @@ -39,7 +39,7 @@ namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/stream/Filter.cpp b/src/rogue/interfaces/stream/Filter.cpp index e6b9dfebc..d40482989 100644 --- a/src/rogue/interfaces/stream/Filter.cpp +++ b/src/rogue/interfaces/stream/Filter.cpp @@ -35,7 +35,7 @@ namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/stream/Frame.cpp b/src/rogue/interfaces/stream/Frame.cpp index f0ca5e8a3..5770916a3 100644 --- a/src/rogue/interfaces/stream/Frame.cpp +++ b/src/rogue/interfaces/stream/Frame.cpp @@ -34,10 +34,10 @@ namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include -#include + #include + #include -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/stream/FrameLock.cpp b/src/rogue/interfaces/stream/FrameLock.cpp index 856bf790a..f103427c9 100644 --- a/src/rogue/interfaces/stream/FrameLock.cpp +++ b/src/rogue/interfaces/stream/FrameLock.cpp @@ -29,7 +29,7 @@ namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/stream/Master.cpp b/src/rogue/interfaces/stream/Master.cpp index 9d1482f25..554923750 100644 --- a/src/rogue/interfaces/stream/Master.cpp +++ b/src/rogue/interfaces/stream/Master.cpp @@ -34,7 +34,7 @@ namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/stream/Pool.cpp b/src/rogue/interfaces/stream/Pool.cpp index aaadae803..143f401d0 100644 --- a/src/rogue/interfaces/stream/Pool.cpp +++ b/src/rogue/interfaces/stream/Pool.cpp @@ -37,7 +37,7 @@ namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/stream/RateDrop.cpp b/src/rogue/interfaces/stream/RateDrop.cpp index 757047e96..d6f0dc7e8 100644 --- a/src/rogue/interfaces/stream/RateDrop.cpp +++ b/src/rogue/interfaces/stream/RateDrop.cpp @@ -35,7 +35,7 @@ namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/stream/Slave.cpp b/src/rogue/interfaces/stream/Slave.cpp index 1aee647b1..f484348a6 100644 --- a/src/rogue/interfaces/stream/Slave.cpp +++ b/src/rogue/interfaces/stream/Slave.cpp @@ -43,7 +43,7 @@ namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/stream/TcpClient.cpp b/src/rogue/interfaces/stream/TcpClient.cpp index d3459e6cc..0c8621f63 100644 --- a/src/rogue/interfaces/stream/TcpClient.cpp +++ b/src/rogue/interfaces/stream/TcpClient.cpp @@ -36,7 +36,7 @@ namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/stream/TcpCore.cpp b/src/rogue/interfaces/stream/TcpCore.cpp index 2a5d91b4a..181f5ca55 100644 --- a/src/rogue/interfaces/stream/TcpCore.cpp +++ b/src/rogue/interfaces/stream/TcpCore.cpp @@ -38,7 +38,7 @@ namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/interfaces/stream/TcpServer.cpp b/src/rogue/interfaces/stream/TcpServer.cpp index f2e86ee44..466cbe437 100644 --- a/src/rogue/interfaces/stream/TcpServer.cpp +++ b/src/rogue/interfaces/stream/TcpServer.cpp @@ -36,7 +36,7 @@ namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/batcher/InverterV1.cpp b/src/rogue/protocols/batcher/InverterV1.cpp index 6e53d8ea9..995a13908 100644 --- a/src/rogue/protocols/batcher/InverterV1.cpp +++ b/src/rogue/protocols/batcher/InverterV1.cpp @@ -39,7 +39,7 @@ namespace rpb = rogue::protocols::batcher; namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/batcher/SplitterV1.cpp b/src/rogue/protocols/batcher/SplitterV1.cpp index 096f6f268..625289af7 100644 --- a/src/rogue/protocols/batcher/SplitterV1.cpp +++ b/src/rogue/protocols/batcher/SplitterV1.cpp @@ -39,7 +39,7 @@ namespace rpb = rogue::protocols::batcher; namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/packetizer/Application.cpp b/src/rogue/protocols/packetizer/Application.cpp index 02cc49631..c76b7ae39 100644 --- a/src/rogue/protocols/packetizer/Application.cpp +++ b/src/rogue/protocols/packetizer/Application.cpp @@ -35,7 +35,7 @@ namespace rpp = rogue::protocols::packetizer; namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/packetizer/Core.cpp b/src/rogue/protocols/packetizer/Core.cpp index c2c87b9e3..53a1d3fbf 100644 --- a/src/rogue/protocols/packetizer/Core.cpp +++ b/src/rogue/protocols/packetizer/Core.cpp @@ -34,7 +34,7 @@ namespace rpp = rogue::protocols::packetizer; namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/packetizer/CoreV2.cpp b/src/rogue/protocols/packetizer/CoreV2.cpp index f44daf56f..7aab1fd89 100644 --- a/src/rogue/protocols/packetizer/CoreV2.cpp +++ b/src/rogue/protocols/packetizer/CoreV2.cpp @@ -33,7 +33,7 @@ namespace rpp = rogue::protocols::packetizer; namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/packetizer/Transport.cpp b/src/rogue/protocols/packetizer/Transport.cpp index 311bf71cb..76fdcc2ff 100644 --- a/src/rogue/protocols/packetizer/Transport.cpp +++ b/src/rogue/protocols/packetizer/Transport.cpp @@ -35,7 +35,7 @@ namespace rpp = rogue::protocols::packetizer; namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/rssi/Application.cpp b/src/rogue/protocols/rssi/Application.cpp index a2970f5a0..c9b798aca 100644 --- a/src/rogue/protocols/rssi/Application.cpp +++ b/src/rogue/protocols/rssi/Application.cpp @@ -35,7 +35,7 @@ namespace rpr = rogue::protocols::rssi; namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/rssi/Client.cpp b/src/rogue/protocols/rssi/Client.cpp index 822baf670..65bfdfb70 100644 --- a/src/rogue/protocols/rssi/Client.cpp +++ b/src/rogue/protocols/rssi/Client.cpp @@ -34,7 +34,7 @@ namespace rpr = rogue::protocols::rssi; namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/rssi/Server.cpp b/src/rogue/protocols/rssi/Server.cpp index 423006a1b..7f3dfa25a 100644 --- a/src/rogue/protocols/rssi/Server.cpp +++ b/src/rogue/protocols/rssi/Server.cpp @@ -30,7 +30,7 @@ namespace rpr = rogue::protocols::rssi; namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/rssi/Transport.cpp b/src/rogue/protocols/rssi/Transport.cpp index bdf5d4c57..7fbc7083b 100644 --- a/src/rogue/protocols/rssi/Transport.cpp +++ b/src/rogue/protocols/rssi/Transport.cpp @@ -35,7 +35,7 @@ namespace rpr = rogue::protocols::rssi; namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/srp/Cmd.cpp b/src/rogue/protocols/srp/Cmd.cpp index 08ca8ce2d..6eae0707e 100644 --- a/src/rogue/protocols/srp/Cmd.cpp +++ b/src/rogue/protocols/srp/Cmd.cpp @@ -36,7 +36,7 @@ namespace rps = rogue::protocols::srp; namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/srp/SrpV0.cpp b/src/rogue/protocols/srp/SrpV0.cpp index 037d19d9a..ff13a27ae 100644 --- a/src/rogue/protocols/srp/SrpV0.cpp +++ b/src/rogue/protocols/srp/SrpV0.cpp @@ -47,7 +47,7 @@ namespace rim = rogue::interfaces::memory; namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/srp/SrpV3.cpp b/src/rogue/protocols/srp/SrpV3.cpp index aba1cd15d..3496ad9f7 100644 --- a/src/rogue/protocols/srp/SrpV3.cpp +++ b/src/rogue/protocols/srp/SrpV3.cpp @@ -47,7 +47,7 @@ namespace rim = rogue::interfaces::memory; namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/udp/Client.cpp b/src/rogue/protocols/udp/Client.cpp index 579079d8a..3fc436e1c 100644 --- a/src/rogue/protocols/udp/Client.cpp +++ b/src/rogue/protocols/udp/Client.cpp @@ -41,7 +41,7 @@ namespace rpu = rogue::protocols::udp; namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/udp/Core.cpp b/src/rogue/protocols/udp/Core.cpp index fb2395382..260dd3e57 100644 --- a/src/rogue/protocols/udp/Core.cpp +++ b/src/rogue/protocols/udp/Core.cpp @@ -31,7 +31,7 @@ namespace rpu = rogue::protocols::udp; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/udp/Server.cpp b/src/rogue/protocols/udp/Server.cpp index 03fec128a..d27e38fce 100644 --- a/src/rogue/protocols/udp/Server.cpp +++ b/src/rogue/protocols/udp/Server.cpp @@ -41,7 +41,7 @@ namespace rpu = rogue::protocols::udp; namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/xilinx/JtagDriver.cpp b/src/rogue/protocols/xilinx/JtagDriver.cpp index 5db8816e2..c44bec19e 100644 --- a/src/rogue/protocols/xilinx/JtagDriver.cpp +++ b/src/rogue/protocols/xilinx/JtagDriver.cpp @@ -30,7 +30,7 @@ namespace rpx = rogue::protocols::xilinx; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/protocols/xilinx/Xvc.cpp b/src/rogue/protocols/xilinx/Xvc.cpp index 35259cf5b..3dc08e2ae 100644 --- a/src/rogue/protocols/xilinx/Xvc.cpp +++ b/src/rogue/protocols/xilinx/Xvc.cpp @@ -41,7 +41,7 @@ namespace rpx = rogue::protocols::xilinx; namespace ris = rogue::interfaces::stream; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/utilities/Prbs.cpp b/src/rogue/utilities/Prbs.cpp index ed25b97e7..67acdd9da 100644 --- a/src/rogue/utilities/Prbs.cpp +++ b/src/rogue/utilities/Prbs.cpp @@ -45,7 +45,7 @@ namespace ris = rogue::interfaces::stream; namespace ru = rogue::utilities; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/utilities/StreamUnZip.cpp b/src/rogue/utilities/StreamUnZip.cpp index f8afb7715..ac7416b81 100644 --- a/src/rogue/utilities/StreamUnZip.cpp +++ b/src/rogue/utilities/StreamUnZip.cpp @@ -39,7 +39,7 @@ namespace ris = rogue::interfaces::stream; namespace ru = rogue::utilities; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/utilities/StreamZip.cpp b/src/rogue/utilities/StreamZip.cpp index f81509178..6d17a8df9 100644 --- a/src/rogue/utilities/StreamZip.cpp +++ b/src/rogue/utilities/StreamZip.cpp @@ -39,7 +39,7 @@ namespace ris = rogue::interfaces::stream; namespace ru = rogue::utilities; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/utilities/fileio/LegacyStreamReader.cpp b/src/rogue/utilities/fileio/LegacyStreamReader.cpp index 62c163105..891c9f9ae 100644 --- a/src/rogue/utilities/fileio/LegacyStreamReader.cpp +++ b/src/rogue/utilities/fileio/LegacyStreamReader.cpp @@ -41,7 +41,7 @@ namespace ris = rogue::interfaces::stream; namespace ruf = rogue::utilities::fileio; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/utilities/fileio/LegacyStreamWriter.cpp b/src/rogue/utilities/fileio/LegacyStreamWriter.cpp index 059043d92..144bb2a47 100644 --- a/src/rogue/utilities/fileio/LegacyStreamWriter.cpp +++ b/src/rogue/utilities/fileio/LegacyStreamWriter.cpp @@ -55,7 +55,7 @@ namespace ris = rogue::interfaces::stream; namespace ruf = rogue::utilities::fileio; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/utilities/fileio/StreamReader.cpp b/src/rogue/utilities/fileio/StreamReader.cpp index c612992e6..cf7eeef1a 100644 --- a/src/rogue/utilities/fileio/StreamReader.cpp +++ b/src/rogue/utilities/fileio/StreamReader.cpp @@ -42,7 +42,7 @@ namespace ris = rogue::interfaces::stream; namespace ruf = rogue::utilities::fileio; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/utilities/fileio/StreamWriter.cpp b/src/rogue/utilities/fileio/StreamWriter.cpp index 955a73596..b4394143f 100644 --- a/src/rogue/utilities/fileio/StreamWriter.cpp +++ b/src/rogue/utilities/fileio/StreamWriter.cpp @@ -58,7 +58,7 @@ namespace ris = rogue::interfaces::stream; namespace ruf = rogue::utilities::fileio; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif diff --git a/src/rogue/utilities/fileio/StreamWriterChannel.cpp b/src/rogue/utilities/fileio/StreamWriterChannel.cpp index dcc7e3019..a6235bad9 100644 --- a/src/rogue/utilities/fileio/StreamWriterChannel.cpp +++ b/src/rogue/utilities/fileio/StreamWriterChannel.cpp @@ -40,7 +40,7 @@ namespace ris = rogue::interfaces::stream; namespace ruf = rogue::utilities::fileio; #ifndef NO_PYTHON -#include + #include namespace bp = boost::python; #endif