File: SerialPacketInfo.nc

package info (click to toggle)
tinyos 2.1.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 47,476 kB
  • ctags: 36,607
  • sloc: ansic: 63,646; cpp: 14,974; java: 10,358; python: 5,215; makefile: 1,724; sh: 902; asm: 597; xml: 392; perl: 74; awk: 46
file content (32 lines) | stat: -rw-r--r-- 1,192 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
 * Accessor methods used by a serial dispatcher to communicate with various
 * message_t link formats over a serial port.
 *
 * @author Philip Levis
 * @author Ben Greenstein
 * @date August 7 2005
 */

interface SerialPacketInfo {
  /**
   * Get the offset into a message_t where the header information begins.
   * @return Returns the offset.
   */
  async command uint8_t offset();
  /**
   * Get the size of the datalink packet embedded in the message_t, in bytes. 
   * This is the sum of the payload (upperLen) and the size of the link header.
   * @param msg A pointer to the message_t to interrogate. (unused)
   * @param upperLen The size of the payload.
   * @return Returns the size of the datalink packet.
   */
  async command uint8_t dataLinkLength(message_t* msg, uint8_t upperLen);
  /**
   * Get the size of the payload (in bytes) given the size of the datalink
   * packet (dataLinkLen) embedded in the message_t.
   * @param msg A pointer to the message_t to interrogate. (unused)
   * @param dataLinkLength The size of the datalink packet.
   * @return Returns the size of the payload.
   */
  async command uint8_t upperLength(message_t* msg, uint8_t dataLinkLen);
}