Move declaration for 'packet' into own header

This is more C like and leads to a better modularized project.
This commit is contained in:
Lukas Woodtli 2024-08-12 15:45:34 +02:00 committed by Lukas Woodtli
parent 17c9238628
commit 7ab798caad
2 changed files with 25 additions and 3 deletions

View File

@ -68,6 +68,7 @@
#include "management.h"
#include "objects.h"
#include "observe.h"
#include "packet.h"
#include "registration.h"
#include "reporting.h"
#include "uri.h"
@ -414,9 +415,6 @@ void transaction_step(lwm2m_context_t * contextP, time_t currentTime, time_t * t
bool transaction_free_userData(lwm2m_context_t * context, lwm2m_transaction_t * transaction);
bool transaction_set_payload(lwm2m_transaction_t *transaction, uint8_t *buffer, size_t length);
// defined in packet.c
uint8_t message_send(lwm2m_context_t * contextP, coap_packet_t * message, void * sessionH);
#ifdef LWM2M_SUPPORT_TLV
// defined in tlv.c
int tlv_parse(const uint8_t * buffer, size_t bufferLen, lwm2m_data_t ** dataP);

24
core/packet.h Normal file
View File

@ -0,0 +1,24 @@
/*******************************************************************************
*
* Copyright (c) 2024 GARDENA GmbH
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
*
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v20.html
* The Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Lukas Woodtli, GARDENA GmbH - Please refer to git log
*
*******************************************************************************/
#ifndef WAKAAMA_PACKET_H
#define WAKAAMA_PACKET_H
#include "internals.h"
uint8_t message_send(lwm2m_context_t *contextP, coap_packet_t *message, void *sessionH);
#endif /* WAKAAMA_PACKET_H */