+ return call SubPacket.getPayload(msg, len + sizeof(timesync_footer_t));
+ }
+
+/*----------------- AMPacket -----------------*/
+
+ inline command am_addr_t AMPacket.address()
+ {
+ return call SubAMPacket.address();
+ }
+
+ inline command am_group_t AMPacket.localGroup()
+ {
+ return call SubAMPacket.localGroup();
+ }
+
+ inline command bool AMPacket.isForMe(message_t* msg)
+ {
+ return call SubAMPacket.isForMe(msg) && call SubAMPacket.type(msg) == TIMESYNC_AMTYPE;
+ }
+
+ inline command am_addr_t AMPacket.destination(message_t* msg)
+ {
+ return call SubAMPacket.destination(msg);
+ }
+
+ inline command void AMPacket.setDestination(message_t* msg, am_addr_t addr)
+ {
+ call SubAMPacket.setDestination(msg, addr);
+ }
+
+ inline command am_addr_t AMPacket.source(message_t* msg)
+ {
+ return call SubAMPacket.source(msg);
+ }
+
+ inline command void AMPacket.setSource(message_t* msg, am_addr_t addr)
+ {
+ call SubAMPacket.setSource(msg, addr);
+ }
+
+ inline command am_id_t AMPacket.type(message_t* msg)
+ {
+ return getFooter(msg)->type;
+ }
+
+ inline command void AMPacket.setType(message_t* msg, am_id_t type)
+ {
+ getFooter(msg)->type = type;
+ }
+
+ inline command am_group_t AMPacket.group(message_t* msg)
+ {
+ return call SubAMPacket.group(msg);
+ }
+
+ inline command void AMPacket.setGroup(message_t* msg, am_group_t grp)
+ {
+ call SubAMPacket.setGroup(msg, grp);