|
ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
|
Tests for protobuf sensor functions. More...
#include <libents/proto/sensor.h>#include <stdint.h>#include <stdio.h>#include <string.h>#include <unity.h>Go to the source code of this file.
Functions | |
| void | setUp (void) |
| Setup code that runs at the start of every test. | |
| void | tearDown (void) |
| Tear down code that runs at the end of every test. | |
| void | TestTranscodeSensorMeasurement (void) |
| Encodes then decodes single sensor measurement. | |
| void | TestTranscodeRepeatedSensorMeasurements (void) |
| Encodes then decodes repeated sensor measurements. | |
| void | TestRepeatedSensorMeasurementsOptimize (void) |
| void | TestEncodeUint32Measurement (void) |
| void | TestEncodeInt32Measurement (void) |
| void | TestEncodeDoubleMeasurement (void) |
| void | TestRepeatedSensorResponses (void) |
| void | TestCheckSensorResponse (void) |
| void | TestRepeatedSensorMeasurementsSize (void) |
| int | main (void) |
| Entry point for protobuf test. | |
Tests for protobuf sensor functions.
Copyright (c) 2026 jLab, UCSC
Definition in file main.c.
| int main | ( | void | ) |
Entry point for protobuf test.
| int |
Definition at line 353 of file main.c.
References TestCheckSensorResponse(), TestEncodeDoubleMeasurement(), TestEncodeInt32Measurement(), TestEncodeUint32Measurement(), TestRepeatedSensorMeasurementsOptimize(), TestRepeatedSensorMeasurementsSize(), TestRepeatedSensorResponses(), TestTranscodeRepeatedSensorMeasurements(), and TestTranscodeSensorMeasurement().
| void setUp | ( | void | ) |
| void tearDown | ( | void | ) |
| void TestCheckSensorResponse | ( | void | ) |
Definition at line 281 of file main.c.
References CheckSensorResponse(), SENSOR_FORMAT, SENSOR_OK, and SENSOR_REUPLOAD.
Referenced by main().
| void TestEncodeDoubleMeasurement | ( | void | ) |
| void TestEncodeInt32Measurement | ( | void | ) |
| void TestEncodeUint32Measurement | ( | void | ) |
| void TestRepeatedSensorMeasurementsOptimize | ( | void | ) |
Definition at line 131 of file main.c.
References buffer, DecodeRepeatedSensorMeasurements(), EncodeRepeatedSensorMeasurements(), i, and SENSOR_OK.
Referenced by main().
| void TestRepeatedSensorMeasurementsSize | ( | void | ) |
| void TestRepeatedSensorResponses | ( | void | ) |
Definition at line 244 of file main.c.
References buffer, DecodeRepeatedSensorReponses(), EncodeRepeatedSensorResponses(), and SENSOR_OK.
Referenced by main().
| void TestTranscodeRepeatedSensorMeasurements | ( | void | ) |
Encodes then decodes repeated sensor measurements.
Definition at line 76 of file main.c.
References buffer, DecodeRepeatedSensorMeasurements(), EncodeRepeatedSensorMeasurements(), i, and SENSOR_OK.
Referenced by main().
| void TestTranscodeSensorMeasurement | ( | void | ) |
Encodes then decodes single sensor measurement.
Definition at line 34 of file main.c.
References buffer, DecodeSensorMeasurement(), EncodeSensorMeasurement(), and SENSOR_OK.
Referenced by main().