13 static void LogMsgCallback(uint16_t SenderId_u16, uint8_t* ReceivedPayload_pu8);
17 printf(
"-----------------ADCDumpExample-----------------\n");
19 printf(
"-----------------SetParameterSystemSensorMode-----------------\n");
21 printf(
"-----------------RequestMeasurement-----------------\n");
23 printf(
"-----------------WaitForSessionEnd(adc session)-----------------\n");
27 if (DumpData_t != NULL)
32 printf(
"-----------------WaitForSessionEnd (point session)-----------------\n");
36 printf(
"-----------------ADCDumpExample Complete-----------------\n");
39 int main(
int argc,
char** argv)
43 fprintf(stderr,
"Pass filename as first argument.\n");
56 printf(
"NumberOfSensors:%d\n", NumberOfSensors);
57 for (
int i = 0; i < NumberOfSensors; i++)
59 printf(
"%d Sensor on Bus: %d\n", i, Sensors[i].InterfaceSensorId_u16);
69 printf(
"Got ADC Dump End Callback from Sender:%d\n", SenderId_u16);
74 printf(
"Got ADC-Dump Request Sender:%d\n", SenderId_u16);
75 printf(
"Got ADC-Dump Request Size:%d\n", DataSize_u32);
78 static void LogMsgCallback(uint16_t SenderId_u16, uint8_t* ReceivedPayload_pu8)
Library containing common functions that are used in the various examples.
bool RequestReboot()
Request selected sensor to reboot.
void SaveADCBlobData(ADCDump_t *ADCDump, const char *filepath)
void DeinitInterface(CommsInterfaceType_t Interface_t)
Instruction to deinit the specified interface type.
Sensor_t * GetKnownSensors()
Returns pointer to array containing all known sensors. With GetNumberOfKnownSensors() users can get l...
uint16_t WaitForADCSessionEnd()
Blocking Function call to wait for SessionEnd Payload.
static void ADCDumpExample(char *filename)
static void ADCDumpEndCallback(uint16_t SenderId_u16)
static void RequestADCDumpCallback(uint16_t SenderId_u16, uint32_t DataSize_u32)
static void LogMsgCallback(uint16_t SenderId_u16, uint8_t *ReceivedPayload_pu8)
uint16_t WaitForSessionEnd()
Blocking Function call to wait for SessionEnd Payload.
ADCDump_t * GetADCDumpData(uint16_t Sender_u16)
Interface function to get current ADC-Dump from SenderId.
uint8_t GetNumberOfKnownSensors()
Returns number of known sensors. With GetKnownSensors() users an pointer to an array containing the I...
void RegisterADCDumpSessionEndCallback(void(*Callback)(uint16_t Sender_u16))
Interface function to register a callback function that is called whenever an SessionEnd Payload for ...
uint16_t WaitForReady()
Blocking Function call to wait for Ready Payload.
int main(int argc, char **argv)
bool RequestMeasurement()
Send's a request to start a new measurement.
Sensor_Session_t * GetSessionData(uint16_t Sender_u16)
Interface function to query current session-data (ongoing and closed session)
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...
void PrintSessionData(Sensor_Session_t *Session)
This file contains the highlevel interface prototypes to the low-level Protocol.
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.
void PrintLogMessage(uint16_t SenderId_u16, const uint8_t *ReceivedPayload_pu8)
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...
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 ...