MCU
Loading...
Searching...
No Matches
Functions | Variables
main_ethernet_test.cpp File Reference
#include <Arduino.h>
#include "ProtobufMsgInterface.h"
#include "MCU_rev15_defs.h"
Include dependency graph for main_ethernet_test.cpp:

Go to the source code of this file.

Functions

void init_ethernet_device ()
 
void test_ethernet ()
 
void setup ()
 
void loop ()
 

Variables

EthernetUDP protobuf_send_socket
 
EthernetUDP protobuf_recv_socket
 
ParameterInterface params = ParameterInterface()
 
ETHInterfaces ethernet_interfaces = {&params}
 

Function Documentation

◆ init_ethernet_device()

void init_ethernet_device ( )

Definition at line 12 of file main_ethernet_test.cpp.

13{
17}
EthernetUDP protobuf_send_socket
EthernetUDP protobuf_recv_socket
const uint16_t default_protobuf_send_port
uint8_t default_MCU_MAC_address[6]
const uint16_t default_protobuf_recv_port
const IPAddress default_MCU_ip(192, 168, 1, 30)

◆ loop()

void loop ( )

Definition at line 38 of file main_ethernet_test.cpp.

39{
41 // Serial.println("loopin");
42}
void test_ethernet()

◆ setup()

void setup ( void  )

Definition at line 33 of file main_ethernet_test.cpp.

34{
36}
void init_ethernet_device()

◆ test_ethernet()

void test_ethernet ( )

Definition at line 19 of file main_ethernet_test.cpp.

20{
21
23 if(params.params_need_sending())
24 {
25 auto config = params.get_config();
26 if(!handle_ethernet_socket_send_pb(&protobuf_send_socket, config, config_fields)){
27 }
28 params.reset_params_need_sending();
29 }
30
31}
void handle_ethernet_socket_receive(const SysTick_s &tick, qindesign::network::EthernetUDP *socket, std::function< void(unsigned long, const uint8_t *, size_t, eth_interface &, const pb_msgdesc_t *)> recv_function, eth_interface &interface, const pb_msgdesc_t *desc_pointer)
bool handle_ethernet_socket_send_pb(IPAddress addr, uint16_t port, qindesign::network::EthernetUDP *socket, const pb_struct &msg, const pb_msgdesc_t *msg_desc)
ParameterInterface params
ETHInterfaces ethernet_interfaces

Variable Documentation

◆ ethernet_interfaces

ETHInterfaces ethernet_interfaces = {&params}

Definition at line 10 of file main_ethernet_test.cpp.

◆ params

ParameterInterface params = ParameterInterface()

Definition at line 9 of file main_ethernet_test.cpp.

◆ protobuf_recv_socket

EthernetUDP protobuf_recv_socket

Definition at line 8 of file main_ethernet_test.cpp.

◆ protobuf_send_socket

EthernetUDP protobuf_send_socket

Definition at line 7 of file main_ethernet_test.cpp.