IOT - Bosch
  • Introduction
  • Devices
    • Bosch XDK 110
      • Introduction
      • Operating System
      • Hardware
        • Sensors
          • Accelerometer
            • C
          • Gyroscope
            • C
            • Mita
          • Magnetometer
            • C
          • Environmental
            • C
            • Mita
          • Ambient Light
            • C
            • Mita
          • Acoustic
            • C
      • Software
        • XDK WorkSpace
          • Structure
          • Debug
          • Supported languages
            • C
              • Static Library (.a)
            • XDK Live - Mita
            • MicroFlo
      • Connectivity
        • Bluetooth Low Energy (BLE)
          • Overview
          • General Info
          • Implementation
            • C
            • XDK Live
        • WI-FI
          • OverView
          • Implementation
            • C
            • XDK Live
        • WI-FI Enterprise
      • Protocols
        • CoAP
          • Overview
          • Implementation -TBD
        • HTTP
          • Overview
          • Structure and Methods
          • Implementation
            • C - Rest
            • C - Post
            • XDK Live
        • HTTPS
          • Overview
          • Implementation TBD
        • LWM2M
          • Overview
          • Implementation TBD
        • MQTT
          • Overview
          • Implementation
            • C
            • XDK Live
        • USB
          • Overview
          • Implementation TBD
      • Data Storage
      • XDK Extension Bus
      • Community
      • Applications
        • Language C
          • HomeAssitant - MQTT
            • Prerequisites
            • Server
            • Device
          • IOTA-MQTT-XDK
            • Prerequisites
            • XDK110
            • Mqtt JSON to MAM
            • SensorHub
            • Demo
        • Language XDK Live
          • MQTT
            • Hello World
            • HomeAssistant
              • Prerequisites
              • Server
              • Device
            • Docker-HomeAssistant
          • HTTP
            • Roku Remote Control
              • Roku API
              • MITA
                • Example
    • Bosch AMRA
    • Bosch GLM 100C
    • Bosch FLEXIDOME IP panoramic
    • Bosch GLM 100C
    • Bosch Rexroth Nexo
    • Bosch Rexroth PRC 7000
    • Bosch RRC / CT100
    • Bosch Rexroth IoT Gateway
  • Bosch IOT Solutions
    • Bosch IOT Projects
      • Smart Home
      • Industry 4.0
      • Smart Cities
      • Connected-mobility
    • Bosch IOT Suite
      • Bosch Analytics
      • Bosch IOT Hub
      • Bosch Iot Permission
      • IoT Remote Manager
      • IoT Rollouts
      • IoT Things
      • Demo TBD **
    • BPM and BRM
  • IOTA
    • Introduction
      • Tangle
      • Glossary
      • Differences with other tech
      • How does iota work
      • Developers
    • Qubic
      • What is Qubic?
      • Target
      • Qubic Protocol
    • Ecosystem
    • Applications
      • Python
      • XDK110
        • Prerequisites
        • XDK110
        • Mqtt JSON to MAM
        • SensorHub
    • Bosch/IOTA
  • ByteBall
    • SmartContract
    • Use Case
      • BoshCoins
Powered by GitBook
On this page

Was this helpful?

  1. Devices
  2. Bosch XDK 110
  3. Protocols
  4. CoAP

Overview

PreviousCoAPNextImplementation -TBD

Last updated 5 years ago

Was this helpful?

The highest levels of API in regards to CoAP are all provided by the Serval Stack. It offers functionality such as a server, a client or general utilities when implementing a CoAP based application. This ensures that any message sent and received will be a CoAP message and treated as such.

Client Functionality

Function

Description

CoapServer_initialize()

This function is called to initialize the CoAP client (and server) and related modules. It must be called before any other CoAP-Client related function.

CoapServer_startInstance()

This function is called to start the CoAP client (and server). As input it receives a port, to which the server will listen, and a reference to a callbackfunction, which will be called every time the server receives a message.

CoapClient_initialize()

If it is desired to use different UDP sockets for server and client, this function must be called for the client instead of CoapServer_initialize. This function initializes only the client and relevant modules. Per default, this function is disabled.

CoapClient_startInstance()

This function is called to start the CoAP client after the client has been initialized using CoapClient_initialize. Per default, this function is disabled, if CoapClient_initialize is disabled, as well.

CoapClient_request()

This function is called to send a message as a request. As input, it receives a message, a callback for informing about the status of sending and a callback to handle a response to this message.

CoapClient_initReqMsg()

This function is called to initialize a message. As input, it receives the target’s IP address, its port and the pointer to a message.

Utility

CoapParser_setup()

This function sets up a CoAP-Parser which will be used to receive certain information from a CoAP-Message, such as the code, the payload or the options. As input, it receives a variable of type CoapParser_T and the pointer to a message.

CoapParser_getCode()

This function is called to receive the code of a message. As input, it receives a pointer to a message.

CoapParser_getPayload()

This function is called to receive the payload of a message. As input, it receives a pointer to the previously set up parser, a pointer to a payload array, and the array’s length.

CoapSerializer_setup()

This function sets up a CoAP-Serializer, which will be used to create a message. It handles setting options, the payload, the code, etc, for a given message. As input, it receives variable of type CoapSerializer_T, the pointer to a message, and a code indicating whether a RESPONSE or a REQUEST is created.

CoapSerializer_setCode()

This function is called to set the code of a message. As input, it receives the serializer, a message and the code to be set.

CoapSerializer_serializePayload()

This function is called to set the payload for a message. As input, it receives the serializer, a message pointer, the payload and the payload’s length