[問題] BCB與RS232傳輸的問題

看板C_and_CPP (C/C++)作者 (因為貼心所以是好人)時間16年前 (2009/09/03 03:00), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/2 (看更多)
我的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

09/03 03:16, , 1F
該不會有 alignment 問題吧....@_@
09/03 03:16, 1F

09/03 03:16, , 2F
alignment?
09/03 03:16, 2F
文章代碼(AID): #1Adi2m7X (C_and_CPP)
討論串 (同標題文章)
文章代碼(AID): #1Adi2m7X (C_and_CPP)