Hi all,
I'm not quite familiar with C language, so I doubt about the following codes
in Mate (TinyOS-VM) :
1: typedef struct {
2: int16_t var;
3: } MateValueVariable;
4:
5: typedef struct {
6: uint8_t type;
7: uint8_t size;
8: int16_t entries[MATE_BUF_LEN];
9: } MateDataBuffer;
10:
11: typedef struct {
12: MateDataBuffer* var;
13: } MateBufferVariable;
14:
15: typedef struct {
16: uint8_t type;
17: union {
18: MateValueVariable value;
19: MateBufferVariable buffer;
20: };
21: } MateStackVariable;
Line 1-3, compare to "typedef int16_t MateValueVariable", how difference is
it?
Line 11-13, why do we have to use this struct? why not just change line 9 to
MateBufferVariable and delete line 11-13?
Thanks in advance,
Supasate
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help