ReadRecord()

ReadRecord()

Description

In order to use this function, library named <record_parser> must be included.

This function reads records from module internal memory records.

Syntax

ReadRecord(PARSE_RECORD, sensor_array[], arg);

Parameters

Variable

Input

Variable

Input

PARSE_RECORD

This is command and stays always the same - PARSE_RECORD

sensor_array[]

User defined array into which data is going to be stored. Recommended initial array size is 1000 elements.

arg

Array element number, from which to start to read

Returns

Return value

Return explanation

SCRIPT_OPERATION_SUCCESS

Success

SCRIPT_OPERATION_FAILED

Failed

SCRIPT_PARAM_INVALID

Passed array is too small.

Function call example

Example of reading record
#include <record_parser> new sensor_buffer[1000]; new tmp = 0; main() { for(;;) { if(ReadRecord(PARSE_RECORD, sensor_buffer, 0) != 0) // Check if ReadRecord is not empty and store records into internal array of `sensor_buffer` { GetSensor(sensor_buffer, Sensor_Course, tmp); // Get sensor data into variable named `tmp` from array named `sensor_buffer` } Delay(1000); } }

Notes and Warnings

This function uses lots of memory, include library only if you're going to use this function.

Used in Examples

Records guide