Lines Matching full:message
19 /* Allocate space on the stack to store the message data. in encode_message()
26 SimpleMessage message = SimpleMessage_init_zero; in encode_message() local
32 message.lucky_number = 13; in encode_message()
34 message.buffer[i] = (uint8_t)(i * 2); in encode_message()
37 message.unlucky_number = 42; in encode_message()
40 /* Now we are ready to encode the message! */ in encode_message()
41 status = pb_encode(&stream, SimpleMessage_fields, &message); in encode_message()
55 /* Allocate space for the decoded message. */ in decode_message()
56 SimpleMessage message = SimpleMessage_init_zero; in decode_message() local
61 /* Now we are ready to decode the message. */ in decode_message()
62 status = pb_decode(&stream, SimpleMessage_fields, &message); in decode_message()
66 /* Print the data contained in the message. */ in decode_message()
67 printk("Your lucky number was %d!\n", (int)message.lucky_number); in decode_message()
70 printk("%s%d", ((i == 0) ? "" : ", "), (int) message.buffer[i]); in decode_message()
74 printk("Your unlucky number was %d!\n", (int)message.unlucky_number); in decode_message()
85 /* This is the buffer where we will store our message. */ in main()
89 /* Encode our message */ in main()
94 /* Now we could transmit the message over network, store it in a file or in main()