作者jeffy84123 (因為貼心所以是好人)
看板C_and_CPP
標題[問題] BCB與RS232傳輸的問題
時間Thu Sep 3 02:59:59 2009
我的SENSOR傳了struct到電腦的COM
typedef struct TOS_Msg{
uint16_t addr;
uint8_t type;
uint8_t group;
uint8_t length;
int8_t data[TOSH_DATA_LENGTH];
uint16_t crc;
uint16_t strength;
uint8_t ack;
uint16_t time;
uint8_t sendSecurityMode;
uint8_t receiveSecurityMode; } TOS_Ms
可是我是用BCB char陣列收
結果都無法完整收到資料
請問有什麼函式或方法可以收struct型態的資料呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.70.105.68
1F:推 LPH66:該不會有 alignment 問題吧....@_@ 09/03 03:16
2F:→ jeffy84123:alignment? 09/03 03:16