![]() |
Morse Micro IoT SDK
2.9.7
|
Enumerations, etc., used by the underlying implementation, but which are not usually needed to be used directly.
Macros | |
| #define | CONTROL_STREAM 0 |
| The stream ID of the control stream. More... | |
| #define | MMAGIC_CONTROLLER_DEFAULT_RESPONSE_TIMEOUT_MS 1000 |
| The default timeout when waiting for a response from a command sent to the agent in ms. More... | |
Functions | |
| enum mmagic_status | mmagic_controller_tx (struct mmagic_controller *controller, uint8_t stream_id, uint8_t submodule_id, uint8_t command_id, uint8_t subcommand_id, const uint8_t *buffer, size_t buffer_length) |
| Sends a command to the agent. More... | |
| enum mmagic_status | mmagic_controller_rx (struct mmagic_controller *controller, uint8_t stream_id, uint8_t submodule_id, uint8_t command_id, uint8_t subcommand_id, uint8_t *buffer, size_t buffer_length, uint32_t timeout_ms) |
| Waits for a response from the agent. More... | |
| enum mmagic_status | mmagic_controller_agent_sync (struct mmagic_controller *controller, uint32_t timeout_ms) |
| Sends a sync request to the agent and waits for a sync response. More... | |
| enum mmagic_status | mmagic_controller_request_agent_reset (struct mmagic_controller *controller) |
| Sends a reset request to the agent. More... | |
| #define CONTROL_STREAM 0 |
The stream ID of the control stream.
Definition at line 578 of file mmagic_controller.h.
| #define MMAGIC_CONTROLLER_DEFAULT_RESPONSE_TIMEOUT_MS 1000 |
The default timeout when waiting for a response from a command sent to the agent in ms.
Definition at line 581 of file mmagic_controller.h.
| enum mmagic_ip_cmd |
ip configuration command IDs
Definition at line 848 of file mmagic_controller.h.
| enum mmagic_ip_var |
ip configuration variable IDs
Definition at line 815 of file mmagic_controller.h.
| enum mmagic_iperf_cmd |
iperf configuration command IDs
Definition at line 922 of file mmagic_controller.h.
| enum mmagic_iperf_var |
iperf configuration variable IDs
Definition at line 905 of file mmagic_controller.h.
| enum mmagic_mqtt_cmd |
mqtt configuration command IDs
Definition at line 1036 of file mmagic_controller.h.
| enum mmagic_ntp_cmd |
ntp configuration command IDs
Definition at line 1019 of file mmagic_controller.h.
| enum mmagic_ntp_var |
ntp configuration variable IDs
| Enumerator | |
|---|---|
| MMAGIC_NTP_VAR_SERVER | The hostname or IP of the NTP server. Defaults to "0.pool.ntp.org". |
Definition at line 1012 of file mmagic_controller.h.
| enum mmagic_ping_cmd |
ping configuration command IDs
Definition at line 890 of file mmagic_controller.h.
| enum mmagic_ping_var |
ping configuration variable IDs
Definition at line 878 of file mmagic_controller.h.
| enum mmagic_sys_cmd |
sys configuration command IDs
Definition at line 937 of file mmagic_controller.h.
| enum mmagic_tcp_cmd |
tcp configuration command IDs
Definition at line 956 of file mmagic_controller.h.
| enum mmagic_tls_cmd |
tls configuration command IDs
Definition at line 999 of file mmagic_controller.h.
| enum mmagic_tls_var |
tls configuration variable IDs
Definition at line 985 of file mmagic_controller.h.
| enum mmagic_wlan_cmd |
wlan configuration command IDs
Definition at line 759 of file mmagic_controller.h.
| enum mmagic_wlan_var |
wlan configuration variable IDs
| Enumerator | |
|---|---|
| MMAGIC_WLAN_VAR_COUNTRY_CODE | Two character country code used to identify the regulatory domain. |
| MMAGIC_WLAN_VAR_SSID | SSID of the AP to connect to, can be 1-32 characters long. |
| MMAGIC_WLAN_VAR_PASSWORD | Password used when associating, 1-100 characters long. |
| MMAGIC_WLAN_VAR_SECURITY | Security type to used when associating. |
| MMAGIC_WLAN_VAR_RAW_PRIORITY | Priority to request if raw is supported by the AP. Valid priorities are 0-7. -1 disables RAW. |
| MMAGIC_WLAN_VAR_BSSID | BSSID of the ap to associate to, all 0x00 for any. |
| MMAGIC_WLAN_VAR_PMF_MODE | Protected Management Frame mode to use (802.11w). |
| MMAGIC_WLAN_VAR_STATION_TYPE | S1G non-AP STA type. |
| MMAGIC_WLAN_VAR_RTS_THRESHOLD | The RTS threshold (in octets) to set, or 0 to disable. |
| MMAGIC_WLAN_VAR_SGI_ENABLED | Boolean value indicating whether SGI support should be enabled. |
| MMAGIC_WLAN_VAR_SUBBANDS_ENABLED | Boolean value indicating whether sub-band support should be enabled. |
| MMAGIC_WLAN_VAR_AMPDU_ENABLED | Boolean value indicating whether AMPDU support should be enabled. |
| MMAGIC_WLAN_VAR_POWER_SAVE_MODE | Sets the 802.11 power save mode. |
| MMAGIC_WLAN_VAR_FRAGMENT_THRESHOLD | Sets the 802.11 fragmentation threshold. The fragmentation threshold (in octets) to set, or 0 to disable. |
| MMAGIC_WLAN_VAR_CAC_ENABLED | Whether Centralized Authentication Controlled is enabled on the STA. |
| MMAGIC_WLAN_VAR_OFFLOAD_ARP_RESPONSE | If true, enables ARP response offload which allows the Morse chip to directly respond to ARP requests without waking up the host processor. |
| MMAGIC_WLAN_VAR_OFFLOAD_ARP_REFRESH_S | If non zero, enables ARP refresh offload with the specified interval in seconds. Note: ARP response offload needs to be enabled for this feature to work. |
| MMAGIC_WLAN_VAR_MIN_HEALTH_CHECK_INTVL_MS | The minimum interval to wait after the last health check before triggering another. If this parameter is 0 then health checks will always happen at the max_interval_ms value. min_interval_ms must always be less than or equal to max_interval_ms. If only min_health_check_intvl_ms is specified, then max_health_check_intvl_ms is assumed to be unbounded. |
| MMAGIC_WLAN_VAR_MAX_HEALTH_CHECK_INTVL_MS | The maximum interval to wait after the last health check before triggering another. If this parameter is 0 then periodic health checks will be disabled. min_interval_ms must always be less than or equal to max_interval_ms. Set this to UINT32_MAX to have the maximum unbounded. If only max_health_check_intvl_ms is specified, then min_health_check_intvl_ms is assumed to be 0. |
| MMAGIC_WLAN_VAR_NDP_PROBE_ENABLED | Boolean value indicating whether NDP probe support should be enabled. Will only take effect after a connect or scan command is sent. |
| MMAGIC_WLAN_VAR_STA_SCAN_INTERVAL_BASE_S | The base scan interval (in seconds) to use when (re)connecting. See documentation of mmwlan_sta_args.scan_interval_base_s for further details. Note that changes will only take effect on invocation of wlan-connect. |
| MMAGIC_WLAN_VAR_STA_SCAN_INTERVAL_LIMIT_S | The maximum interval between scan attempts when (re)connecting. See documentation of mmwlan_sta_args.scan_interval_limit_s for further details. Note that changes will only take effect on invocation of wlan-connect. |
| MMAGIC_WLAN_VAR_QOS_0_PARAMS | The default QoS queue configuration for Access Category 0 (AC_BE) that is active while the station is connecting to an Access Point. This is a string containing the following comma separated integer values (in order): |
| MMAGIC_WLAN_VAR_QOS_1_PARAMS | The default QoS queue configuration for Access Category 1 (AC_BK) that is active while the station is connecting to an Access Point. This is a string containing the following comma separated integer values (in order): |
| MMAGIC_WLAN_VAR_QOS_2_PARAMS | The default QoS queue configuration for Access Category 2 (AC_VI) that is active while the station is connecting to an Access Point. This is a string containing the following comma separated integer values (in order): |
| MMAGIC_WLAN_VAR_QOS_3_PARAMS | The default QoS queue configuration for Access Category 3 (AC_VO) that is active while the station is connecting to an Access Point. This is a string containing the following comma separated integer values (in order): |
| MMAGIC_WLAN_VAR_MCS10_MODE | The currently configured MCS10 behavior. This only takes effect after calling the WLAN connect command. This is an enum with 3 modes: disabled, which will never use MCS10, forced, which will always use MCS10 instead of MCS0 if the bandwidth is 1 MHz, and auto, which will use MCS10 on retries instead of MCS0 when the bandwidth is 1 MHz. |
| MMAGIC_WLAN_VAR_STA_EVT_EN | When set to true, STA event notifications will be provided. Setting this to false will suppress these notifications. Defaults to false. |
| MMAGIC_WLAN_VAR_DUTY_CYCLE_MODE | The duty cycle air time distribution mode. The duty cycle mode can be set to spread, where the air time is spread evenly across the window; or burst, where air time is available to be consumed immediately. |
Definition at line 657 of file mmagic_controller.h.
| enum mmagic_status mmagic_controller_agent_sync | ( | struct mmagic_controller * | controller, |
| uint32_t | timeout_ms | ||
| ) |
Sends a sync request to the agent and waits for a sync response.
This function will block waiting for a response from the agent or until the provided timeout duration elapses.
| controller | Controller context. |
| timeout_ms | Duration to wait for a sync response from the agent. |
| enum mmagic_status mmagic_controller_request_agent_reset | ( | struct mmagic_controller * | controller | ) |
Sends a reset request to the agent.
A reset is considered successful when the agent returns a start notification. On success, the controller agent_start_cb function will be executed.
| controller | Controller context. |
| enum mmagic_status mmagic_controller_rx | ( | struct mmagic_controller * | controller, |
| uint8_t | stream_id, | ||
| uint8_t | submodule_id, | ||
| uint8_t | command_id, | ||
| uint8_t | subcommand_id, | ||
| uint8_t * | buffer, | ||
| size_t | buffer_length, | ||
| uint32_t | timeout_ms | ||
| ) |
Waits for a response from the agent.
| controller | Controller context. |
| stream_id | The stream id to wait on. |
| submodule_id | The submodule to wait on. |
| command_id | The command to wait on. |
| subcommand_id | A sub command or resource id if applicable. |
| buffer | A pointer to a buffer to load with any returned data. May be NULL if none. |
| buffer_length | Length of above buffer. |
| timeout_ms | The time in milliseconds to wait for a response from the agent, set to UINT32_MAX for an indefinite wait. |
| enum mmagic_status mmagic_controller_tx | ( | struct mmagic_controller * | controller, |
| uint8_t | stream_id, | ||
| uint8_t | submodule_id, | ||
| uint8_t | command_id, | ||
| uint8_t | subcommand_id, | ||
| const uint8_t * | buffer, | ||
| size_t | buffer_length | ||
| ) |
Sends a command to the agent.
| controller | A user context to be passed. |
| stream_id | The stream id to send this command on. |
| submodule_id | The submodule to target with this command. |
| command_id | The command. |
| subcommand_id | A sub command or resource id if applicable. |
| buffer | A pointer to any data associated with this command. May be NULL if none. |
| buffer_length | Length of above data. |