Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion applications/zpc/components/zwave/zwave_rx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ ENDIF()
# Library
add_library(zwave_rx ${SOURCE_LIST} src/zwave_rx_zwapi_callbacks.c)

target_include_directories(zwave_rx PUBLIC include)
target_include_directories(zwave_rx PUBLIC include
PRIVATE ../zwave_transports/zwave_api_transport/include
)

target_link_libraries(zwave_rx
PRIVATE zwave_controller
zwave_definitions
zwave_api_transport
unify)

IF(NOT ZWAVE_BUILD_SYSTEM EQUAL 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
// Includes from other components
#include "zwapi_protocol_controller.h"
#include "zwapi_protocol_mem.h"
#include "zwave_api_transport.h"
#include "sl_log.h"

#define LOG_TAG "zwave_rx_zwapi_callbacks"

// Static helper function
static void
Expand Down Expand Up @@ -157,6 +161,7 @@ void zwave_rx_zwave_api_started(const uint8_t *buffer, uint8_t buffer_length)
{
(void)buffer;
(void)buffer_length;
zwave_api_transport_reset();
// Make sure we are still running the right settings:
zwapi_set_node_id_basetype(NODEID_16BITS);

Expand All @@ -166,6 +171,12 @@ void zwave_rx_zwave_api_started(const uint8_t *buffer, uint8_t buffer_length)
zwapi_set_learn_mode(LEARN_MODE_DISABLE, NULL);

// I can't think of a reason to do something with our NIF here. (buffer, buffer_length)
zwave_network_management_state_t nms_state = zwave_network_management_get_state();
if (nms_state != NM_IDLE) {
sl_log_warning(LOG_TAG,
"Network management is busy.\n");
zwave_network_management_abort();
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ static void zwave_api_transport_emergency_timeout_step()

// Use the Z-Wave API to abort.
zwapi_abort_send_data();
zwave_api_send_data_callback(TRANSMIT_COMPLETE_FAIL, NULL);
}

// Intercepting Protocol specific commands
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ void zwave_api_protocol_rx_dispatch(uint8_t *pData, uint16_t len)
break;

case FUNC_ID_SERIAL_API_STARTED:
sl_log_warning(LOG_TAG, "SERIAL API STARTED\n");
/* ZW->HOST: bWakeupReason | bWatchdogStarted | deviceOptionMask | */
/* node_type.generic | node_type.specific | cmdClassLength | cmdClass[] */
zwapi_set_awaiting_zwave_api_started(false);
Expand Down