net: lwm2m: relocate/memory align notification_attrs struct

For code clarity, let's move notification_attrs structure to the top
of lwm2m_engine.c.  While we're at it, we can re-order it's members
for memory alignment.

NOTE: This patch does not change the current flash or SRAM usage but
further additions to the notification_attrs structure could.

Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
This commit is contained in:
Michael Scott 2018-05-07 14:06:46 -07:00 committed by Jukka Rissanen
commit bc7a5d3a6c

View file

@ -108,6 +108,16 @@ struct observe_node {
u8_t tkl;
};
struct notification_attrs {
/* use to determine which value is set */
float32_value_t gt;
float32_value_t lt;
float32_value_t st;
s32_t pmin;
s32_t pmax;
u8_t flags;
};
static struct observe_node observe_node_data[CONFIG_LWM2M_ENGINE_MAX_OBSERVER];
#define MAX_PERIODIC_SERVICE 10
@ -318,16 +328,6 @@ static void free_block_ctx(struct block_context *ctx)
/* observer functions */
struct notification_attrs {
/* use to determine which value is set */
u8_t flags;
float32_value_t gt;
float32_value_t lt;
float32_value_t st;
s32_t pmin;
s32_t pmax;
};
static int update_attrs(sys_slist_t *list, struct notification_attrs *out)
{
struct lwm2m_attr *attr;