PNI SeaTRAX User Manual
Page 75
PNI Sensor Corporation
DOC#1018154 r02
SeaTRAX User Manual
Page 70
case CommProtocol::kTemperature:
{
// Move(source, destination, size (bytes)). Move copies the
// specified number of bytes from the source pointer to the
// destination pointer. Store the heading.
Move(&(data[pntr]), &temperature,
sizeof(temperature));
// increase the pointer to point to the next data element type
pntr += sizeof(temperature);
break;
}
default:
// Message is a function that displays a formatted string
// (similar to printf)
Message("Unknown type: %02X\r\n",
data[pntr - 1]);
// unknown data type, so size is unknown, so skip everything
return;
break;
}
count--;
// One less element to read in
}
// Message is a function that displays a formatted string
// (similar to printf)
Message("Heading: %f, Pitch: %f, Roll: %f,
Temperature: %f\r\n", heading, pitch, roll,
temperature);
mStep--;
// send next data request
break;
}
default:
{
// Message is a function that displays a formatted string
// (similar to printf)
Message("Unknown frame %02X received\r\n",
(UInt16)frameType);
break;
}
}
}
//
// Have the CommProtocol build and send the frame to the module.
//
void SEATRAX::SendComm(UInt8 frameType, void * dataPtr, UInt16
dataLen)