log_message_example.c
Go to the documentation of this file.
1 
7 #include "example_common.h"
8 #include "toposens/sensor_lib.h"
9 
10 #include <unistd.h>
11 
12 #define SLEEP_TIME_SECONDS 60 * 60
13 
14 static void LogMsgCallback(uint16_t SenderId_u16, uint8_t* ReceivedPayload_pu8);
15 
16 int main()
17 {
19  InitInterface("can0", 1000000, IF_CAN);
20  sleep(SLEEP_TIME_SECONDS);
21 
23  return 0;
24 }
25 
26 static void LogMsgCallback(uint16_t SenderId_u16, uint8_t* ReceivedPayload_pu8)
27 {
28  PrintLogMessage(SenderId_u16, ReceivedPayload_pu8);
29 }
Library containing common functions that are used in the various examples.
void DeinitInterface(CommsInterfaceType_t Interface_t)
Instruction to deinit the specified interface type.
Definition: sensor_lib.c:2279
int main()
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...
Definition: sensor_lib.c:2225
static void LogMsgCallback(uint16_t SenderId_u16, uint8_t *ReceivedPayload_pu8)
This file contains the highlevel interface prototypes to the low-level Protocol.
#define SLEEP_TIME_SECONDS
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...
Definition: sensor_lib.c:3409


toposens_echo_driver
Author(s): Tobias Roth , Dennis Maier , Baris Yazici
autogenerated on Mon Feb 28 2022 23:57:42