Skip to content

Commit

Permalink
Version 2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
OryxEmbeddedAdmin committed Jan 8, 2021
1 parent 248b6e2 commit de53360
Show file tree
Hide file tree
Showing 611 changed files with 7,465 additions and 3,730 deletions.
4 changes: 2 additions & 2 deletions coap/coap_client.c
Expand Up @@ -6,7 +6,7 @@
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
* *
* Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.
* *
* This file is part of CycloneTCP Open. * This file is part of CycloneTCP Open.
* *
Expand All @@ -25,7 +25,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* *
* @author Oryx Embedded SARL (www.oryx-embedded.com) * @author Oryx Embedded SARL (www.oryx-embedded.com)
* @version 2.0.0 * @version 2.0.2
**/ **/


//Switch to the appropriate trace level //Switch to the appropriate trace level
Expand Down
4 changes: 2 additions & 2 deletions coap/coap_client.h
Expand Up @@ -6,7 +6,7 @@
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
* *
* Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.
* *
* This file is part of CycloneTCP Open. * This file is part of CycloneTCP Open.
* *
Expand All @@ -25,7 +25,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* *
* @author Oryx Embedded SARL (www.oryx-embedded.com) * @author Oryx Embedded SARL (www.oryx-embedded.com)
* @version 2.0.0 * @version 2.0.2
**/ **/


#ifndef _COAP_CLIENT_H #ifndef _COAP_CLIENT_H
Expand Down
44 changes: 42 additions & 2 deletions coap/coap_client_block.c
Expand Up @@ -6,7 +6,7 @@
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
* *
* Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.
* *
* This file is part of CycloneTCP Open. * This file is part of CycloneTCP Open.
* *
Expand All @@ -25,7 +25,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* *
* @author Oryx Embedded SARL (www.oryx-embedded.com) * @author Oryx Embedded SARL (www.oryx-embedded.com)
* @version 2.0.0 * @version 2.0.2
**/ **/


//Switch to the appropriate trace level //Switch to the appropriate trace level
Expand Down Expand Up @@ -61,23 +61,39 @@ error_t coapClientSetTxBlockSize(CoapClientRequest *request, uint_t blockSize)


//Set TX block size //Set TX block size
if(blockSize == 16) if(blockSize == 16)
{
request->txBlockSzx = COAP_BLOCK_SIZE_16; request->txBlockSzx = COAP_BLOCK_SIZE_16;
}
else if(blockSize == 32) else if(blockSize == 32)
{
request->txBlockSzx = COAP_BLOCK_SIZE_32; request->txBlockSzx = COAP_BLOCK_SIZE_32;
}
else if(blockSize == 64) else if(blockSize == 64)
{
request->txBlockSzx = COAP_BLOCK_SIZE_64; request->txBlockSzx = COAP_BLOCK_SIZE_64;
}
else if(blockSize == 128) else if(blockSize == 128)
{
request->txBlockSzx = COAP_BLOCK_SIZE_128; request->txBlockSzx = COAP_BLOCK_SIZE_128;
}
else if(blockSize == 256) else if(blockSize == 256)
{
request->txBlockSzx = COAP_BLOCK_SIZE_256; request->txBlockSzx = COAP_BLOCK_SIZE_256;
}
else if(blockSize == 512) else if(blockSize == 512)
{
request->txBlockSzx = COAP_BLOCK_SIZE_512; request->txBlockSzx = COAP_BLOCK_SIZE_512;
}
else else
{
request->txBlockSzx = COAP_BLOCK_SIZE_1024; request->txBlockSzx = COAP_BLOCK_SIZE_1024;
}


//Ensure the block size is acceptable //Ensure the block size is acceptable
if(request->txBlockSzx > coapClientGetMaxBlockSize()) if(request->txBlockSzx > coapClientGetMaxBlockSize())
{
request->txBlockSzx = coapClientGetMaxBlockSize(); request->txBlockSzx = coapClientGetMaxBlockSize();
}


//Release exclusive access to the CoAP client context //Release exclusive access to the CoAP client context
osReleaseMutex(&request->context->mutex); osReleaseMutex(&request->context->mutex);
Expand Down Expand Up @@ -105,23 +121,39 @@ error_t coapClientSetRxBlockSize(CoapClientRequest *request, uint_t blockSize)


//Set RX block size //Set RX block size
if(blockSize == 16) if(blockSize == 16)
{
request->rxBlockSzx = COAP_BLOCK_SIZE_16; request->rxBlockSzx = COAP_BLOCK_SIZE_16;
}
else if(blockSize == 32) else if(blockSize == 32)
{
request->rxBlockSzx = COAP_BLOCK_SIZE_32; request->rxBlockSzx = COAP_BLOCK_SIZE_32;
}
else if(blockSize == 64) else if(blockSize == 64)
{
request->rxBlockSzx = COAP_BLOCK_SIZE_64; request->rxBlockSzx = COAP_BLOCK_SIZE_64;
}
else if(blockSize == 128) else if(blockSize == 128)
{
request->rxBlockSzx = COAP_BLOCK_SIZE_128; request->rxBlockSzx = COAP_BLOCK_SIZE_128;
}
else if(blockSize == 256) else if(blockSize == 256)
{
request->rxBlockSzx = COAP_BLOCK_SIZE_256; request->rxBlockSzx = COAP_BLOCK_SIZE_256;
}
else if(blockSize == 512) else if(blockSize == 512)
{
request->rxBlockSzx = COAP_BLOCK_SIZE_512; request->rxBlockSzx = COAP_BLOCK_SIZE_512;
}
else else
{
request->rxBlockSzx = COAP_BLOCK_SIZE_1024; request->rxBlockSzx = COAP_BLOCK_SIZE_1024;
}


//Ensure the block size is acceptable //Ensure the block size is acceptable
if(request->rxBlockSzx > coapClientGetMaxBlockSize()) if(request->rxBlockSzx > coapClientGetMaxBlockSize())
{
request->rxBlockSzx = coapClientGetMaxBlockSize(); request->rxBlockSzx = coapClientGetMaxBlockSize();
}


//Release exclusive access to the CoAP client context //Release exclusive access to the CoAP client context
osReleaseMutex(&request->context->mutex); osReleaseMutex(&request->context->mutex);
Expand Down Expand Up @@ -224,9 +256,13 @@ error_t coapClientWriteBody(CoapClientRequest *request,
//The M bit indicates whether further blocks need to be transferred //The M bit indicates whether further blocks need to be transferred
//to complete the transfer of the body //to complete the transfer of the body
if(length == 0 && last) if(length == 0 && last)
{
COAP_SET_BLOCK_M(value, 0); COAP_SET_BLOCK_M(value, 0);
}
else else
{
COAP_SET_BLOCK_M(value, 1); COAP_SET_BLOCK_M(value, 1);
}


//Set block size //Set block size
COAP_SET_BLOCK_SZX(value, blockSzx); COAP_SET_BLOCK_SZX(value, blockSzx);
Expand Down Expand Up @@ -517,9 +553,13 @@ error_t coapClientReadBody(CoapClientRequest *request, void *data,
{ {
//The Block2 option is not present in the response //The Block2 option is not present in the response
if(blockPos == 0) if(blockPos == 0)
{
error = ERROR_END_OF_STREAM; error = ERROR_END_OF_STREAM;
}
else else
{
error = ERROR_FAILURE; error = ERROR_FAILURE;
}


//Exit immediately //Exit immediately
break; break;
Expand Down
4 changes: 2 additions & 2 deletions coap/coap_client_block.h
Expand Up @@ -6,7 +6,7 @@
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
* *
* Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.
* *
* This file is part of CycloneTCP Open. * This file is part of CycloneTCP Open.
* *
Expand All @@ -25,7 +25,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* *
* @author Oryx Embedded SARL (www.oryx-embedded.com) * @author Oryx Embedded SARL (www.oryx-embedded.com)
* @version 2.0.0 * @version 2.0.2
**/ **/


#ifndef _COAP_CLIENT_BLOCK_H #ifndef _COAP_CLIENT_BLOCK_H
Expand Down
4 changes: 2 additions & 2 deletions coap/coap_client_misc.c
Expand Up @@ -6,7 +6,7 @@
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
* *
* Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.
* *
* This file is part of CycloneTCP Open. * This file is part of CycloneTCP Open.
* *
Expand All @@ -25,7 +25,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* *
* @author Oryx Embedded SARL (www.oryx-embedded.com) * @author Oryx Embedded SARL (www.oryx-embedded.com)
* @version 2.0.0 * @version 2.0.2
**/ **/


//Switch to the appropriate trace level //Switch to the appropriate trace level
Expand Down
4 changes: 2 additions & 2 deletions coap/coap_client_misc.h
Expand Up @@ -6,7 +6,7 @@
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
* *
* Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.
* *
* This file is part of CycloneTCP Open. * This file is part of CycloneTCP Open.
* *
Expand All @@ -25,7 +25,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* *
* @author Oryx Embedded SARL (www.oryx-embedded.com) * @author Oryx Embedded SARL (www.oryx-embedded.com)
* @version 2.0.0 * @version 2.0.2
**/ **/


#ifndef _COAP_CLIENT_MISC_H #ifndef _COAP_CLIENT_MISC_H
Expand Down
4 changes: 2 additions & 2 deletions coap/coap_client_observe.c
Expand Up @@ -6,7 +6,7 @@
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
* *
* Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.
* *
* This file is part of CycloneTCP Open. * This file is part of CycloneTCP Open.
* *
Expand All @@ -25,7 +25,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* *
* @author Oryx Embedded SARL (www.oryx-embedded.com) * @author Oryx Embedded SARL (www.oryx-embedded.com)
* @version 2.0.0 * @version 2.0.2
**/ **/


//Switch to the appropriate trace level //Switch to the appropriate trace level
Expand Down
4 changes: 2 additions & 2 deletions coap/coap_client_observe.h
Expand Up @@ -6,7 +6,7 @@
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
* *
* Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.
* *
* This file is part of CycloneTCP Open. * This file is part of CycloneTCP Open.
* *
Expand All @@ -25,7 +25,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* *
* @author Oryx Embedded SARL (www.oryx-embedded.com) * @author Oryx Embedded SARL (www.oryx-embedded.com)
* @version 2.0.0 * @version 2.0.2
**/ **/


#ifndef _COAP_CLIENT_OBSERVE_H #ifndef _COAP_CLIENT_OBSERVE_H
Expand Down
5 changes: 2 additions & 3 deletions coap/coap_client_request.c
Expand Up @@ -6,7 +6,7 @@
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
* *
* Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.
* *
* This file is part of CycloneTCP Open. * This file is part of CycloneTCP Open.
* *
Expand All @@ -25,7 +25,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* *
* @author Oryx Embedded SARL (www.oryx-embedded.com) * @author Oryx Embedded SARL (www.oryx-embedded.com)
* @version 2.0.0 * @version 2.0.2
**/ **/


//Switch to the appropriate trace level //Switch to the appropriate trace level
Expand Down Expand Up @@ -344,7 +344,6 @@ error_t coapClientCancelRequest(CoapClientRequest *request)
/** /**
* @brief Release the resources associated with a CoAP request * @brief Release the resources associated with a CoAP request
* @param[in] request CoAP request handle * @param[in] request CoAP request handle
* @return Pointer to the CoAP request
**/ **/


void coapClientDeleteRequest(CoapClientRequest *request) void coapClientDeleteRequest(CoapClientRequest *request)
Expand Down
4 changes: 2 additions & 2 deletions coap/coap_client_request.h
Expand Up @@ -6,7 +6,7 @@
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
* *
* Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.
* *
* This file is part of CycloneTCP Open. * This file is part of CycloneTCP Open.
* *
Expand All @@ -25,7 +25,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* *
* @author Oryx Embedded SARL (www.oryx-embedded.com) * @author Oryx Embedded SARL (www.oryx-embedded.com)
* @version 2.0.0 * @version 2.0.2
**/ **/


#ifndef _COAP_CLIENT_REQUEST_H #ifndef _COAP_CLIENT_REQUEST_H
Expand Down
4 changes: 2 additions & 2 deletions coap/coap_client_transport.c
Expand Up @@ -6,7 +6,7 @@
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
* *
* Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.
* *
* This file is part of CycloneTCP Open. * This file is part of CycloneTCP Open.
* *
Expand All @@ -25,7 +25,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* *
* @author Oryx Embedded SARL (www.oryx-embedded.com) * @author Oryx Embedded SARL (www.oryx-embedded.com)
* @version 2.0.0 * @version 2.0.2
**/ **/


//Switch to the appropriate trace level //Switch to the appropriate trace level
Expand Down
4 changes: 2 additions & 2 deletions coap/coap_client_transport.h
Expand Up @@ -6,7 +6,7 @@
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
* *
* Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.
* *
* This file is part of CycloneTCP Open. * This file is part of CycloneTCP Open.
* *
Expand All @@ -25,7 +25,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* *
* @author Oryx Embedded SARL (www.oryx-embedded.com) * @author Oryx Embedded SARL (www.oryx-embedded.com)
* @version 2.0.0 * @version 2.0.2
**/ **/


#ifndef _COAP_CLIENT_TRANSPORT_H #ifndef _COAP_CLIENT_TRANSPORT_H
Expand Down
5 changes: 3 additions & 2 deletions coap/coap_common.h
Expand Up @@ -6,7 +6,7 @@
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
* *
* Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.
* *
* This file is part of CycloneTCP Open. * This file is part of CycloneTCP Open.
* *
Expand All @@ -25,7 +25,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* *
* @author Oryx Embedded SARL (www.oryx-embedded.com) * @author Oryx Embedded SARL (www.oryx-embedded.com)
* @version 2.0.0 * @version 2.0.2
**/ **/


#ifndef _COAP_COMMON_H #ifndef _COAP_COMMON_H
Expand Down Expand Up @@ -142,6 +142,7 @@ typedef enum
COAP_CODE_SERVICE_UNAVAILABLE = COAP_CODE(5, 3), COAP_CODE_SERVICE_UNAVAILABLE = COAP_CODE(5, 3),
COAP_CODE_GATEWAY_TIMEOUT = COAP_CODE(5, 4), COAP_CODE_GATEWAY_TIMEOUT = COAP_CODE(5, 4),
COAP_CODE_PROXYING_NOT_SUPPORTED = COAP_CODE(5, 5), COAP_CODE_PROXYING_NOT_SUPPORTED = COAP_CODE(5, 5),
COAP_CODE_HOP_LIMIT_REACHED = COAP_CODE(5, 8),
COAP_CODE_CSM = COAP_CODE(7, 1), COAP_CODE_CSM = COAP_CODE(7, 1),
COAP_CODE_PING = COAP_CODE(7, 2), COAP_CODE_PING = COAP_CODE(7, 2),
COAP_CODE_PONG = COAP_CODE(7, 3), COAP_CODE_PONG = COAP_CODE(7, 3),
Expand Down
4 changes: 2 additions & 2 deletions coap/coap_debug.c
Expand Up @@ -6,7 +6,7 @@
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
* *
* Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.
* *
* This file is part of CycloneTCP Open. * This file is part of CycloneTCP Open.
* *
Expand All @@ -25,7 +25,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* *
* @author Oryx Embedded SARL (www.oryx-embedded.com) * @author Oryx Embedded SARL (www.oryx-embedded.com)
* @version 2.0.0 * @version 2.0.2
**/ **/


//Switch to the appropriate trace level //Switch to the appropriate trace level
Expand Down
4 changes: 2 additions & 2 deletions coap/coap_debug.h
Expand Up @@ -6,7 +6,7 @@
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
* *
* Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.
* *
* This file is part of CycloneTCP Open. * This file is part of CycloneTCP Open.
* *
Expand All @@ -25,7 +25,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* *
* @author Oryx Embedded SARL (www.oryx-embedded.com) * @author Oryx Embedded SARL (www.oryx-embedded.com)
* @version 2.0.0 * @version 2.0.2
**/ **/


#ifndef _COAP_DEBUG_H #ifndef _COAP_DEBUG_H
Expand Down

0 comments on commit de53360

Please sign in to comment.