forked from gatsby/df_datalink
unified indentation
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* opaque structure
|
* @struct CircularQueueInst
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -41,59 +41,58 @@ typedef struct
|
|||||||
} CIRC_QUEUE;
|
} CIRC_QUEUE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* create a FIFO queue
|
* @brief create a FIFO queue
|
||||||
* @param queue The new queue
|
* @param queue The new queue
|
||||||
* @param queue_capacity maximum size of the queue
|
* @param queue_capacity maximum size of the queue
|
||||||
* @param a pool to allocate queue from
|
* @param a pool to allocate queue from
|
||||||
*/
|
*/
|
||||||
bool CircQueueCreate(CIRC_QUEUE **queue, uint32_t queue_capacity);
|
bool CircQueueCreate(CIRC_QUEUE **queue, uint32_t queue_capacity);
|
||||||
|
|
||||||
/** free queue memory -- call after destroy
|
/**
|
||||||
|
* @brief free queue memory -- call after destroy
|
||||||
* @note we do not free in destroy() to follow pthreads convention
|
* @note we do not free in destroy() to follow pthreads convention
|
||||||
*/
|
*/
|
||||||
void CircQueueFree(CIRC_QUEUE *queue);
|
void CircQueueFree(CIRC_QUEUE *queue);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Detects when the CIRC_QUEUE is full. This utility function is expected
|
* @brief Detects when the CIRC_QUEUE is full. This utility function is expected
|
||||||
* to be called from within critical sections, and is not threadsafe.
|
* to be called from within critical sections, and is not threadsafe.
|
||||||
*/
|
*/
|
||||||
bool isCircQueueFull(CIRC_QUEUE *queue);
|
bool isCircQueueFull(CIRC_QUEUE *queue);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Detects when the CIRC_QUEUE is empty. This utility function is expected
|
* @brief Detects when the CIRC_QUEUE is empty. This utility function is expected
|
||||||
* to be called from within critical sections, and is not threadsafe.
|
* to be called from within critical sections, and is not threadsafe.
|
||||||
*/
|
*/
|
||||||
bool isCircQueueEmpty(CIRC_QUEUE *queue);
|
bool isCircQueueEmpty(CIRC_QUEUE *queue);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* push/add an object to the queue, blocking if the queue is already full
|
* @brief push/add an object to the queue, blocking if the queue is already full
|
||||||
*
|
*
|
||||||
* @param queue the queue
|
* @param queue the queue
|
||||||
* @param data the data
|
* @param data the data
|
||||||
* @returns RPA_EINTR the blocking was interrupted (try again)
|
* @return RPA_EINTR the blocking was interrupted (try again)
|
||||||
* @returns RPA_EOF the queue has been terminated
|
* @return RPA_EOF the queue has been terminated
|
||||||
* @returns RPA_SUCCESS on a successful push
|
* @return RPA_SUCCESS on a successful push
|
||||||
*/
|
*/
|
||||||
bool CircQueuePush(CIRC_QUEUE *queue, void *data);
|
bool CircQueuePush(CIRC_QUEUE *queue, void *data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pop/get an object from the queue, blocking if the queue is already empty
|
* @brief pop/get an object from the queue, blocking if the queue is already empty
|
||||||
*
|
*
|
||||||
* @param queue the queue
|
* @param queue the queue
|
||||||
* @param data the data
|
* @param data the data
|
||||||
* @returns RPA_EINTR the blocking was interrupted (try again)
|
* @return RPA_EINTR the blocking was interrupted (try again)
|
||||||
* @returns RPA_EOF if the queue has been terminated
|
* @return RPA_EOF if the queue has been terminated
|
||||||
* @returns RPA_SUCCESS on a successful pop
|
* @return RPA_SUCCESS on a successful pop
|
||||||
*/
|
*/
|
||||||
bool CircQueuePop(CIRC_QUEUE *queue, void **data);
|
bool CircQueuePop(CIRC_QUEUE *queue, void **data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the size of the queue.
|
* @brief returns the size of the queue.
|
||||||
*
|
*
|
||||||
* @warning this is not threadsafe, and is intended for reporting/monitoring
|
|
||||||
* of the queue.
|
|
||||||
* @param queue the queue
|
* @param queue the queue
|
||||||
* @returns the size of the queue
|
* @return the size of the queue
|
||||||
*/
|
*/
|
||||||
uint32_t CircQueueSize(CIRC_QUEUE *queue);
|
uint32_t CircQueueSize(CIRC_QUEUE *queue);
|
||||||
|
|
||||||
|
|||||||
@@ -32,8 +32,9 @@ extern "C"
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* clist_t iterator direction.
|
* @enum cListDirection
|
||||||
|
* @brief clist_t iterator direction.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
@@ -42,8 +43,9 @@ extern "C"
|
|||||||
LIST_TAIL
|
LIST_TAIL
|
||||||
} clist_direction_t;
|
} clist_direction_t;
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* clist_t node struct.
|
* @struct cListNode
|
||||||
|
* @brief clist_t node struct.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct clist_node
|
typedef struct clist_node
|
||||||
@@ -53,8 +55,9 @@ extern "C"
|
|||||||
void *val;
|
void *val;
|
||||||
} clist_node_t;
|
} clist_node_t;
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* clist_t struct.
|
* @struct cListInst
|
||||||
|
* @brief clist_t struct.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@@ -66,8 +69,9 @@ extern "C"
|
|||||||
int8_t (*compare)(void *a, void *b);
|
int8_t (*compare)(void *a, void *b);
|
||||||
} clist_t;
|
} clist_t;
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* clist_t iterator struct.
|
* @struct cListIter
|
||||||
|
* @brief clist_t iterator struct.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|||||||
@@ -71,7 +71,6 @@
|
|||||||
|
|
||||||
// Pair by regex
|
// Pair by regex
|
||||||
// Regex: (([0-9]+, ){8})
|
// Regex: (([0-9]+, ){8})
|
||||||
|
|
||||||
const uint16_t hopPattern_2KBPS_20MS[L1_FRAME_2KBPS_20MS_HOPS] =
|
const uint16_t hopPattern_2KBPS_20MS[L1_FRAME_2KBPS_20MS_HOPS] =
|
||||||
{
|
{
|
||||||
1500
|
1500
|
||||||
@@ -97,12 +96,6 @@ const uint16_t hopPattern_10KBPS_10MS[L1_FRAME_10KBPS_10MS_HOPS] =
|
|||||||
1500
|
1500
|
||||||
};
|
};
|
||||||
|
|
||||||
// uint16_t hopPattern_10KBPS_20MS[L1_FRAME_10KBPS_20MS_HOPS] =
|
|
||||||
//{
|
|
||||||
// 1500, 1600, 1700, 1800, 1900, 1400, 1300, 1200,
|
|
||||||
// 1100, 1000, 900
|
|
||||||
// };
|
|
||||||
|
|
||||||
const uint16_t hopPattern_10KBPS_20MS[L1_FRAME_10KBPS_20MS_HOPS] =
|
const uint16_t hopPattern_10KBPS_20MS[L1_FRAME_10KBPS_20MS_HOPS] =
|
||||||
{
|
{
|
||||||
1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500,
|
1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500,
|
||||||
@@ -115,13 +108,6 @@ const uint16_t hopPattern_40KBPS_10MS[L1_FRAME_40KBPS_10MS_HOPS] =
|
|||||||
1500
|
1500
|
||||||
};
|
};
|
||||||
|
|
||||||
// uint16_t hopPattern_40KBPS_20MS[L1_FRAME_40KBPS_20MS_HOPS] =
|
|
||||||
//{
|
|
||||||
// 1600, 1650, 1700, 1750, 1800, 1850, 1900, 1550,
|
|
||||||
// 1500, 1450, 1400, 1350, 1300, 1250, 1200, 1150,
|
|
||||||
// 1100, 1050, 1000
|
|
||||||
// };
|
|
||||||
|
|
||||||
const uint16_t hopPattern_40KBPS_20MS[L1_FRAME_40KBPS_20MS_HOPS] =
|
const uint16_t hopPattern_40KBPS_20MS[L1_FRAME_40KBPS_20MS_HOPS] =
|
||||||
{
|
{
|
||||||
1700, 1800, 1900, 2000, 1700, 1700, 1700, 1700,
|
1700, 1800, 1900, 2000, 1700, 1700, 1700, 1700,
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ typedef struct __attribute__((packed))
|
|||||||
} SYSBUSLOG;
|
} SYSBUSLOG;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Linklayer_Log
|
* @struct Linklayer_Log
|
||||||
* @brief Linklayer Log struct holds the Linklayer log
|
* @brief Linklayer Log struct holds the Linklayer log
|
||||||
*/
|
*/
|
||||||
typedef struct __attribute__((packed))
|
typedef struct __attribute__((packed))
|
||||||
|
|||||||
Reference in New Issue
Block a user