#include <libents/controller/controller.h>
#include <libents/controller/modules/microsd.h>
#include <libents/proto/sensor.h>
#include <libents/storage/fifo.h>
#include <libents/user_config.h>
#include <libtock-sync/services/alarm.h>
#include <libtock/kernel/ipc.h>
#include <libtock/tock.h>
#include <stdio.h>
#include <ulog.h>
#include "lorawan.h"
#include "user_config.h"
Go to the source code of this file.
|
| void | ulog_prefix_handler (ulog_event *ev, char *prefix, size_t prefix_size) |
| | Callback to add prefix to ulog messages.
|
| |
| int | main (void) |
| |
◆ LOG_LINE_SIZE
| #define LOG_LINE_SIZE 240 |
Must match the MicroSDCommand.log field, which is 240 bytes (239 chars plus the NUL). Anything smaller truncates the line here, before the proto sees it, and ulog_event_to_cstr() writes "LEVEL FILE:LINE: MESSAGE" into this buffer, so a long FILE eats into the space left for the message.
Definition at line 21 of file main.cc.
◆ main()
Definition at line 131 of file main.cc.
References buffer, upload_stats::bytes, ControllerDeviceReset(), ControllerInit(), upload_stats::failed, fifo_buffer_len(), fifo_put(), upload_stats::heartbeats, lorawan_heartbeat(), lorawan_init(), lorawan_join(), lorawan_timesync(), lorawan_upload(), upload_stats::meas, stats, upload_stats::total, ulog_prefix_handler(), USERCONFIG_OK, UserConfigBytes(), UserConfigStart(), and UserConfigUpdateFromServer().
◆ ulog_prefix_handler()
| void ulog_prefix_handler |
( |
ulog_event * |
ev, |
|
|
char * |
prefix, |
|
|
size_t |
prefix_size |
|
) |
| |
Callback to add prefix to ulog messages.
- Parameters
-
| ev | Pointer to ulog event. |
| prefix | Pointer to prefix buffer. |
| prefix_size | Size of prefix buffer. |
Definition at line 97 of file main.cc.
Referenced by main().
◆ stats