add quaternion to node info. enhance code cohesion.
This commit is contained in:
@@ -19,8 +19,9 @@
|
|||||||
|
|
||||||
/***************************** Include Files *********************************/
|
/***************************** Include Files *********************************/
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <inttypes.h>
|
#include <stdint.h>
|
||||||
#include "geometry/coord.h"
|
#include "geometry/coord.h"
|
||||||
|
#include "geometry/quaternion.h"
|
||||||
#include "../phy_ctrl/phy_ctrl.h"
|
#include "../phy_ctrl/phy_ctrl.h"
|
||||||
/************************** Constant Definitions *****************************/
|
/************************** Constant Definitions *****************************/
|
||||||
// Common node ID definition
|
// Common node ID definition
|
||||||
@@ -46,6 +47,7 @@
|
|||||||
#define L2_SLOTS_PER_SUBFRAME 20
|
#define L2_SLOTS_PER_SUBFRAME 20
|
||||||
|
|
||||||
#define L2_NUM_SLOTS_NONE UINT32_MAX
|
#define L2_NUM_SLOTS_NONE UINT32_MAX
|
||||||
|
#define L2_NUM_SLOTS_100MS 20
|
||||||
#define L2_NUM_SLOTS_20MS 4
|
#define L2_NUM_SLOTS_20MS 4
|
||||||
#define L2_NUM_SLOTS_10MS 2
|
#define L2_NUM_SLOTS_10MS 2
|
||||||
#define L2_NUM_SLOTS_5MS 1
|
#define L2_NUM_SLOTS_5MS 1
|
||||||
@@ -91,6 +93,9 @@ typedef enum
|
|||||||
L2_SEEK_STATE = 5
|
L2_SEEK_STATE = 5
|
||||||
} L2_NODE_STATE;
|
} L2_NODE_STATE;
|
||||||
|
|
||||||
|
/** @name Node information type definition
|
||||||
|
* The following types define the detail node info which needed by the link layer.
|
||||||
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint8_t nodeId;
|
uint8_t nodeId;
|
||||||
@@ -100,6 +105,7 @@ typedef struct
|
|||||||
uint8_t beamNo;
|
uint8_t beamNo;
|
||||||
COORD pos;
|
COORD pos;
|
||||||
COORD speed;
|
COORD speed;
|
||||||
|
QUATERNION attitude;
|
||||||
} L2_NODE_INFO;
|
} L2_NODE_INFO;
|
||||||
|
|
||||||
/** @name L2 event enum
|
/** @name L2 event enum
|
||||||
@@ -153,17 +159,6 @@ typedef enum
|
|||||||
L2_SLOT_INTRA_TSYNC = 13,
|
L2_SLOT_INTRA_TSYNC = 13,
|
||||||
} L2_SLOT_TYPE;
|
} L2_SLOT_TYPE;
|
||||||
|
|
||||||
/** @name Frame types
|
|
||||||
* A definition of different frame types.
|
|
||||||
*/
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
L2_CRC_NONE = 0,
|
|
||||||
L2_CRC16_1021 = 1,
|
|
||||||
L2_CRC16_8005 = 2,
|
|
||||||
L2_CRC8_31 = 3
|
|
||||||
} L2_CRC_TYPE;
|
|
||||||
|
|
||||||
/** @name Frame types
|
/** @name Frame types
|
||||||
* A definition of different frame types.
|
* A definition of different frame types.
|
||||||
*/
|
*/
|
||||||
@@ -184,6 +179,17 @@ typedef enum
|
|||||||
L2_INTRA_SVC_FRAME = 12
|
L2_INTRA_SVC_FRAME = 12
|
||||||
} L2_FRAME_TYPE;
|
} L2_FRAME_TYPE;
|
||||||
|
|
||||||
|
/** @name Frame types
|
||||||
|
* A definition of different frame types.
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
L2_CRC_NONE = 0,
|
||||||
|
L2_CRC16_1021 = 1,
|
||||||
|
L2_CRC16_8005 = 2,
|
||||||
|
L2_CRC8_31 = 3
|
||||||
|
} L2_CRC_TYPE;
|
||||||
|
|
||||||
/** @name Schedule subtable entry
|
/** @name Schedule subtable entry
|
||||||
* A definition of Schedule subtable entry.
|
* A definition of Schedule subtable entry.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user