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

knx /dev resource implementation More...

#include <stddef.h>

Go to the source code of this file.

Macros

#define KNX_STORAGE_FID   "dev_knx_fid"
 
#define KNX_STORAGE_IA   "dev_knx_ia"
 
#define KNX_STORAGE_IID   "dev_knx_iid"
 

Functions

void oc_create_knx_device_resources (size_t device)
 Creation of the KNX device resources. More...
 
bool oc_knx_device_in_programming_mode (size_t device_index)
 function checks if the device is in programming mode More...
 
void oc_knx_device_set_programming_mode (size_t device_index, bool programming_mode)
 function set the programming mode of the device to true or false More...
 
void oc_knx_device_storage_read (size_t device)
 read the contents from disk during start up for the resources implemented / dev / * More...
 
void oc_knx_device_storage_reset (size_t device_index, int reset_mode)
 clear the persistent storage reset behavior according to the supplied erase code More...
 

Detailed Description

knx /dev resource implementation

Definition in file oc_knx_dev.h.

Function Documentation

◆ oc_create_knx_device_resources()

void oc_create_knx_device_resources ( size_t  device)

Creation of the KNX device resources.

e.g. the dev resources:

  • sn (serial number)
  • hwv (hardware version)
  • fwv (firmware version)
  • hwt (hardware type)
  • model (device model)
  • sa (sub address)
  • da (device address)
  • ipv6 (ipv6 address)
  • hname (host name)
  • ia (internal address)
  • iid (installation identifier)
  • port (port address)
Parameters
deviceindex of the device to which the resource is to be created

◆ oc_knx_device_in_programming_mode()

bool oc_knx_device_in_programming_mode ( size_t  device_index)

function checks if the device is in programming mode

Parameters
device_indexthe device index
Returns
true in programming mode
false not in programming mode

◆ oc_knx_device_set_programming_mode()

void oc_knx_device_set_programming_mode ( size_t  device_index,
bool  programming_mode 
)

function set the programming mode of the device to true or false

Parameters
device_indexthe device index
programming_modetrue to set the device in programming mode, false otherwise

◆ oc_knx_device_storage_read()

void oc_knx_device_storage_read ( size_t  device)

read the contents from disk during start up for the resources implemented / dev / *

Parameters
deviceindex of the device to which the data is to be read

◆ oc_knx_device_storage_reset()

void oc_knx_device_storage_reset ( size_t  device_index,
int  reset_mode 
)

clear the persistent storage reset behavior according to the supplied erase code

  • reset = 2 (Factory Reset) :
    • internal address (ia)
    • host name (hname)
    • Installation ID (iid)
    • programming mode (pm)
    • device address (da)
    • sub address (sa)
    • group object table
    • recipient object table
    • publisher object table
  • reset = 3 (reset ia) :
    • internal address (ia)
  • reset = 7 (Factory Reset without IA):
    • group object table
    • recipient object table
    • publisher object table
Parameters
device_indexThe device index
reset_modethe KNX reset mode