C2A_Core
tc_segment.h
[詳解]
1 
19 #ifndef TC_SEGMENT_H_
20 #define TC_SEGMENT_H_
21 
22 #include <stdint.h>
25 
26 #define TCS_HEADER_SIZE (1)
27 #define TCS_PACKET_MAX_LENGTH (TCS_HEADER_SIZE + CSP_MAX_LEN)
28 
33 typedef struct
34 {
35  uint8_t packet[TCS_PACKET_MAX_LENGTH];
36 } TcSegment;
37 
43 typedef enum
44 {
45  TCS_SEQ_FIRST = 1, // 01b: First Segment
46  TCS_SEQ_CONT = 0, // 00b: Continuing Segment
47  TCS_SEQ_LAST = 2, // 10b: Last Segment
48  TCS_SEQ_SINGLE = 3 // 11b: No Segmentation
50 
56 typedef enum
57 {
58  TCS_MAP_ID_DHU_HDC = 1, // 000001b: DHU Hard Decode Command Packet
59  TCS_MAP_ID_NORMAL = 2, // 000010b: Normal Command Packet
60  TCS_MAP_ID_LONG = 4, // 000100b: Long Command Packet
63 
70 
77 
84 
85 #endif
CCSDS で規定される Space Packet の コマンド版の実装
SpacePacketの パケット型に関するユーザー設定
C89 環境用 stdint.h
Space Packet (コマンド用)
TC Segment のパケット構造体
Definition: tc_segment.h:34
TCS_MAP_ID
Multiplexer Access Point ID
Definition: tc_segment.h:57
@ TCS_MAP_ID_DHU_HDC
Definition: tc_segment.h:58
@ TCS_MAP_ID_LONG
Definition: tc_segment.h:60
@ TCS_MAP_ID_UNKNOWN
Definition: tc_segment.h:61
@ TCS_MAP_ID_NORMAL
Definition: tc_segment.h:59
const CmdSpacePacket * TCS_get_command_space_packet(const TcSegment *tcs)
Command space packet 開始ポインタを取得
Definition: tc_segment.c:35
TCS_MAP_ID TCS_get_map_id(const TcSegment *tcs)
MAP ID を取得
Definition: tc_segment.c:16
TCS_SEQ_FLAG
Sequential Flag
Definition: tc_segment.h:44
@ TCS_SEQ_LAST
Definition: tc_segment.h:47
@ TCS_SEQ_FIRST
Definition: tc_segment.h:45
@ TCS_SEQ_CONT
Definition: tc_segment.h:46
@ TCS_SEQ_SINGLE
Definition: tc_segment.h:48
TCS_SEQ_FLAG TCS_get_seq_flag(const TcSegment *tcs)
sequence flag を取得
Definition: tc_segment.c:8
#define TCS_PACKET_MAX_LENGTH
Definition: tc_segment.h:27