KNX IoT
KNX IoT Point API stack implementation
oc_knx_fb.h File Reference

knx /f resource implementation More...

#include <stddef.h>

Go to the source code of this file.

Functions

bool oc_add_function_blocks_to_response (oc_request_t *request, size_t device_index, size_t *response_length, int *matches, int *skipped, int first_entry, int last_entry)
 add functional blocks to the response More...
 
int oc_count_functional_blocks (size_t device_index)
 count functional blocks in a device More...
 
void oc_create_knx_fb_resources (size_t device)
 Creation of the KNX function block resources. More...
 
bool oc_filter_functional_blocks (oc_request_t *request)
 check if functional blocks should be added to the response More...
 

Detailed Description

knx /f resource implementation

This module implements the /f and /f/x resource The /f resource list all functional blocks. The functional blocks will have urls defined as <functionalblocknumber> (instance 0) or when there are more instances as<functionalblocknumber>_instance

Definition in file oc_knx_fb.h.

Function Documentation

◆ oc_add_function_blocks_to_response()

bool oc_add_function_blocks_to_response ( oc_request_t request,
size_t  device_index,
size_t *  response_length,
int *  matches,
int *  skipped,
int  first_entry,
int  last_entry 
)

add functional blocks to the response

adds the list of functional blocks for /f or ./well-known/core to the response

Parameters
requestthe request
device_indexthe device index
response_lengththe current response length
matchesnumber of matches (so far)
skippednumber of entries already skipped
first_entryfirst entry to be included
last_entrylast entry to be included (exclusive)
Returns
true
false

◆ oc_count_functional_blocks()

int oc_count_functional_blocks ( size_t  device_index)

count functional blocks in a device

Parameters
device_indexthe device index

◆ oc_create_knx_fb_resources()

void oc_create_knx_fb_resources ( size_t  device)

Creation of the KNX function block resources.

  • /fb
  • /fb/X
    Parameters
    deviceindex of the device to which the resource is to be created

◆ oc_filter_functional_blocks()

bool oc_filter_functional_blocks ( oc_request_t request)

check if functional blocks should be added to the response

Parameters
requestthe request
Returns
true
false