Created
September 4, 2018 06:39
-
-
Save hsnks100/06c447c8e245f3dc879ed5b391c5e487 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct header1 { | |
| uint16_t a1; | |
| int16_t a2; | |
| int16_t a3; | |
| int16_t a4; | |
| int16_t a5; | |
| int16_t a6; | |
| int16_t a7; | |
| int16_t a8; | |
| int16_t a9; | |
| }; | |
| struct header2 { | |
| uint32_t length : 24; | |
| int16_t a2; | |
| int16_t a3; | |
| int16_t a4; | |
| int16_t a5; | |
| int16_t a6; | |
| int16_t a7; | |
| int16_t a8; | |
| int16_t a9; | |
| }; | |
| union protocol { | |
| header1 protocol1; | |
| header2 protocol2; | |
| } p; | |
| if(해더에 따라...) { | |
| p.protocol1 = (temp*)&read_msg_[0]; | |
| } | |
| else if(해더에 따라...) { | |
| p.protocol2 = (length3*)&read_msg_[0]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment