This file contains the highlevel interface prototypes to the low-level Protocol. More...
#include "config/sensor_lib_config.h"#include "custom_structs.h"#include "custom_types.h"#include "message_flags.h"#include <stdbool.h>#include <stdint.h>

Go to the source code of this file.
Classes | |
| struct | ACK_Status_t |
| struct | ADCDump_t |
| struct | Point1D_t |
| struct | Point3D_t |
| struct | Sensor_Session_t |
| struct | Sensor_t |
| struct | UID_t |
Macros | |
| #define | MAX_PARSED_LOG_MESSAGE_LEN 200 |
| #define | TIMEOUT_M_SECONDS 200000 |
| #define | UID_SIZE 4 |
Typedefs | |
| typedef struct ACK_Status_t | ACK_Status_t |
| typedef struct ADCDump_t | ADCDump_t |
| typedef struct Point1D_t | Point1D_t |
| typedef struct Point3D_t | Point3D_t |
| typedef struct Sensor_Session_t | Sensor_Session_t |
| typedef struct Sensor_t | Sensor_t |
| typedef enum SessionState_t | SessionState_t |
| typedef struct UID_t | UID_t |
Enumerations | |
| enum | SessionState_t { INIT, EXPECTED, RUNNING, COMPLETE } |
Functions | |
| void | DeinitInterface (CommsInterfaceType_t Interface_t) |
| Instruction to deinit the specified interface type. More... | |
| ADCDump_t * | GetADCDumpData (uint16_t Sender_u16) |
| Interface function to get current ADC-Dump from SenderId. More... | |
| bool | GetBoolFromPayload_b (const uint8_t *Payload_pu8) |
| Is called from Getter functions to extract values from payload. In this case a bool-value. More... | |
| ACK_Status_t * | GetCurrentACKStatus (uint8_t index) |
| Is called internally to get the current ACKStatus. More... | |
| int32_t | GetI32FromPayload_i32 (const uint8_t *Payload_pu8) |
| Is called from Getter functions to extract values from payload. In this case a i32-value. More... | |
| int32_t | GetI32FromTwoArgumentPayload_i32 (const uint8_t *Payload_pu8) |
| Is called from Getter functions to extract values from two argument payload. In this case a i32-value. More... | |
| Sensor_t * | GetKnownSensors () |
| Returns pointer to array containing all known sensors. With GetNumberOfKnownSensors() users can get length of array. More... | |
| uint8_t | GetNumberOfKnownSensors () |
| Returns number of known sensors. With GetKnownSensors() users an pointer to an array containing the ID's of the sensors. More... | |
| uint8_t | GetParameterADCFixedFrameRate_u8 () |
| Blocking Request to read the current set ADC-Framerate from current sensor. More... | |
| bool | GetParameterADCUseFixedFrameRate_b () |
| Blocking Request to read the "Use fixed framerate" value from current sensor. More... | |
| bool | GetParameterSignalProcessingEnableAutoGain_b () |
| Blocking Request to read whether auto gain is enabled in the current sensor. More... | |
| bool | GetParameterSignalProcessingEnableMultipathFilter_b () |
| Blocking Request to read whether the multipath filter is enabled in the current sensor. More... | |
| bool | GetParameterSignalProcessingEnableNearFieldDetection_b () |
| Blocking Request to read whether near field detection is enabled in the current sensor. More... | |
| uint8_t | GetParameterSignalProcessingHumidity_u8 () |
| Blocking Request to read the current Transducer Humidity setting from current sensor. More... | |
| float | GetParameterSignalProcessingNoiseLevelThresholdFactor_f () |
| Blocking Request to read the current Noise Level Threshold Factor from current sensor. More... | |
| uint8_t | GetParameterSignalProcessingNoiseRatioThreshold_u8 () |
| Blocking Request to read the current Noise Ratio Threshold from current sensor. More... | |
| float | GetParameterSignalProcessingTemperature_f () |
| Blocking Request to read the current Transducer Temperature setting from current sensor. More... | |
| bool | GetParameterSystemCalibrationState_b () |
| Blocking Request to read whether the current sensor has been calibrated. More... | |
| LogLevel_t | GetParameterSystemLogLevel_t () |
| Blocking Request to read the current System Log Level from current sensor. More... | |
| float | GetParameterSystemMCUTemperature_f () |
| Blocking Request to read the current MCU Temperature from current sensor. More... | |
| uint16_t | GetParameterSystemNodeID_u16 () |
| Blocking Request to read the current NodeID setting from current sensor. More... | |
| ResetReason_t | GetParameterSystemResetReason_t () |
| Blocking Request to read the last Reset Reason from current sensor. More... | |
| SensorMode_t | GetParameterSystemSensorMode_t () |
| Blocking Request to read the Sensor Mode from current sensor. More... | |
| SensorState_t | GetParameterSystemSensorState_t () |
| Blocking Request to read the Sensor State from current sensor. More... | |
| UID_t | GetParameterSystemUniqueID_t (uint8_t Index_u8) |
| Blocking Request to read the Unique ID from current sensor. More... | |
| uint8_t | GetParameterTransducerNumOfPulses_u8 () |
| Blocking Request to read the current Transducer Number of Pulses from current sensor. More... | |
| uint8_t | GetParameterTransducerVolume_u8 () |
| Blocking Request to read the current Transducer Volume from current sensor. More... | |
| uint8_t * | GetResponsePayloadFromACKStatus (ACK_Status_t *ackstatus) |
| Is called internally to extract the payload of a response. More... | |
| Sensor_Session_t * | GetSessionData (uint16_t Sender_u16) |
| Interface function to query current session-data (ongoing and closed session) More... | |
| uint16_t | GetU16FromPayload_u16 (const uint8_t *Payload_pu8) |
| Is called from Getter functions to extract values from payload. In this case a uint16-value. More... | |
| uint16_t | GetU16FromTwoArgumentPayload_u16 (const uint8_t *Payload_pu8) |
| Is called from Getter functions to extract values from payload. In this case a uint16-value. More... | |
| uint8_t | GetU8FromPayload_u8 (const uint8_t *Payload_pu8) |
| Is called from Getter functions to extract values from payload. In this case a uint8-value. More... | |
| uint8_t | GetU8FromTwoArgumentPayload_u8 (const uint8_t *Payload_pu8) |
| Is called from Getter functions to extract values from payload. In this case a uint8-value. More... | |
| void | InitInterface (char *InterfaceName, uint32_t DataRate_u32, CommsInterfaceType_t Interface_t) |
| Instruction to initialize the specified interface with the specified bit rate. Will also initialize the semaphores if necessary. More... | |
| void | ParseLogMessageToText (char *Output_p8, uint16_t SenderId_u16, const uint8_t *ReceivedPayload_pu8) |
| Parses log messages into human readable text. More... | |
| void | RegisterADCDumpSessionEndCallback (void(*Callback)(uint16_t Sender_u16)) |
| Interface function to register a callback function that is called whenever an SessionEnd Payload for an active ADCDump is received. More... | |
| void | RegisterADCDumpStartRequestCallback (void(*Callback)(uint16_t Sender_u16, uint32_t ADCDumpSize_32)) |
| Interface function to register a callback function that is called whenever an ADC-Dump Start Payload is received. More... | |
| void | RegisterLogMsgCallback (void(*Callback)(uint16_t Sender_u16, uint8_t *ReceivedPayload_pu8)) |
| Interface function to register a callback function that is called whenever a Logmessage Payload is received. More... | |
| void | RegisterPointSessionEndCallback (void(*Callback)(uint16_t Sender_u16)) |
| Interface function to register a callback function that is called whenever an SessionEnd Payload is received. More... | |
| void | RegisterRdyCallback (void(*Callback)(uint16_t Sender_u16)) |
| Interface function to register a callback function that is called whenever an Ready Payload is received. More... | |
| void | RegisterSessionStartCallback (void(*Callback)(uint16_t Sender_u16)) |
| Interface function to register a callback function that is called whenever an SessionStart Payload is received. More... | |
| bool | RequestADCDump () |
| Request selected sensor to create an ADC-Dump. More... | |
| bool | RequestFactoryReset () |
| Request selected sensor to reset to factory defaults. More... | |
| bool | RequestLoadSettings () |
| Request selected sensor to load saved settings. More... | |
| bool | RequestMeasurement () |
| Send's a request to start a new measurement. More... | |
| bool | RequestReboot () |
| Request selected sensor to reboot. More... | |
| bool | RequestStoreSettings () |
| Request selected sensor to store current settings. More... | |
| Version_t | RequestVersion_t (VersionByte_t TargetComponent_t) |
| Blocking - Request transmition of the current version of selected component from selected sensor. More... | |
| bool | RequestWasSuccessful_b () |
| bool | SetParameterADCFixedFrameRate (uint8_t FrameRate_u8) |
| Blocking Request to set the fixed framerate for current target sensor. More... | |
| bool | SetParameterADCUseFixedFrameRate (bool UseFixedFrameRate_b) |
| Blocking Request to use the fixed framerate for current target sensor. More... | |
| bool | SetParameterSignalProcessingEnableAutoGain (bool Enable_b) |
| Blocking Request to enable auto gain for current target sensor. More... | |
| bool | SetParameterSignalProcessingEnableMultipathFilter (bool Enable_b) |
| Blocking Request to enable near the multipath filter for current target sensor. More... | |
| bool | SetParameterSignalProcessingEnableNearFieldDetection (bool Enable_b) |
| Blocking Request to enable near field detection for current target sensor. More... | |
| bool | SetParameterSignalProcessingHumidity (uint8_t Humidity_u8) |
| Blocking Request to set the Humidity for current target sensor. More... | |
| bool | SetParameterSignalProcessingNoiseLevelThresholdFactor (float Factor_f) |
| Blocking Request to set the Noise Level Threshold Factor for current target sensor. More... | |
| bool | SetParameterSignalProcessingNoiseRatioThreshold (uint8_t Threshold_u8) |
| Blocking Request to set the Noise Ratio Threshold for current target sensor. More... | |
| bool | SetParameterSignalProcessingTemperature (float Temperature_f) |
| Blocking Request to set the Temperature for current target sensor. More... | |
| bool | SetParameterSystemLogLevel (LogLevel_t LogLevel_t) |
| Blocking Request to set the Loglevel for current target sensor. More... | |
| bool | SetParameterSystemNodeID (uint16_t NodeID_u16) |
| Blocking Request to set a new NodeID for current target sensor. More... | |
| bool | SetParameterSystemSensorMode (SensorMode_t Mode_t) |
| Blocking Request to set the Sensor Mode for current target sensor. More... | |
| bool | SetParameterTransducerNumOfPulses (uint8_t NumOfPulses_u8) |
| Blocking Request to set the Number of Transducer Pulses for current target sensor. More... | |
| bool | SetParameterTransducerVolume (uint8_t Volume_u8) |
| Blocking Request to set the Transducer Volume for current target sensor. More... | |
| void | SetTargetSensor (uint16_t TargetSensor_u16) |
| With this function, the user can set the current target-id, all comming messages will be send to. More... | |
| void | WaitForACK (uint8_t *payload, uint16_t length_u16) |
| This function is called from blocking Set* Functions and blocks until the wait_ack_sem is unlocked by the EvaluateACKStatus_b function. The blocking behavior is achieved by trying to fetch the same semaphore twice. The second sem_wait blocks until sem_post is executed elsewhere. That happens in EvaluateACKStatus_b. More... | |
| uint16_t | WaitForADCSessionEnd () |
| Blocking Function call to wait for SessionEnd Payload. More... | |
| uint16_t | WaitForReady () |
| Blocking Function call to wait for Ready Payload. More... | |
| uint16_t | WaitForSessionEnd () |
| Blocking Function call to wait for SessionEnd Payload. More... | |
| uint16_t | WaitForSessionStart () |
| Blocking Function call to wait for SessionStart Payload. More... | |
This file contains the highlevel interface prototypes to the low-level Protocol.
Definition in file sensor_lib.h.
| #define MAX_PARSED_LOG_MESSAGE_LEN 200 |
Definition at line 30 of file sensor_lib.h.
| #define TIMEOUT_M_SECONDS 200000 |
Definition at line 31 of file sensor_lib.h.
| #define UID_SIZE 4 |
Definition at line 29 of file sensor_lib.h.
| typedef struct ACK_Status_t ACK_Status_t |
A structure to store ACK-Status Data
| typedef struct Sensor_Session_t Sensor_Session_t |
| typedef enum SessionState_t SessionState_t |
| enum SessionState_t |
| Enumerator | |
|---|---|
| INIT | |
| EXPECTED | |
| RUNNING | |
| COMPLETE | |
Definition at line 53 of file sensor_lib.h.