Skip to content

Commit

Permalink
GW and Node example forked and running
Browse files Browse the repository at this point in the history
  • Loading branch information
tobalr committed Feb 18, 2019
1 parent 8a9bcd1 commit 536b79a
Show file tree
Hide file tree
Showing 71 changed files with 3,786 additions and 41 deletions.
Binary file added .README.md.swp
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@
.history

# End of https://www.gitignore.io/api/platformio,visualstudiocode
# Added by tobalr
.swp #vim
36 changes: 0 additions & 36 deletions ESP-Now_Node-airquality/lib/readme.txt

This file was deleted.

1 change: 0 additions & 1 deletion ESP-Now_Node-airquality/src/espnow_common.h

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions common/lib/nanopb/messages.pb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

�
messages.prototobalr"S
Report

deviceName ( R
deviceName)
reading ( 2.tobalr.ReadingRreading"3
Reading
name ( Rname
value (RvalueB
dk.tobalr.espsensornodes
26 changes: 26 additions & 0 deletions common/lib/nanopb/messages.pb.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.9.2 at Mon Feb 18 20:16:25 2019. */

#include "messages.pb.h"

/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif



const pb_field_t tobalr_Report_fields[3] = {
PB_FIELD( 1, STRING , REQUIRED, CALLBACK, FIRST, tobalr_Report, deviceName, deviceName, 0),
PB_FIELD( 2, MESSAGE , REPEATED, CALLBACK, OTHER, tobalr_Report, reading, deviceName, &tobalr_Reading_fields),
PB_LAST_FIELD
};

const pb_field_t tobalr_Reading_fields[3] = {
PB_FIELD( 3, STRING , REQUIRED, CALLBACK, FIRST, tobalr_Reading, name, name, 0),
PB_FIELD( 4, FLOAT , REQUIRED, STATIC , OTHER, tobalr_Reading, value, name, 0),
PB_LAST_FIELD
};


/* @@protoc_insertion_point(eof) */
65 changes: 65 additions & 0 deletions common/lib/nanopb/messages.pb.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.9.2 at Mon Feb 18 20:16:25 2019. */

#ifndef PB_TOBALR_MESSAGES_PB_H_INCLUDED
#define PB_TOBALR_MESSAGES_PB_H_INCLUDED
#include <pb.h>

/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif

#ifdef __cplusplus
extern "C" {
#endif

/* Struct definitions */
typedef struct _tobalr_Report {
pb_callback_t deviceName;
pb_callback_t reading;
/* @@protoc_insertion_point(struct:tobalr_Report) */
} tobalr_Report;

typedef struct _tobalr_Reading {
pb_callback_t name;
float value;
/* @@protoc_insertion_point(struct:tobalr_Reading) */
} tobalr_Reading;

/* Default values for struct fields */

/* Initializer values for message structs */
#define tobalr_Report_init_default {{{NULL}, NULL}, {{NULL}, NULL}}
#define tobalr_Reading_init_default {{{NULL}, NULL}, 0}
#define tobalr_Report_init_zero {{{NULL}, NULL}, {{NULL}, NULL}}
#define tobalr_Reading_init_zero {{{NULL}, NULL}, 0}

/* Field tags (for use in manual encoding/decoding) */
#define tobalr_Report_deviceName_tag 1
#define tobalr_Report_reading_tag 2
#define tobalr_Reading_name_tag 3
#define tobalr_Reading_value_tag 4

/* Struct field encoding specification for nanopb */
extern const pb_field_t tobalr_Report_fields[3];
extern const pb_field_t tobalr_Reading_fields[3];

/* Maximum encoded size of messages (where known) */
/* tobalr_Report_size depends on runtime parameters */
/* tobalr_Reading_size depends on runtime parameters */

/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID

#define MESSAGES_MESSAGES \


#endif

#ifdef __cplusplus
} /* extern "C" */
#endif
/* @@protoc_insertion_point(eof) */

#endif
File renamed without changes.
3 changes: 3 additions & 0 deletions common/nanopb/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Nanopb
This directory contains a compiled version of nanopb built for linux x86
https://jpa.kapsi.fi/nanopb/download/
123 changes: 123 additions & 0 deletions common/nanopb/generator/nanopb/options.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
// This is a transitional file, to provide parallel support between the old
// nanopb.proto and new options.proto files. Eventually nanopb.proto will
// be left only for legacy code, but for now the generator is still also
// using it. However, your new code can start using this file already now.
// See pull request #241 for details:
// https://github.com/nanopb/nanopb/pull/241

// Custom options for defining:
// - Maximum size of string/bytes
// - Maximum number of elements in array
//
// These are used by nanopb to generate statically allocable structures
// for memory-limited environments.

syntax = "proto2";
import "google/protobuf/descriptor.proto";

package nanopb;
option java_package = "fi.kapsi.koti.jpa.nanopb";

enum FieldType {
FT_DEFAULT = 0; // Automatically decide field type, generate static field if possible.
FT_CALLBACK = 1; // Always generate a callback field.
FT_POINTER = 4; // Always generate a dynamically allocated field.
FT_STATIC = 2; // Generate a static field or raise an exception if not possible.
FT_IGNORE = 3; // Ignore the field completely.
FT_INLINE = 5; // Legacy option, use the separate 'fixed_length' option instead
}

enum IntSize {
IS_DEFAULT = 0; // Default, 32/64bit based on type in .proto
IS_8 = 8;
IS_16 = 16;
IS_32 = 32;
IS_64 = 64;
}

// This is the inner options message, which basically defines options for
// a field. When it is used in message or file scope, it applies to all
// fields.
message Options {
// Allocated size for 'bytes' and 'string' fields.
// For string fields, this should include the space for null terminator.
optional int32 max_size = 1;

// Maximum length for 'string' fields. Setting this is equivalent
// to setting max_size to a value of length+1.
optional int32 max_length = 14;

// Allocated number of entries in arrays ('repeated' fields)
optional int32 max_count = 2;

// Size of integer fields. Can save some memory if you don't need
// full 32 bits for the value.
optional IntSize int_size = 7 [default = IS_DEFAULT];

// Force type of field (callback or static allocation)
optional FieldType type = 3 [default = FT_DEFAULT];

// Use long names for enums, i.e. EnumName_EnumValue.
optional bool long_names = 4 [default = true];

// Add 'packed' attribute to generated structs.
// Note: this cannot be used on CPUs that break on unaligned
// accesses to variables.
optional bool packed_struct = 5 [default = false];

// Add 'packed' attribute to generated enums.
optional bool packed_enum = 10 [default = false];

// Skip this message
optional bool skip_message = 6 [default = false];

// Generate oneof fields as normal optional fields instead of union.
optional bool no_unions = 8 [default = false];

// integer type tag for a message
optional uint32 msgid = 9;

// decode oneof as anonymous union
optional bool anonymous_oneof = 11 [default = false];

// Proto3 singular field does not generate a "has_" flag
optional bool proto3 = 12 [default = false];

// Generate an enum->string mapping function (can take up lots of space).
optional bool enum_to_string = 13 [default = false];

// Generate bytes arrays with fixed length
optional bool fixed_length = 15 [default = false];

// Generate repeated field with fixed count
optional bool fixed_count = 16 [default = false];
}

// Extensions to protoc 'Descriptor' type in order to define options
// inside a .proto file.
//
// Protocol Buffers extension number registry
// --------------------------------
// Project: Nanopb
// Contact: Petteri Aimonen <[email protected]>
// Web site: http://kapsi.fi/~jpa/nanopb
// Extensions: 1010 (all types)
// --------------------------------

extend google.protobuf.FileOptions {
optional Options fileopt = 1010;
}

extend google.protobuf.MessageOptions {
optional Options msgopt = 1010;
}

extend google.protobuf.EnumOptions {
optional Options enumopt = 1010;
}

extend google.protobuf.FieldOptions {
optional Options fieldopt = 1010;
}


Loading

0 comments on commit 536b79a

Please sign in to comment.