MCU
Loading...
Searching...
No Matches
main_ethernet_test.cpp
Go to the documentation of this file.
1#include <Arduino.h>
2
3
4#include "ProtobufMsgInterface.h"
5#include "MCU_rev15_defs.h"
6
9ParameterInterface params = ParameterInterface();
11
13{
17}
18
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}
32
33void setup()
34{
36}
37
38void loop()
39{
41 // Serial.println("loopin");
42}
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)
void setup()
void test_ethernet()
EthernetUDP protobuf_send_socket
void init_ethernet_device()
ParameterInterface params
ETHInterfaces ethernet_interfaces
EthernetUDP protobuf_recv_socket
void loop()
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)