Skip to content

Commit

Permalink
Add non & mt to recipient table
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankZRS committed Feb 27, 2024
1 parent eed7d06 commit cf1a215
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions api/oc_knx_fp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1425,6 +1425,12 @@ oc_core_fp_r_post_handler(oc_request_t *request, oc_interface_mask_t iface_mask,
while (object != NULL) {
switch (object->type) {

case OC_REP_BOOL: {
if (oc_string_len(object->name) > 0 && strncmp(oc_string(object->name), "non", 3) == 0) {
g_grt[index].non = object->value.boolean;
}
} break;

case OC_REP_INT: {
if (object->iname == 0) {
mandatory_items++;
Expand All @@ -1445,6 +1451,9 @@ oc_core_fp_r_post_handler(oc_request_t *request, oc_interface_mask_t iface_mask,
if (object->iname == 25) {
g_grt[index].fid = object->value.integer;
}
if (oc_string_len(object->name) > 0 && strncmp(oc_string(object->name), "mt", 2) == 0) {
g_grt[index].mt = object->value.integer;
}
} break;

case OC_REP_STRING: {
Expand Down
5 changes: 3 additions & 2 deletions api/oc_knx_fp.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ typedef struct oc_group_object_table_t
* | path | 112 |
* | url | 10 |
* | ga | 7 |
* | con | - |
* | non | - |
*
* The structure stores the information.
* The structure will be used as an array.
Expand All @@ -183,9 +183,10 @@ typedef struct oc_group_rp_table_t
oc_string_t url; /**< contents of url */
oc_string_t at; /**< Access token id. Reference to the security credentials
for unicast subscription encryption. */
bool con; /**< confirmed message, default = false*/
uint32_t *ga; /**< array of integers */
int ga_len; /**< length of the array of group addresses identifiers */
bool non; /**< true = non-confirmable unicast request, default = false*/
int mt; /**< The number of maximum retransmissions for CON & NON requests */
} oc_group_rp_table_t;

/**
Expand Down

0 comments on commit cf1a215

Please sign in to comment.