Go to the documentation of this file.
8 #ifndef TOPOSENS_SENSOR_LIB_H
9 #define TOPOSENS_SENSOR_LIB_H
30 #define MAX_PARSED_LOG_MESSAGE_LEN 200
31 #define TIMEOUT_M_SECONDS 200000
588 uint32_t ADCDumpSize_32));
608 const uint8_t* ReceivedPayload_pu8);
622 void WaitForACK(uint8_t* payload, uint16_t length_u16);
716 #endif // TOPOSENS_SENSOR_LIB_H
bool SetParameterADCUseFixedFrameRate(bool UseFixedFrameRate_b)
Blocking Request to use the fixed framerate for current target sensor.
bool RequestReboot()
Request selected sensor to reboot.
SensorMode_t GetParameterSystemSensorMode_t()
Blocking Request to read the Sensor Mode from current sensor.
SensorState_t GetParameterSystemSensorState_t()
Blocking Request to read the Sensor State from current sensor.
bool GetBoolFromPayload_b(const uint8_t *Payload_pu8)
Is called from Getter functions to extract values from payload. In this case a bool-value.
ACK_Status_t * GetCurrentACKStatus(uint8_t index)
Is called internally to get the current ACKStatus.
bool RequestFactoryReset()
Request selected sensor to reset to factory defaults.
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.
ResetReason_t GetParameterSystemResetReason_t()
Blocking Request to read the last Reset Reason from current sensor.
bool SetParameterSignalProcessingNoiseRatioThreshold(uint8_t Threshold_u8)
Blocking Request to set the Noise Ratio Threshold for current target sensor.
Version_t RequestVersion_t(VersionByte_t TargetComponent_t)
Blocking - Request transmition of the current version of selected component from selected sensor.
struct Point3D_t Point3D_t
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.
struct ADCDump_t ADCDump_t
UID_t GetParameterSystemUniqueID_t(uint8_t Index_u8)
Blocking Request to read the Unique ID from current sensor.
This file contains all library configurations.
uint8_t GetParameterTransducerNumOfPulses_u8()
Blocking Request to read the current Transducer Number of Pulses from current sensor.
struct Point1D_t Point1D_t
Sensor_t * GetKnownSensors()
Returns pointer to array containing all known sensors. With GetNumberOfKnownSensors() users can get l...
void SetTargetSensor(uint16_t TargetSensor_u16)
With this function, the user can set the current target-id, all comming messages will be send to.
bool GetParameterSignalProcessingEnableNearFieldDetection_b()
Blocking Request to read whether near field detection is enabled in the current sensor.
void DeinitInterface(CommsInterfaceType_t Interface_t)
Instruction to deinit the specified interface type.
float GetParameterSignalProcessingTemperature_f()
Blocking Request to read the current Transducer Temperature setting from current sensor.
bool GetParameterSignalProcessingEnableAutoGain_b()
Blocking Request to read whether auto gain is enabled in the current sensor.
bool RequestLoadSettings()
Request selected sensor to load saved settings.
uint8_t GetParameterTransducerVolume_u8()
Blocking Request to read the current Transducer Volume from current sensor.
bool SetParameterSignalProcessingEnableNearFieldDetection(bool Enable_b)
Blocking Request to enable near field detection for current target sensor.
SessionState_t SessionState
LogLevel_t GetParameterSystemLogLevel_t()
Blocking Request to read the current System Log Level from current sensor.
uint16_t VectorLength_u16
uint16_t WaitForADCSessionEnd()
Blocking Function call to wait for SessionEnd Payload.
uint8_t InterfaceIndex_u8
void RegisterRdyCallback(void(*Callback)(uint16_t Sender_u16))
Interface function to register a callback function that is called whenever an Ready Payload is receiv...
bool GetParameterSystemCalibrationState_b()
Blocking Request to read whether the current sensor has been calibrated.
bool SetParameterADCFixedFrameRate(uint8_t FrameRate_u8)
Blocking Request to set the fixed framerate for current target sensor.
uint16_t WaitForSessionEnd()
Blocking Function call to wait for SessionEnd Payload.
bool SetParameterTransducerVolume(uint8_t Volume_u8)
Blocking Request to set the Transducer Volume for current target sensor.
ADCDump_t * GetADCDumpData(uint16_t Sender_u16)
Interface function to get current ADC-Dump from SenderId.
bool SetParameterSignalProcessingEnableMultipathFilter(bool Enable_b)
Blocking Request to enable near the multipath filter for current target sensor.
void RegisterSessionStartCallback(void(*Callback)(uint16_t Sender_u16))
Interface function to register a callback function that is called whenever an SessionStart Payload is...
bool SetParameterTransducerNumOfPulses(uint8_t NumOfPulses_u8)
Blocking Request to set the Number of Transducer Pulses for current target sensor.
uint8_t GetParameterADCFixedFrameRate_u8()
Blocking Request to read the current set ADC-Framerate from current sensor.
uint8_t * GetResponsePayloadFromACKStatus(ACK_Status_t *ackstatus)
Is called internally to extract the payload of a response.
Point1D_t Point1D_tp[MAX_NUMBER_OF_POINTS_PER_SESSION]
bool SetParameterSignalProcessingNoiseLevelThresholdFactor(float Factor_f)
Blocking Request to set the Noise Level Threshold Factor for current target sensor.
uint8_t GetNumberOfKnownSensors()
Returns number of known sensors. With GetKnownSensors() users an pointer to an array containing the I...
bool RequestMeasurement()
Send's a request to start a new measurement.
void RegisterADCDumpSessionEndCallback(void(*Callback)(uint16_t Sender_u16))
Interface function to register a callback function that is called whenever an SessionEnd Payload for ...
bool SetParameterSystemLogLevel(LogLevel_t LogLevel_t)
Blocking Request to set the Loglevel for current target sensor.
uint16_t WaitForReady()
Blocking Function call to wait for Ready Payload.
uint8_t NumberOfPoints_u8
void ParseLogMessageToText(char *Output_p8, uint16_t SenderId_u16, const uint8_t *ReceivedPayload_pu8)
Parses log messages into human readable text.
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...
enum SensorMode_t SensorMode
uint16_t GetParameterSystemNodeID_u16()
Blocking Request to read the current NodeID setting from current sensor.
Sensor_Session_t * GetSessionData(uint16_t Sender_u16)
Interface function to query current session-data (ongoing and closed session)
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.
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.
uint16_t InterfaceSensorId_u16
uint8_t GetParameterSignalProcessingHumidity_u8()
Blocking Request to read the current Transducer Humidity setting from current sensor.
uint32_t ReceivedDumpSize_u32
#define CAN_MAX_FRAME_LEN
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 t...
SessionState_t SessionState
bool GetParameterADCUseFixedFrameRate_b()
Blocking Request to read the "Use fixed framerate" value from current sensor.
bool GetParameterSignalProcessingEnableMultipathFilter_b()
Blocking Request to read whether the multipath filter is enabled in the current sensor.
bool SetParameterSystemSensorMode(SensorMode_t Mode_t)
Blocking Request to set the Sensor Mode for current target sensor.
bool RequestADCDump()
Request selected sensor to create an ADC-Dump.
Contains various enums and structs used to facilitate communication between Toposens sensors and othe...
#define MAX_NUMBER_OF_POINTS_PER_SESSION
Upper Limit of suppored POINT Data per Point Data Session. 3D OR 2D. A maximum of 2x as much point da...
uint16_t WaitForSessionStart()
Blocking Function call to wait for SessionStart Payload.
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...
struct Sensor_Session_t Sensor_Session_t
uint32_t ExpectedDumpSize_u32
uint8_t GetParameterSignalProcessingNoiseRatioThreshold_u8()
Blocking Request to read the current Noise Ratio Threshold from current sensor.
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 re...
float GetParameterSystemMCUTemperature_f()
Blocking Request to read the current MCU Temperature from current sensor.
struct ACK_Status_t ACK_Status_t
bool SetParameterSignalProcessingHumidity(uint8_t Humidity_u8)
Blocking Request to set the Humidity for current target sensor.
float GetParameterSignalProcessingNoiseLevelThresholdFactor_f()
Blocking Request to read the current Noise Level Threshold Factor from current sensor.
bool RequestStoreSettings()
Request selected sensor to store current settings.
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 ...
Point3D_t Point3D_tp[MAX_NUMBER_OF_POINTS_PER_SESSION]
bool SetParameterSystemNodeID(uint16_t NodeID_u16)
Blocking Request to set a new NodeID for current target sensor.
uint8_t ResponsePayload_pu8[CAN_MAX_FRAME_LEN]
bool SetParameterSignalProcessingEnableAutoGain(bool Enable_b)
Blocking Request to enable auto gain for current target sensor.
bool SetParameterSignalProcessingTemperature(float Temperature_f)
Blocking Request to set the Temperature for current target sensor.
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.
bool RequestWasSuccessful_b()
void RegisterPointSessionEndCallback(void(*Callback)(uint16_t Sender_u16))
Interface function to register a callback function that is called whenever an SessionEnd Payload is r...
toposens_echo_driver
Author(s): Tobias Roth
, Dennis Maier , Baris Yazici
autogenerated on Wed Mar 2 2022 01:12:32