General purpose library for communication over the mqtt protocol
Перейти к файлу
Ewerton Scaboro da Silva f1cc7804df
Submodule update (#169)
2024-05-28 13:49:43 -07:00
build fix submodule check (#160) 2023-11-27 16:34:49 -08:00
build_all malloc checks (#164) 2024-02-08 16:51:44 -08:00
configs
deps Submodule update (#169) 2024-05-28 13:49:43 -07:00
devdoc/requirement_docs
inc/azure_umqtt_c [ACR/1] Rename mqtt_client_send_ack to mqtt_client_send_message_response 2021-06-15 11:09:10 -07:00
jenkins support VS2022 2023-04-25 16:37:01 -07:00
samples Remove files related to MBED OS (not mbedtlsgit status) 2023-02-07 16:30:03 -08:00
src malloc checks (#164) 2024-02-08 16:51:44 -08:00
tests move to dev ops OSX (#156) 2023-08-23 13:25:20 -07:00
.gitignore Use 1ES build agents 2021-08-13 14:47:24 -07:00
.gitmodules
CMakeLists.txt xcode fix prototype warnings (#158) 2023-09-05 17:00:28 -07:00
LICENSE
SECURITY.MD
readme.md Update readme.md (#165) 2024-02-07 17:02:19 -08:00
version.txt

readme.md

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Microsoft Azure MQTT

azure-umqtt-c is a C library for MQTT 3.1 protocol communication to Azure Cloud IoT Services.

Dependencies

azure-mqtt client use the azure-c-shared-utility, which is a C library provisioning common functionality for basic tasks (like string, list manipulation, IO, etc.). azure-c-shared-utility is available here: https://github.com/Azure/azure-c-shared-utility. azure-c-shared-utility needs to be built before building azure-mqtt-c.

Setup

Build

  • Clone azure-umqtt-c by:
git clone https://github.com/Azure/azure-umqtt-c.git
cd azure-umqtt-c
git submodule update --init
  • Create a folder cmake under azure-umqtt-c

  • Switch to the cmake folder and run

cmake ..
  • Build
cmake --build .

Installation and Use

Optionally, you may choose to install azure-umqtt-c on your machine:

  1. Switch to the cmake folder and run

    cmake -Duse_installed=ON ../
    cmake --build . --target install
    

    or install using the follow commands for each platform:

    On Linux:

    sudo make install
    

    On Windows:

    find_package(umqtt REQUIRED CONFIG)
    target_link_library(yourlib umqtt)
    

This requires that azure-c-shared-utility is installed (through CMake) on your machine.

If running tests, this requires that umock-c, azure-ctest, and azure-c-testrunnerswitcher are installed (through CMake) on your machine.

Building the tests

In order to build the tests use:

cmake .. -Drun_unittests:bool=ON