Skip to content

Commit

Permalink
Update SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
Bot committed Dec 15, 2023
1 parent 7305a26 commit 56ace5a
Show file tree
Hide file tree
Showing 673 changed files with 175,642 additions and 26,566 deletions.
12 changes: 4 additions & 8 deletions api/wms_advertiser.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* handle.
*
* For examples on how to use these services, check out
* @ref diradv_example/app.c "example application"
* @c diradv_example/app.c "example application"
*/
#ifndef APP_LIB_ADVERTISER_H_
#define APP_LIB_ADVERTISER_H_
Expand Down Expand Up @@ -124,7 +124,7 @@ typedef bool (*app_llhead_acklistener_f)(const ack_gen_input_t * in,
* the network).
* \param callback
* Callback function to be used. NULL to disable
* \note Device must have @ref APP_LIB_SETTINGS_ROLE_FLAG_LL in device
* \note Device must have @c APP_LIB_SETTINGS_ROLE_FLAG_LL in device
* role (service @ref app_lib_settings_set_node_role_f
* "lib_settings->setNodeRole()" in order for callback to be
* active.
Expand All @@ -141,13 +141,9 @@ typedef void (*app_lib_advertiser_ackdatacb_f)
* APP_RES_INVALID_CONFIGURATION if device is not configured as
* @ref APP_LIB_SETTINGS_ROLE_ADVERTISER
*
* Operation @ref app_lib_data_set_max_msg_queuing_time_f
* "lib_data->setMaxMsgQueuingTime()" only allows setting the TTL value
* in second precision. In CSMA-CA networks, the granularity of that service is
* not enough. By using this service, advertiser can set the higher-precision
* By using this service, advertiser can set the higher-precision
* TTL and when advertiser sends data to CSMA-CA device, this TTL is also
* checked (in addition to normal, second-granularity TTL set by @ref
* app_lib_data_set_max_msg_queuing_time_f "lib_data->setMaxMsgQueuingTime()").
* checked.
* For time-slotted mode networks, this value has no impact due to nature of the
* time-slotted mode transmission. Neither this service has impact if device is
* not advertiser.
Expand Down
8 changes: 4 additions & 4 deletions api/wms_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ typedef app_firmware_version_t (*app_get_stack_firmware_version_f)(void);
* This is the most important function of the Single-MCU API. All other
* functions are in libraries, opened using the this function. Parameters are
* the name and version of the library. The name is actually a 32-bit value,
* which is defined in each library header as a macro: \ref
* APP_LIB_LIBRARY_NAME. The library version is also a macro defined in the same
* library header: \ref APP_LIB_LIBRARY_VERSION.
* which is defined in each library header as a macro:
* \c APP_LIB_LIBRARY_NAME. The library version is also a macro defined in the same
* library header: \c APP_LIB_LIBRARY_VERSION.
*
* Example of opening a library:
*
Expand Down Expand Up @@ -223,7 +223,7 @@ typedef enum
/**
* Node address. Each node must have a unique address in the network. There are
* special addresses that can be used as destination addresses, see \ref
* app_special_addr_e. For various addressing modes, see @ref addressing.
* app_special_addr_e. For various addressing modes, see @c addressing.
*/
typedef uint32_t app_addr_t;

Expand Down
2 changes: 1 addition & 1 deletion api/wms_beacon_rx.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ typedef app_res_e
/**
* @brief Check if BLE advertisement scanner is running
*
* Example on use. When device receives a packet to destination @ref endpoint
* Example on use. When device receives a packet to destination @c endpoint
* "endpoint" 10, it checks whether BLE scanner is active. If not, it will
* start it.
*
Expand Down
2 changes: 1 addition & 1 deletion api/wms_beacon_tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* handle.
*
* For examples on how to use these services, check out example application
* @ref ble_beacon/app.c "ble_beacon".
* @c ble_beacon/app.c "ble_beacon".
*/
#ifndef APP_LIB_BEACON_TX_H_
#define APP_LIB_BEACON_TX_H_
Expand Down
96 changes: 21 additions & 75 deletions api/wms_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define APP_LIB_DATA_NAME 0x0003f161 //!< "DATA"

/** \brief Maximum supported library version */
#define APP_LIB_DATA_VERSION 0x20B
#define APP_LIB_DATA_VERSION 0x20E

/**
* @brief Type of tracking ID for data packets
Expand Down Expand Up @@ -162,7 +162,7 @@ typedef enum
APP_LIB_DATA_SEND_RES_OUT_OF_TRACKING_IDS = 7,
/** Tracking ID already in use or invalid ID */
APP_LIB_DATA_SEND_RES_INVALID_TRACKING_ID = 8,
/** Error: one of the @ref endpoint "endpoints" is invalid, reserved for
/** Error: one of the @c endpoint "endpoints" is invalid, reserved for
* stack internal use */
APP_LIB_DATA_SEND_RES_RESERVED_ENDPOINT = 9,
/** Error: data sending is forbidden, either:
Expand Down Expand Up @@ -222,6 +222,8 @@ typedef enum
APP_LIB_DATA_APP_CONFIG_RES_INVALID_INTERVAL = 4,
/** Error: invalid NULL pointer parameter */
APP_LIB_DATA_APP_CONFIG_RES_INVALID_NULL_POINTER = 5,
/** Error: out of memory */
APP_LIB_DATA_APP_CONFIG_RES_OUT_OF_MEMORY = 6,
} app_lib_data_app_config_res_e;

/**
Expand All @@ -240,9 +242,9 @@ typedef enum
/** Fragmented mode is disabled so fragmented packet
* received by stack will be reassembled by stack and
* sent to app as a single full packet to app.
* This mode will use quite a lot a RAM on stack side
* and is not recommended for a sink receiving a lot of
* traffic.
* This mode may use lot of RAM on stack side
* and is not available for sink as it can receive many
* packets from different sources in parallel.
*/
APP_LIB_DATA_FRAGMENTED_MODE_DISABLED = 1,
} app_lib_data_fragmented_mode_e;
Expand Down Expand Up @@ -294,9 +296,9 @@ typedef struct
uint32_t delay;
/** Packet quality of service class, see @ref app_lib_data_qos_e */
app_lib_data_qos_e qos;
/** Source @ref endpoint "endpoint" of packet */
/** Source @c endpoint "endpoint" of packet */
uint8_t src_endpoint;
/** Destination @ref endpoint "endpoint" of packet */
/** Destination @c endpoint "endpoint" of packet */
uint8_t dest_endpoint;
/** Amount of hops that were used when routing packet to the destination */
uint8_t hops;
Expand Down Expand Up @@ -336,10 +338,6 @@ typedef struct
size_t num_bytes;
/** Destination address of packet */
app_addr_t dest_address;
/** Initial end-to-end transmission delay, in 1 / 128 seconds. This could
* be used, for example, to represent actual measurement time if done
* earlier but generated for transmission on later time moment. */
uint32_t delay;
/**
* Packet tracking ID
*/
Expand All @@ -348,9 +346,9 @@ typedef struct
app_lib_data_qos_e qos;
/** Send flags, see @ref app_lib_data_send_flags_e */
uint8_t flags;
/** Source @ref endpoint "endpoint" of packet */
/** Source @c endpoint "endpoint" of packet */
uint8_t src_endpoint;
/** Destination @ref endpoint "endpoint" of packet */
/** Destination @c endpoint "endpoint" of packet */
uint8_t dest_endpoint;
/** Maximum amount of hops allowed for transmission. Requires also flag
* @ref APP_LIB_DATA_SEND_SET_HOP_LIMITING to be set in flags field in order
Expand Down Expand Up @@ -381,9 +379,9 @@ typedef struct
/**
* Packet tracking ID to distinguish which packet was sent */
app_lib_data_tracking_id_t tracking_id;
/** Source @ref endpoint "endpoint" of packet */
/** Source @c endpoint "endpoint" of packet */
uint8_t src_endpoint;
/** Destination @ref endpoint "endpoint" of packet */
/** Destination @c endpoint "endpoint" of packet */
uint8_t dest_endpoint;
/** True if packet was sent, false if packet was discarded */
bool success;
Expand Down Expand Up @@ -447,7 +445,7 @@ typedef void (*app_lib_data_new_app_config_cb_f)(const uint8_t * bytes,
* (unicast, multicast or broadcast)).
* If NULL is passed, the callback is disabled.
*
* Example on use. Application handles destination @ref endpoint "endpoint" of
* Example on use. Application handles destination @c endpoint "endpoint" of
* 12 as incoming data and triggers temperature measurement.
* @code
*
Expand Down Expand Up @@ -514,10 +512,10 @@ typedef app_res_e
(*app_lib_data_set_data_sent_cb_f)(app_lib_data_data_sent_cb_f cb);

/**
* @brief Set the callback function to be called when new @ref appconfig
* @brief Set the callback function to be called when new @c appconfig
* "app config data" is received.
*
* Example: see example application @ref appconfig_app/app.c "appconfig_app"
* Example: see example application @c appconfig_app/app.c "appconfig_app"
*
* \param cb
* The function to be executed, or NULL to unset
Expand Down Expand Up @@ -613,7 +611,7 @@ typedef app_res_e
* The packet to send is represented as @ref app_lib_data_to_send_t
* struct.
*
* Example: See example application @ref custom_app/app.c "custom_app"
* Example: See example application @c custom_app/app.c "custom_app"
*
* \param data
* Data to send
Expand Down Expand Up @@ -652,7 +650,7 @@ typedef void
(*app_lib_data_allow_reception_f)(bool allow);

/**
* \brief Read @ref appconfig "app config"
* \brief Read @c appconfig "app config"
* \param bytes
* Pointer to a buffer for app config data
* \param seq
Expand All @@ -679,7 +677,7 @@ typedef app_lib_data_app_config_res_e
uint16_t * interval);

/**
* \brief Get size of @ref appconfig "app config"
* \brief Get size of @c appconfig "app config"
* \return App config size in bytes
*
* Example of use:
Expand All @@ -692,57 +690,7 @@ typedef size_t


/**
* \brief Set maximum queuing time for messages
* \param priority
* Message priority which queuing time to be set
* \param time
* Queuing time in seconds. Accepted range: 2 - 65534s.
* Select queuing time carefully, too short value might cause
* unnecessary message drops and too big value filling up message
* queues. For consistent performance it is recommended to use the
* same queuing time in the whole network.
*
* \note Minimum queuing time shall be bigger than access cycle
* interval in time-slotted mode networks. It is recommended to use
* multiples of access cycle interval (+ extra) to give time for
* message repetitions, higher priority messages taking over the access
* slot etc. Access cycle is not limiting the minimum value in
* CSMA-CA networks.
* \return Result code, @ref APP_RES_OK if successful
* @ref APP_RES_INVALID_VALUE if unsupported message priority or time
*
* Example:
* @code
* // Set queueing time for low priority to 5 seconds
* lib_data->setMaxMsgQueuingTime(APP_LIB_DATA_QOS_NORMAL, 5);
* @endcode
*/
typedef app_res_e
(*app_lib_data_set_max_msg_queuing_time_f)(app_lib_data_qos_e priority,
uint16_t time);

/**
* \brief Get maximum queuing time of messages
* \param priority
* Message priority which queuing time to be read
* \param time_p
* Pointer where to store maximum queuing time
* \return Result code, @ref APP_RES_OK if ok,
* @ref APP_RES_INVALID_VALUE if unsupported message priority,
* @ref APP_RES_INVALID_NULL_POINTER if @p time_p is null
*
* Example:
* @code
* uint16_t qos_normal_qt;
* lib_data->getMaxMsgQueuingTime(APP_LIB_DATA_QOS_NORMAL, &qos_normal_qt);
* @endcode
*/
typedef app_res_e
(*app_lib_data_get_max_msg_queuing_time_f)(app_lib_data_qos_e priority,
uint16_t * time_p);

/**
* \brief Write @ref appconfig "app config DATA"
* \brief Write @c appconfig "app config DATA"
* \param bytes
* Pointer to app config data to write. The format can be decided by
* the application.
Expand All @@ -769,7 +717,7 @@ typedef app_lib_data_app_config_res_e
(*app_lib_data_write_app_config_data_f)(const uint8_t * bytes);

/**
* \brief Write @ref appconfig "Diagnostic interval"
* \brief Write @c appconfig "Diagnostic interval"
* \param interval
* Diagnostic data transmission interval in seconds, i.e. how often
* the nodes on the network should send diagnostic PDUs. If the value
Expand Down Expand Up @@ -858,8 +806,6 @@ typedef struct
app_lib_data_allow_reception_f allowReception;
app_lib_data_read_app_config_f readAppConfig;
app_lib_data_get_app_config_num_bytes_f getAppConfigNumBytes;
app_lib_data_set_max_msg_queuing_time_f setMaxMsgQueuingTime;
app_lib_data_get_max_msg_queuing_time_f getMaxMsgQueuingTime;
app_lib_data_write_app_config_data_f writeAppConfigData;
app_lib_data_write_diagnostic_interval_f writeDiagnosticInterval;
app_lib_data_set_local_mc_f setLocalMulticastInfo;
Expand Down
11 changes: 4 additions & 7 deletions api/wms_otap.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define APP_LIB_OTAP_NAME 0x000f2338 //!< "OTAP"

/** @brief Maximum supported library version */
#define APP_LIB_OTAP_VERSION 0x201
#define APP_LIB_OTAP_VERSION 0x202

/**
* @brief Different scratchpad type
Expand Down Expand Up @@ -109,9 +109,6 @@ typedef enum
* the given delay. Delay starts when node receive the information and the
* scratchpad is valid. */
APP_LIB_OTAP_ACTION_PROPAGATE_AND_PROCESS_WITH_DELAY = 3,
/** Exchange and processing of scratchpad is managed the old way
* (sequence comparison). */
APP_LIB_OTAP_ACTION_LEGACY = 4,
} app_lib_otap_action_e;

/**
Expand Down Expand Up @@ -415,7 +412,7 @@ typedef app_res_e
* The delay to process the scratchpad. Only needed if action is
* @ref APP_LIB_OTAP_ACTION_PROPAGATE_AND_PROCESS_WITH_DELAY. This
* delay can't be 0 minute/hour/day.
* @return @ref Result code, @ref APP_RES_OK if successful.
* @return Result code, @ref APP_RES_OK if successful.
* @note Returns @ref APP_RES_INVALID_VALUE if delay is the same than the
* actual one when action is
* @ref APP_LIB_OTAP_ACTION_PROPAGATE_AND_PROCESS_WITH_DELAY. This use
Expand Down Expand Up @@ -474,9 +471,9 @@ typedef app_res_e (*app_lib_otap_set_target_scratchpad_and_action_f)(
* The action to do with the target scratchpad
* @param delay
* The delay to process the scratchpad. Only needed if action is
* @ref APP_LIB_OTAP_ACTION_PROPAGATE_AND_PROCESS_WITH_DELAY.
* @c APP_LIB_OTAP_ACTION_PROPAGATE_AND_PROCESS_WITH_DELAY.
*
* @return @ref Result code, @ref APP_RES_OK if successful
* @return Result code, @ref APP_RES_OK if successful
*/
typedef app_res_e
(*app_lib_otap_get_target_scratchpad_and_action_f)(
Expand Down
19 changes: 16 additions & 3 deletions api/wms_radio_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@
/** @brief Maximum amount of configurable power levels */
#define APP_LIB_RADIO_CFG_POWER_MAX_CNT 10

/** @brief Minimum configured radio current (10 x mA) */
#define APP_LIB_RADIO_CFG_CURRENT_MIN 1

/**
* @brief Maximum configured radio current (10 x mA)
*
* FCC allow maximum power for 2.4GHz to be roughly 600mA, so to be sure that
* we don't block the users from doing what they want, but also have some
* reasonable limit to root out obviously invalid values, we set the upper
* limit for current to be 10A.
*/
#define APP_LIB_RADIO_CFG_CURRENT_MAX 1000

/**
* @brief FEM control command from firmware to application
*
Expand All @@ -41,7 +54,7 @@
* often possible to use lazy strategies.
*
* Example: If power consumption is irrelevant, FEM may be kept in RX
* state by default, and in TX state only when @ref APP_LIB_RADIO_FEM_TX_ON
* state by default, and in TX state only when @ref APP_LIB_RADIO_CFG_FEM_TX_ON
* is asked.
*
* Example: FEM may not have true power off / power on states but
Expand Down Expand Up @@ -147,7 +160,7 @@ typedef struct
app_lib_radio_cfg_fem_set_power_cb_f setPower;
/** Callback from firmware to application */
app_lib_radio_cfg_fem_cmd_cb_f femCmd;
/** FEM timings for stack, @ref app_lib_radio_cfg_femtimings_t */
/** FEM timings for stack, @ref app_lib_radio_cfg_fem_timings_t */
app_lib_radio_cfg_fem_timings_t femTimings;
} app_lib_radio_cfg_fem_t;

Expand Down Expand Up @@ -186,7 +199,7 @@ typedef struct
/** RX state current, unit [mA x 10] */
uint16_t rx_current;
/** RX LNA gain or 0 [dB] */
int8_t rx_gain_dbm;
int8_t rx_gain_db;
/** Amount of power levels configured */
uint8_t power_count;
/** TX power level configuration / table.
Expand Down
Loading

0 comments on commit 56ace5a

Please sign in to comment.