msLoggerCreate (Function) |
Top Previous Next |
This function will establish a logger that can be used to log motion sensor data into a user provided buffer. The detailed configuration of the established logger is done with the functions msLoggerAddAcc, msLoggerAddGyr and msLoggerAddMag. One can only have a maximum of 8 loggers at a time.
Data from a logger will always deliver a full set as the first set, and then depending on downsample values will deliver partial sets. With downsampling on the accelerometer at 1, gyroscope 2 and magnetomter 3, the data received will look like:
When switching loggers, the first set will be a full set again.
In case there is no sensor sets for a given time, the timestamp will not be included, thus there can not be two successive timestamps.
Input: Logger : SYSHANDLE A user provided handle to uniquely identify the logger. See SYSHANDLE page. This field is mandatory.
Buffer : PTR A pointer to the user provided buffer.
Size : DINT Size in bytes of the user provided buffer. The size of the buffer must be at least 400 bytes for a cyclical buffer and otherwise at least 4000 bytes.
StopOnFull : BOOL (default FALSE) If true, the buffer will stop collecting data when there is no more space for further data records in the buffer. Otherwise the buffer will function as a ring buffer.
Returns: INT
Declaration FUNCTION msLoggerCreate : INT; Example: // For a more complete example, see example under msReadEvent |