Message API#

Wi-SUN Message API provides a message-based API for managing and configuring the Wi-SUN protocol stack for Network Co-Processor (NCP) use-cases.

The API is functionally equivalent of Wi-SUN Stack API. It is based on requests from the host application to the NCP application running on the device, which sends the requests to the stack using sl_wisun_send_request(). Depending on the request, the required action is either performed immediately or an internal stack operation is started, terminating with an event once the operation finishes. All events contain a status code, indicating the result of the requested operation. Events are also used by the stack to notify the application of any important information, such as the state of the connection.

The NCP application is expected to override sl_wisun_on_event() to handle events from the stack.

Modules#

sl_wisun_msg_generic

sl_wisun_msg_set_network_size

sl_wisun_msg_get_ip_address

sl_wisun_msg_open_socket

sl_wisun_msg_close_socket

sl_wisun_msg_sendto_on_socket

sl_wisun_msg_socket_sendmsg

sl_wisun_msg_listen_on_socket

sl_wisun_msg_accept_on_socket

sl_wisun_msg_connect_socket

sl_wisun_msg_bind_socket

sl_wisun_msg_send_on_socket

sl_wisun_msg_receive_on_socket

sl_wisun_msg_socket_recvmsg

sl_wisun_msg_socket_getsockname

sl_wisun_msg_socket_getpeername

sl_wisun_msg_disconnect

sl_wisun_msg_set_trusted_certificate

sl_wisun_msg_set_device_certificate

sl_wisun_msg_set_device_private_key

sl_wisun_msg_get_statistics

sl_wisun_msg_set_socket_option

sl_wisun_msg_set_tx_power

sl_wisun_msg_set_channel_mask

sl_wisun_msg_allow_mac_address

sl_wisun_msg_deny_mac_address

sl_wisun_msg_get_socket_option

sl_wisun_msg_get_join_state

sl_wisun_msg_clear_credential_cache

sl_wisun_msg_get_mac_address

sl_wisun_msg_set_mac_address

sl_wisun_msg_reset_statistics

sl_wisun_msg_get_neighbor_count

sl_wisun_msg_get_neighbors

sl_wisun_msg_get_neighbor_info

sl_wisun_msg_set_unicast_settings

sl_wisun_msg_set_trace_level

sl_wisun_msg_set_trace_filter

sl_wisun_set_regulation

sl_wisun_msg_set_device_private_key_id

sl_wisun_set_advert_fragment_duration

sl_wisun_msg_set_rate_algorithm

sl_wisun_msg_get_rate_algorithm_stats

sl_wisun_msg_set_mode_switch

sl_wisun_set_regulation_tx_thresholds

sl_wisun_set_device_type

sl_wisun_msg_set_connection_params

sl_wisun_msg_join

sl_wisun_msg_set_pom_ie

sl_wisun_msg_get_pom_ie

sl_wisun_msg_get_stack_version

sl_wisun_msg_set_lfn_params

sl_wisun_msg_set_lfn_support

sl_wisun_msg_set_pti_state

sl_wisun_set_tbu_settings

sl_wisun_get_gtks

sl_wisun_msg_trigger_frame

sl_wisun_msg_set_security_state

sl_wisun_msg_get_network_info

sl_wisun_msg_get_rpl_info

sl_wisun_msg_get_excluded_channel_mask

sl_wisun_msg_set_neighbor_table_size

sl_wisun_msg_config_neighbor_table_size

sl_wisun_msg_enable_neighbour_solicitations

sl_wisun_msg_trigger_neighbor_cache_refresh

sl_wisun_msg_set_tx_power_ddbm

sl_wisun_msg_set_leaf

sl_wisun_msg_set_event_filter

sl_wisun_msg_clear_event_filters

sl_wisun_msg_set_direct_connect_state

sl_wisun_msg_accept_direct_connect_link

sl_wisun_set_phy_sensitivity

sl_wisun_msg_set_direct_connect_pmk_id

sl_wisun_msg_set_preferred_pan

sl_wisun_msg_set_lfn_timings

sl_wisun_msg_config_concurrent_detection

sl_wisun_msg_set_regulation_params

sl_wisun_msg_reset_regulation_duty_cycle

sl_wisun_msg_set_eap_identity

sl_wisun_msg_set_fan_tps_version

sl_wisun_msg_set_rx_fifo_size

sl_wisun_msg_register_address

Enumerations#

enum
SL_WISUN_MSG_SET_NETWORK_SIZE_CNF_ID = 0x01
SL_WISUN_MSG_GET_IP_ADDRESS_CNF_ID = 0x03
SL_WISUN_MSG_OPEN_SOCKET_CNF_ID = 0x04
SL_WISUN_MSG_CLOSE_SOCKET_CNF_ID = 0x05
SL_WISUN_MSG_SENDTO_ON_SOCKET_CNF_ID = 0x06
SL_WISUN_MSG_LISTEN_ON_SOCKET_CNF_ID = 0x07
SL_WISUN_MSG_ACCEPT_ON_SOCKET_CNF_ID = 0x08
SL_WISUN_MSG_CONNECT_SOCKET_CNF_ID = 0x09
SL_WISUN_MSG_BIND_SOCKET_CNF_ID = 0x0A
SL_WISUN_MSG_SEND_ON_SOCKET_CNF_ID = 0x0B
SL_WISUN_MSG_RECEIVE_ON_SOCKET_CNF_ID = 0x0C
SL_WISUN_MSG_DISCONNECT_CNF_ID = 0x0D
SL_WISUN_MSG_SET_TRUSTED_CERTIFICATE_CNF_ID = 0x0E
SL_WISUN_MSG_SET_DEVICE_CERTIFICATE_CNF_ID = 0x0F
SL_WISUN_MSG_SET_DEVICE_PRIVATE_KEY_CNF_ID = 0x10
SL_WISUN_MSG_GET_STATISTICS_CNF_ID = 0x11
SL_WISUN_MSG_SET_SOCKET_OPTION_CNF_ID = 0x12
SL_WISUN_MSG_SET_TX_POWER_CNF_ID = 0x13
SL_WISUN_MSG_SET_CHANNEL_MASK_CNF_ID = 0x15
SL_WISUN_MSG_ALLOW_MAC_ADDRESS_CNF_ID = 0x16
SL_WISUN_MSG_DENY_MAC_ADDRESS_CNF_ID = 0x17
SL_WISUN_MSG_GET_SOCKET_OPTION_CNF_ID = 0x18
SL_WISUN_MSG_GET_JOIN_STATE_CNF_ID = 0x19
SL_WISUN_MSG_CLEAR_CREDENTIAL_CACHE_CNF_ID = 0x1A
SL_WISUN_MSG_GET_MAC_ADDRESS_CNF_ID = 0x1B
SL_WISUN_MSG_SET_MAC_ADDRESS_CNF_ID = 0x1C
SL_WISUN_MSG_RESET_STATISTICS_CNF_ID = 0x1D
SL_WISUN_MSG_GET_NEIGHBOR_COUNT_CNF_ID = 0x1E
SL_WISUN_MSG_GET_NEIGHBORS_CNF_ID = 0x1F
SL_WISUN_MSG_GET_NEIGHBOR_INFO_CNF_ID = 0x20
SL_WISUN_MSG_SET_UNICAST_SETTINGS_CNF_ID = 0x21
SL_WISUN_MSG_SET_TRACE_LEVEL_CNF_ID = 0x22
SL_WISUN_MSG_SET_TRACE_FILTER_CNF_ID = 0x23
SL_WISUN_MSG_SET_REGULATION_CNF_ID = 0x24
SL_WISUN_MSG_SET_DEVICE_PRIVATE_KEY_ID_CNF_ID = 0x25
SL_WISUN_MSG_SET_ASYNC_FRAGMENTATION_CNF_ID = 0x27
SL_WISUN_MSG_SET_MODE_SWITCH_CNF_ID = 0x28
SL_WISUN_MSG_SET_REGULATION_TX_THRESHOLDS_CNF_ID = 0x29
SL_WISUN_MSG_SET_DEVICE_TYPE_CNF_ID = 0x2B
SL_WISUN_MSG_SET_CONNECTION_PARAMS_CNF_ID = 0x2C
SL_WISUN_MSG_JOIN_CNF_ID = 0x2D
SL_WISUN_MSG_SET_POM_IE_CNF_ID = 0x2E
SL_WISUN_MSG_GET_POM_IE_CNF_ID = 0x2F
SL_WISUN_MSG_SET_LFN_PARAMS_CNF_ID = 0x30
SL_WISUN_MSG_SET_LFN_SUPPORT_CNF_ID = 0x31
SL_WISUN_MSG_SET_PTI_STATE_CNF_ID = 0x32
SL_WISUN_MSG_SET_TBU_SETTINGS_CNF_ID = 0x33
SL_WISUN_MSG_GET_GTKS_CNF_ID = 0x34
SL_WISUN_MSG_TRIGGER_FRAME_CNF_ID = 0x35
SL_WISUN_MSG_GET_STACK_VERSION_CNF_ID = 0x36
SL_WISUN_MSG_SET_SECURITY_STATE_CNF_ID = 0x37
SL_WISUN_MSG_GET_NETWORK_INFO_CNF_ID = 0x38
SL_WISUN_MSG_GET_RPL_INFO_CNF_ID = 0x39
SL_WISUN_MSG_GET_EXCLUDED_CHANNEL_MASK_CNF_ID = 0x3A
SL_WISUN_MSG_SET_NEIGHBOR_TABLE_SIZE_CNF_ID = 0x3B
SL_WISUN_MSG_SOCKET_RECVMSG_CNF_ID = 0x3C
SL_WISUN_MSG_SOCKET_SENDMSG_CNF_ID = 0X3D
SL_WISUN_MSG_SOCKET_GETSOCKNAME_CNF_ID = 0x3E
SL_WISUN_MSG_SOCKET_GETPEERNAME_CNF_ID = 0x3F
SL_WISUN_MSG_ENABLE_NEIGHBOUR_SOLICITATIONS_CNF_ID = 0x40
SL_WISUN_MSG_TRIGGER_NEIGHBOR_CACHE_REFRESH_CNF_ID = 0x41
SL_WISUN_MSG_SET_RATE_ALGORITHM_CNF_ID = 0x42
SL_WISUN_MSG_GET_RATE_ALGORITHM_STATS_CNF_ID = 0x43
SL_WISUN_MSG_SET_TX_POWER_DDBM_CNF_ID = 0x44
SL_WISUN_MSG_SET_LEAF_CNF_ID = 0x45
SL_WISUN_MSG_SET_DIRECT_CONNECT_STATE_CNF_ID = 0x46
SL_WISUN_MSG_ACCEPT_DIRECT_CONNECT_LINK_CNF_ID = 0x47
SL_WISUN_MSG_SET_PHY_SENSITIVITY_CNF_ID = 0x48
SL_WISUN_MSG_SET_DIRECT_CONNECT_PMK_ID_CNF_ID = 0x49
SL_WISUN_MSG_SET_PREFERRED_PAN_CNF_ID = 0x4A
SL_WISUN_MSG_CONFIG_NEIGHBOR_TABLE_SIZE_CNF_ID = 0x4B
SL_WISUN_MSG_SET_LFN_TIMINGS_CNF_ID = 0x4C
SL_WISUN_MSG_CONFIG_CONCURRENT_DETECTION_CNF_ID = 0x4D
SL_WISUN_MSG_SET_REGULATION_PARAMS_CNF_ID = 0x4E
SL_WISUN_MSG_RESET_REGULATION_DUTY_CYCLE_CNF_ID = 0x4F
SL_WISUN_MSG_SET_EAP_IDENTITY_CNF_ID = 0x50
SL_WISUN_MSG_SET_EVENT_FILTER_CNF_ID = 0x51
SL_WISUN_MSG_SET_FAN_TPS_VERSION_CNF_ID = 0x52
SL_WISUN_MSG_SET_RX_FIFO_SIZE_CNF_ID = 0x53
SL_WISUN_MSG_REGISTER_ADDRESS_CNF_ID = 0x54
SL_WISUN_MSG_CLEAR_EVENT_FILTERS_CNF_ID = 0x55
}

Wi-SUN Message API confirmation IDs.

enum
SL_WISUN_MSG_SET_NETWORK_SIZE_REQ_ID = 0x01
SL_WISUN_MSG_GET_IP_ADDRESS_REQ_ID = 0x03
SL_WISUN_MSG_OPEN_SOCKET_REQ_ID = 0x04
SL_WISUN_MSG_CLOSE_SOCKET_REQ_ID = 0x05
SL_WISUN_MSG_SENDTO_ON_SOCKET_REQ_ID = 0x06
SL_WISUN_MSG_LISTEN_ON_SOCKET_REQ_ID = 0x07
SL_WISUN_MSG_ACCEPT_ON_SOCKET_REQ_ID = 0x08
SL_WISUN_MSG_CONNECT_SOCKET_REQ_ID = 0x09
SL_WISUN_MSG_BIND_SOCKET_REQ_ID = 0x0A
SL_WISUN_MSG_SEND_ON_SOCKET_REQ_ID = 0x0B
SL_WISUN_MSG_RECEIVE_ON_SOCKET_REQ_ID = 0x0C
SL_WISUN_MSG_DISCONNECT_REQ_ID = 0x0D
SL_WISUN_MSG_SET_TRUSTED_CERTIFICATE_REQ_ID = 0x0E
SL_WISUN_MSG_SET_DEVICE_CERTIFICATE_REQ_ID = 0x0F
SL_WISUN_MSG_SET_DEVICE_PRIVATE_KEY_REQ_ID = 0x10
SL_WISUN_MSG_GET_STATISTICS_REQ_ID = 0x11
SL_WISUN_MSG_SET_SOCKET_OPTION_REQ_ID = 0x12
SL_WISUN_MSG_SET_TX_POWER_REQ_ID = 0x13
SL_WISUN_MSG_SET_CHANNEL_MASK_REQ_ID = 0x15
SL_WISUN_MSG_ALLOW_MAC_ADDRESS_REQ_ID = 0x16
SL_WISUN_MSG_DENY_MAC_ADDRESS_REQ_ID = 0x17
SL_WISUN_MSG_GET_SOCKET_OPTION_REQ_ID = 0x18
SL_WISUN_MSG_GET_JOIN_STATE_REQ_ID = 0x19
SL_WISUN_MSG_CLEAR_CREDENTIAL_CACHE_REQ_ID = 0x1A
SL_WISUN_MSG_GET_MAC_ADDRESS_REQ_ID = 0x1B
SL_WISUN_MSG_SET_MAC_ADDRESS_REQ_ID = 0x1C
SL_WISUN_MSG_RESET_STATISTICS_REQ_ID = 0x1D
SL_WISUN_MSG_GET_NEIGHBOR_COUNT_REQ_ID = 0x1E
SL_WISUN_MSG_GET_NEIGHBORS_REQ_ID = 0x1F
SL_WISUN_MSG_GET_NEIGHBOR_INFO_REQ_ID = 0x20
SL_WISUN_MSG_SET_UNICAST_SETTINGS_REQ_ID = 0x21
SL_WISUN_MSG_SET_TRACE_LEVEL_REQ_ID = 0x22
SL_WISUN_MSG_SET_TRACE_FILTER_REQ_ID = 0x23
SL_WISUN_MSG_SET_REGULATION_REQ_ID = 0x24
SL_WISUN_MSG_SET_DEVICE_PRIVATE_KEY_ID_REQ_ID = 0x25
SL_WISUN_MSG_SET_ASYNC_FRAGMENTATION_REQ_ID = 0x27
SL_WISUN_MSG_SET_MODE_SWITCH_REQ_ID = 0x28
SL_WISUN_MSG_SET_REGULATION_TX_THRESHOLDS_REQ_ID = 0x29
SL_WISUN_MSG_SET_DEVICE_TYPE_REQ_ID = 0x2B
SL_WISUN_MSG_SET_CONNECTION_PARAMS_REQ_ID = 0x2C
SL_WISUN_MSG_JOIN_REQ_ID = 0x2D
SL_WISUN_MSG_SET_POM_IE_REQ_ID = 0x2E
SL_WISUN_MSG_GET_POM_IE_REQ_ID = 0x2F
SL_WISUN_MSG_SET_LFN_PARAMS_REQ_ID = 0x30
SL_WISUN_MSG_SET_LFN_SUPPORT_REQ_ID = 0x31
SL_WISUN_MSG_SET_PTI_STATE_REQ_ID = 0x32
SL_WISUN_MSG_SET_TBU_SETTINGS_REQ_ID = 0x33
SL_WISUN_MSG_GET_GTKS_REQ_ID = 0x34
SL_WISUN_MSG_TRIGGER_FRAME_REQ_ID = 0x35
SL_WISUN_MSG_GET_STACK_VERSION_REQ_ID = 0x36
SL_WISUN_MSG_SET_SECURITY_STATE_REQ_ID = 0x37
SL_WISUN_MSG_GET_NETWORK_INFO_REQ_ID = 0x38
SL_WISUN_MSG_GET_RPL_INFO_REQ_ID = 0x39
SL_WISUN_MSG_GET_EXCLUDED_CHANNEL_MASK_REQ_ID = 0x3A
SL_WISUN_MSG_SET_NEIGHBOR_TABLE_SIZE_REQ_ID = 0x3B
SL_WISUN_MSG_SOCKET_RECVMSG_REQ_ID = 0x3C
SL_WISUN_MSG_SOCKET_SENDMSG_REQ_ID = 0x3D
SL_WISUN_MSG_SOCKET_GETSOCKNAME_REQ_ID = 0x3E
SL_WISUN_MSG_SOCKET_GETPEERNAME_REQ_ID = 0x3F
SL_WISUN_MSG_ENABLE_NEIGHBOUR_SOLICITATIONS_REQ_ID = 0x40
SL_WISUN_MSG_TRIGGER_NEIGHBOR_CACHE_REFRESH_REQ_ID = 0x41
SL_WISUN_MSG_SET_RATE_ALGORITHM_REQ_ID = 0x42
SL_WISUN_MSG_GET_RATE_ALGORITHM_STATS_REQ_ID = 0x43
SL_WISUN_MSG_SET_TX_POWER_DDBM_REQ_ID = 0x44
SL_WISUN_MSG_SET_LEAF_REQ_ID = 0x45
SL_WISUN_MSG_SET_DIRECT_CONNECT_STATE_REQ_ID = 0x46
SL_WISUN_MSG_ACCEPT_DIRECT_CONNECT_LINK_REQ_ID = 0x47
SL_WISUN_MSG_SET_PHY_SENSITIVITY_REQ_ID = 0x48
SL_WISUN_MSG_SET_DIRECT_CONNECT_PMK_ID_REQ_ID = 0x49
SL_WISUN_MSG_SET_PREFERRED_PAN_REQ_ID = 0x4A
SL_WISUN_MSG_CONFIG_NEIGHBOR_TABLE_SIZE_REQ_ID = 0x4B
SL_WISUN_MSG_SET_LFN_TIMINGS_REQ_ID = 0x4C
SL_WISUN_MSG_CONFIG_CONCURRENT_DETECTION_REQ_ID = 0x4D
SL_WISUN_MSG_SET_REGULATION_PARAMS_REQ_ID = 0x4E
SL_WISUN_MSG_RESET_REGULATION_DUTY_CYCLE_REQ_ID = 0x4F
SL_WISUN_MSG_SET_EAP_IDENTITY_REQ_ID = 0x50
SL_WISUN_MSG_SET_EVENT_FILTER_REQ_ID = 0x51
SL_WISUN_MSG_SET_FAN_TPS_VERSION_REQ_ID = 0x52
SL_WISUN_MSG_SET_RX_FIFO_SIZE_REQ_ID = 0x53
SL_WISUN_MSG_REGISTER_ADDRESS_REQ_ID = 0x54
SL_WISUN_MSG_CLEAR_EVENT_FILTERS_REQ_ID = 0x55
}

Wi-SUN Message API request IDs.

Functions#

sl_status_t
sl_wisun_send_request(const void *req, uint16_t req_len, void *cnf, uint16_t cnf_len)

Send a request to the Wi-SUN stack.

Enumeration Documentation#

sl_wisun_msg_cnf_id_t#

sl_wisun_msg_cnf_id_t

Wi-SUN Message API confirmation IDs.

Enumerator
SL_WISUN_MSG_SET_NETWORK_SIZE_CNF_ID
SL_WISUN_MSG_GET_IP_ADDRESS_CNF_ID
SL_WISUN_MSG_OPEN_SOCKET_CNF_ID
SL_WISUN_MSG_CLOSE_SOCKET_CNF_ID
SL_WISUN_MSG_SENDTO_ON_SOCKET_CNF_ID
SL_WISUN_MSG_LISTEN_ON_SOCKET_CNF_ID
SL_WISUN_MSG_ACCEPT_ON_SOCKET_CNF_ID
SL_WISUN_MSG_CONNECT_SOCKET_CNF_ID
SL_WISUN_MSG_BIND_SOCKET_CNF_ID
SL_WISUN_MSG_SEND_ON_SOCKET_CNF_ID
SL_WISUN_MSG_RECEIVE_ON_SOCKET_CNF_ID
SL_WISUN_MSG_DISCONNECT_CNF_ID
SL_WISUN_MSG_SET_TRUSTED_CERTIFICATE_CNF_ID
SL_WISUN_MSG_SET_DEVICE_CERTIFICATE_CNF_ID
SL_WISUN_MSG_SET_DEVICE_PRIVATE_KEY_CNF_ID
SL_WISUN_MSG_GET_STATISTICS_CNF_ID
SL_WISUN_MSG_SET_SOCKET_OPTION_CNF_ID
SL_WISUN_MSG_SET_TX_POWER_CNF_ID
SL_WISUN_MSG_SET_CHANNEL_MASK_CNF_ID
SL_WISUN_MSG_ALLOW_MAC_ADDRESS_CNF_ID
SL_WISUN_MSG_DENY_MAC_ADDRESS_CNF_ID
SL_WISUN_MSG_GET_SOCKET_OPTION_CNF_ID
SL_WISUN_MSG_GET_JOIN_STATE_CNF_ID
SL_WISUN_MSG_CLEAR_CREDENTIAL_CACHE_CNF_ID
SL_WISUN_MSG_GET_MAC_ADDRESS_CNF_ID
SL_WISUN_MSG_SET_MAC_ADDRESS_CNF_ID
SL_WISUN_MSG_RESET_STATISTICS_CNF_ID
SL_WISUN_MSG_GET_NEIGHBOR_COUNT_CNF_ID
SL_WISUN_MSG_GET_NEIGHBORS_CNF_ID
SL_WISUN_MSG_GET_NEIGHBOR_INFO_CNF_ID
SL_WISUN_MSG_SET_UNICAST_SETTINGS_CNF_ID
SL_WISUN_MSG_SET_TRACE_LEVEL_CNF_ID
SL_WISUN_MSG_SET_TRACE_FILTER_CNF_ID
SL_WISUN_MSG_SET_REGULATION_CNF_ID
SL_WISUN_MSG_SET_DEVICE_PRIVATE_KEY_ID_CNF_ID
SL_WISUN_MSG_SET_ASYNC_FRAGMENTATION_CNF_ID
SL_WISUN_MSG_SET_MODE_SWITCH_CNF_ID
SL_WISUN_MSG_SET_REGULATION_TX_THRESHOLDS_CNF_ID
SL_WISUN_MSG_SET_DEVICE_TYPE_CNF_ID
SL_WISUN_MSG_SET_CONNECTION_PARAMS_CNF_ID
SL_WISUN_MSG_JOIN_CNF_ID
SL_WISUN_MSG_SET_POM_IE_CNF_ID
SL_WISUN_MSG_GET_POM_IE_CNF_ID
SL_WISUN_MSG_SET_LFN_PARAMS_CNF_ID
SL_WISUN_MSG_SET_LFN_SUPPORT_CNF_ID
SL_WISUN_MSG_SET_PTI_STATE_CNF_ID
SL_WISUN_MSG_SET_TBU_SETTINGS_CNF_ID
SL_WISUN_MSG_GET_GTKS_CNF_ID
SL_WISUN_MSG_TRIGGER_FRAME_CNF_ID
SL_WISUN_MSG_GET_STACK_VERSION_CNF_ID
SL_WISUN_MSG_SET_SECURITY_STATE_CNF_ID
SL_WISUN_MSG_GET_NETWORK_INFO_CNF_ID
SL_WISUN_MSG_GET_RPL_INFO_CNF_ID
SL_WISUN_MSG_GET_EXCLUDED_CHANNEL_MASK_CNF_ID
SL_WISUN_MSG_SET_NEIGHBOR_TABLE_SIZE_CNF_ID
SL_WISUN_MSG_SOCKET_RECVMSG_CNF_ID
SL_WISUN_MSG_SOCKET_SENDMSG_CNF_ID
SL_WISUN_MSG_SOCKET_GETSOCKNAME_CNF_ID
SL_WISUN_MSG_SOCKET_GETPEERNAME_CNF_ID
SL_WISUN_MSG_ENABLE_NEIGHBOUR_SOLICITATIONS_CNF_ID
SL_WISUN_MSG_TRIGGER_NEIGHBOR_CACHE_REFRESH_CNF_ID
SL_WISUN_MSG_SET_RATE_ALGORITHM_CNF_ID
SL_WISUN_MSG_GET_RATE_ALGORITHM_STATS_CNF_ID
SL_WISUN_MSG_SET_TX_POWER_DDBM_CNF_ID
SL_WISUN_MSG_SET_LEAF_CNF_ID
SL_WISUN_MSG_SET_DIRECT_CONNECT_STATE_CNF_ID
SL_WISUN_MSG_ACCEPT_DIRECT_CONNECT_LINK_CNF_ID
SL_WISUN_MSG_SET_PHY_SENSITIVITY_CNF_ID
SL_WISUN_MSG_SET_DIRECT_CONNECT_PMK_ID_CNF_ID
SL_WISUN_MSG_SET_PREFERRED_PAN_CNF_ID
SL_WISUN_MSG_CONFIG_NEIGHBOR_TABLE_SIZE_CNF_ID
SL_WISUN_MSG_SET_LFN_TIMINGS_CNF_ID
SL_WISUN_MSG_CONFIG_CONCURRENT_DETECTION_CNF_ID
SL_WISUN_MSG_SET_REGULATION_PARAMS_CNF_ID
SL_WISUN_MSG_RESET_REGULATION_DUTY_CYCLE_CNF_ID
SL_WISUN_MSG_SET_EAP_IDENTITY_CNF_ID
SL_WISUN_MSG_SET_EVENT_FILTER_CNF_ID
SL_WISUN_MSG_SET_FAN_TPS_VERSION_CNF_ID
SL_WISUN_MSG_SET_RX_FIFO_SIZE_CNF_ID
SL_WISUN_MSG_REGISTER_ADDRESS_CNF_ID
SL_WISUN_MSG_CLEAR_EVENT_FILTERS_CNF_ID

sl_wisun_msg_req_id_t#

sl_wisun_msg_req_id_t

Wi-SUN Message API request IDs.

Enumerator
SL_WISUN_MSG_SET_NETWORK_SIZE_REQ_ID
SL_WISUN_MSG_GET_IP_ADDRESS_REQ_ID
SL_WISUN_MSG_OPEN_SOCKET_REQ_ID
SL_WISUN_MSG_CLOSE_SOCKET_REQ_ID
SL_WISUN_MSG_SENDTO_ON_SOCKET_REQ_ID
SL_WISUN_MSG_LISTEN_ON_SOCKET_REQ_ID
SL_WISUN_MSG_ACCEPT_ON_SOCKET_REQ_ID
SL_WISUN_MSG_CONNECT_SOCKET_REQ_ID
SL_WISUN_MSG_BIND_SOCKET_REQ_ID
SL_WISUN_MSG_SEND_ON_SOCKET_REQ_ID
SL_WISUN_MSG_RECEIVE_ON_SOCKET_REQ_ID
SL_WISUN_MSG_DISCONNECT_REQ_ID
SL_WISUN_MSG_SET_TRUSTED_CERTIFICATE_REQ_ID
SL_WISUN_MSG_SET_DEVICE_CERTIFICATE_REQ_ID
SL_WISUN_MSG_SET_DEVICE_PRIVATE_KEY_REQ_ID
SL_WISUN_MSG_GET_STATISTICS_REQ_ID
SL_WISUN_MSG_SET_SOCKET_OPTION_REQ_ID
SL_WISUN_MSG_SET_TX_POWER_REQ_ID
SL_WISUN_MSG_SET_CHANNEL_MASK_REQ_ID
SL_WISUN_MSG_ALLOW_MAC_ADDRESS_REQ_ID
SL_WISUN_MSG_DENY_MAC_ADDRESS_REQ_ID
SL_WISUN_MSG_GET_SOCKET_OPTION_REQ_ID
SL_WISUN_MSG_GET_JOIN_STATE_REQ_ID
SL_WISUN_MSG_CLEAR_CREDENTIAL_CACHE_REQ_ID
SL_WISUN_MSG_GET_MAC_ADDRESS_REQ_ID
SL_WISUN_MSG_SET_MAC_ADDRESS_REQ_ID
SL_WISUN_MSG_RESET_STATISTICS_REQ_ID
SL_WISUN_MSG_GET_NEIGHBOR_COUNT_REQ_ID
SL_WISUN_MSG_GET_NEIGHBORS_REQ_ID
SL_WISUN_MSG_GET_NEIGHBOR_INFO_REQ_ID
SL_WISUN_MSG_SET_UNICAST_SETTINGS_REQ_ID
SL_WISUN_MSG_SET_TRACE_LEVEL_REQ_ID
SL_WISUN_MSG_SET_TRACE_FILTER_REQ_ID
SL_WISUN_MSG_SET_REGULATION_REQ_ID
SL_WISUN_MSG_SET_DEVICE_PRIVATE_KEY_ID_REQ_ID
SL_WISUN_MSG_SET_ASYNC_FRAGMENTATION_REQ_ID
SL_WISUN_MSG_SET_MODE_SWITCH_REQ_ID
SL_WISUN_MSG_SET_REGULATION_TX_THRESHOLDS_REQ_ID
SL_WISUN_MSG_SET_DEVICE_TYPE_REQ_ID
SL_WISUN_MSG_SET_CONNECTION_PARAMS_REQ_ID
SL_WISUN_MSG_JOIN_REQ_ID
SL_WISUN_MSG_SET_POM_IE_REQ_ID
SL_WISUN_MSG_GET_POM_IE_REQ_ID
SL_WISUN_MSG_SET_LFN_PARAMS_REQ_ID
SL_WISUN_MSG_SET_LFN_SUPPORT_REQ_ID
SL_WISUN_MSG_SET_PTI_STATE_REQ_ID
SL_WISUN_MSG_SET_TBU_SETTINGS_REQ_ID
SL_WISUN_MSG_GET_GTKS_REQ_ID
SL_WISUN_MSG_TRIGGER_FRAME_REQ_ID
SL_WISUN_MSG_GET_STACK_VERSION_REQ_ID
SL_WISUN_MSG_SET_SECURITY_STATE_REQ_ID
SL_WISUN_MSG_GET_NETWORK_INFO_REQ_ID
SL_WISUN_MSG_GET_RPL_INFO_REQ_ID
SL_WISUN_MSG_GET_EXCLUDED_CHANNEL_MASK_REQ_ID
SL_WISUN_MSG_SET_NEIGHBOR_TABLE_SIZE_REQ_ID
SL_WISUN_MSG_SOCKET_RECVMSG_REQ_ID
SL_WISUN_MSG_SOCKET_SENDMSG_REQ_ID
SL_WISUN_MSG_SOCKET_GETSOCKNAME_REQ_ID
SL_WISUN_MSG_SOCKET_GETPEERNAME_REQ_ID
SL_WISUN_MSG_ENABLE_NEIGHBOUR_SOLICITATIONS_REQ_ID
SL_WISUN_MSG_TRIGGER_NEIGHBOR_CACHE_REFRESH_REQ_ID
SL_WISUN_MSG_SET_RATE_ALGORITHM_REQ_ID
SL_WISUN_MSG_GET_RATE_ALGORITHM_STATS_REQ_ID
SL_WISUN_MSG_SET_TX_POWER_DDBM_REQ_ID
SL_WISUN_MSG_SET_LEAF_REQ_ID
SL_WISUN_MSG_SET_DIRECT_CONNECT_STATE_REQ_ID
SL_WISUN_MSG_ACCEPT_DIRECT_CONNECT_LINK_REQ_ID
SL_WISUN_MSG_SET_PHY_SENSITIVITY_REQ_ID
SL_WISUN_MSG_SET_DIRECT_CONNECT_PMK_ID_REQ_ID
SL_WISUN_MSG_SET_PREFERRED_PAN_REQ_ID
SL_WISUN_MSG_CONFIG_NEIGHBOR_TABLE_SIZE_REQ_ID
SL_WISUN_MSG_SET_LFN_TIMINGS_REQ_ID
SL_WISUN_MSG_CONFIG_CONCURRENT_DETECTION_REQ_ID
SL_WISUN_MSG_SET_REGULATION_PARAMS_REQ_ID
SL_WISUN_MSG_RESET_REGULATION_DUTY_CYCLE_REQ_ID
SL_WISUN_MSG_SET_EAP_IDENTITY_REQ_ID
SL_WISUN_MSG_SET_EVENT_FILTER_REQ_ID
SL_WISUN_MSG_SET_FAN_TPS_VERSION_REQ_ID
SL_WISUN_MSG_SET_RX_FIFO_SIZE_REQ_ID
SL_WISUN_MSG_REGISTER_ADDRESS_REQ_ID
SL_WISUN_MSG_CLEAR_EVENT_FILTERS_REQ_ID

Function Documentation#

sl_wisun_send_request#

sl_status_t sl_wisun_send_request (const void * req, uint16_t req_len, void * cnf, uint16_t cnf_len)

Send a request to the Wi-SUN stack.

Parameters
TypeDirectionArgument NameDescription
const void *[in]req

Pointer to the request message buffer

uint16_t[in]req_len

Length of the request message in bytes (must match req->header.length)

void *[out]cnf

Pointer to confirmation message buffer

uint16_t[in]cnf_len

Length of the confirmation message buffer in bytes

This function provides an interface for sending requests to the Wi-SUN stack and receiving confirmations. When using blocking requests, the function blocks until the request is processed and a confirmation is available.

REQ/CNF buffer layout: request: | Header (4B) | Request body (varies) | Trailing data (if any) | confirmation: | Header (4B) | Confirmation body (varies) | Trailing data (if any) |

Header structure:

  • length: uint16_t - Total message length including header and trailing data

  • id: uint8_t - Message identifier

  • info: uint8_t - Message flags and metadata

  • req != NULL && cnf != NULL

  • req_len >= sizeof(sl_wisun_msg_header_t)

  • cnf_len >= sizeof(sl_wisun_msg_header_t) + sizeof(uint32_t) (header + status)

  • req->header.length == req_len (length consistency check)

Returns

  • SL_STATUS_OK Request processed successfully

  • SL_STATUS_INVALID_PARAMETER Invalid parameters or buffer size mismatch

  • SL_STATUS_NULL_POINTER NULL pointer parameter

  • SL_STATUS_FAIL Internal processing error or handler failure

Note

  • Blocking behavior: When using blocking requests, this function blocks the calling thread until the request is processed.

See Also