diff --git a/Samples/AZX_Docs/html/annotated.html b/Samples/AZX_Docs/html/annotated.html index d1fc7bb..d535bd1 100644 --- a/Samples/AZX_Docs/html/annotated.html +++ b/Samples/AZX_Docs/html/annotated.html @@ -34,7 +34,7 @@
CAZX_LOG_CFG_T | Logging configuration structure |
CAZX_TASKS_MESSAGE_T | Structure holding the task message data |
![]() |
+
+ AZX (AppZone eXtensions) documentation
+ 1.0.6
+
+ A set of companion utilities that make AZ development easier
+ |
+
Tasks related utilities. +More...
+Go to the source code of this file.
++Data Structures | |
struct | AZX_TASKS_MESSAGE_T |
Structure holding the task message data. More... | |
+Macros | |
Stack defines | |
Available ranges for tasks + | |
#define | AZX_TASKS_MIN_STACK_SIZE 1024 |
#define | AZX_TASKS_MAX_STACK_SIZE 32768 |
#define | AZX_TASKS_MIN_QUEUE_SIZE 1 |
#define | AZX_TASKS_MAX_QUEUE_SIZE 100 |
#define | AZX_TASKS_PRIORITY_MAX 1 |
#define | AZX_TASKS_PRIORITY_MIN 32 |
#define | AZX_TASKS_MAX_TASKS 32 |
#define | AZX_TASKS_QUEUE_MSG_SIZE 3 |
#define | AZX_TASKS_TASK_NAME_SIZE 64 |
+Typedefs | |
typedef INT32(* | USER_TASK_CB) (INT32, INT32, INT32) |
Task user callback signature. More... | |
+Enumerations | |
enum | AZX_TASKS_ERR_E { + AZX_TASKS_OK = 1, +AZX_TASKS_NOTINIT_ERR = -1, +AZX_TASKS_WRONG_PRIO_ERR = -2, +AZX_TASKS_STACK_SIZE_ERR = -3, + + AZX_TASKS_MSG_Q_SIZE_ERR = -4, +AZX_TASKS_NO_FREE_SLOTS_ERR = -5, +AZX_TASKS_ALLOC_ERR = -6, +AZX_TASKS_Q_ATTRIB_SET_ERR = -7, + + AZX_TASKS_Q_INIT_ERR = -8, +AZX_TASKS_ATTRIB_SET_ERR = -9, +AZX_TASKS_CREATE_ERR = -10, +AZX_TASKS_INVALID_ID_ERR = -20, + + AZX_TASKS_ID_NOT_DEFINED_ERR = -21, +AZX_TASKS_MSG_SEND_ERR = -22 + + } |
Task related return codes. More... | |
enum | AZX_TASKS_STACK_SIZE { + AZX_TASKS_STACK_S = 2048, +AZX_TASKS_STACK_M = 4096, +AZX_TASKS_STACK_L = 8192, +AZX_TASKS_STACK_XL = 16384, + + M2M_OS_TASK_STACK_LIMIT = 32768 + + } |
Task convenient task size values. More... | |
enum | AZX_TASKS_MBOX_SIZE { AZX_TASKS_MBOX_S = 10, +AZX_TASKS_MBOX_M = 50, +AZX_TASKS_MBOX_L = 100, +AZX_TASKS_MBOX_LIMIT = AZX_TASKS_MBOX_L + } |
Task convenient message box size values. More... | |
+Functions | |
INT32 | azx_tasks_init (void) |
Initializes the parameters needed to use tasks. More... | |
INT32 | azx_tasks_createTask (CHAR *task_name, INT32 stack_size, INT32 priority, INT32 msg_q_size, USER_TASK_CB cb) |
Creates a new user task. More... | |
INT32 | azx_tasks_destroyTask (INT8 task_id) |
Destroys an user task. More... | |
INT32 | azx_tasks_sendMessageToTask (INT8 task_id, INT32 type, INT32 param1, INT32 param2) |
Sends a message to a task. More... | |
INT32 | azx_tasks_getCurrentTaskId (void) |
Retrieves the current task ID value. More... | |
CHAR * | azx_tasks_getCurrentTaskName (CHAR *name) |
Retrieves the current task name string. More... | |
INT32 | azx_tasks_getEnqueuedCount (INT8 task_id) |
Tasks related utilities.
+Functions usable to simplify the tasks creation and usage (instead of directly using m2mb_os_q.h low level APIs, which in turn allow much greater control of the tasks)
+The library is modelled after the way tasks were handled in the old M2M API.
+INT32 azx_tasks_getEnqueuedCount | +( | +INT8 | +task_id | ) | ++ |
Returns the number of messages in the queue of a task.
+[in] | The | ID of the task whose queue should be checked. |
![]() |
+
+ AZX (AppZone eXtensions) documentation
+ 1.0.6
+
+ A set of companion utilities that make AZ development easier
+ |
+
![]() |
+
+ AZX (AppZone eXtensions) documentation
+ 1.0.6
+
+ A set of companion utilities that make AZ development easier
+ |
+
This is a detailed example of tasks functions usage.
+
|
-||
AZX_LOG_CFG_T | +AZX_TASKS_MESSAGE_T | |
AZX_LOG_CFG_T | +||
![]() |
+
+ AZX (AppZone eXtensions) documentation
+ 1.0.6
+
+ A set of companion utilities that make AZ development easier
+ |
+
![]() |
+
+ AZX (AppZone eXtensions) documentation
+ 1.0.6
+
+ A set of companion utilities that make AZ development easier
+ |
+
Prints an informative message.
+![]() |
+
+ AZX (AppZone eXtensions) documentation
+ 1.0.6
+
+ A set of companion utilities that make AZ development easier
+ |
+
Functions usable to simplify the tasks creation and usage. +More...
++Data Structures | |
struct | AZX_TASKS_MESSAGE_T |
Structure holding the task message data. More... | |
+Typedefs | |
typedef INT32(* | USER_TASK_CB) (INT32, INT32, INT32) |
Task user callback signature. More... | |
+Enumerations | |
enum | AZX_TASKS_ERR_E { + AZX_TASKS_OK = 1, +AZX_TASKS_NOTINIT_ERR = -1, +AZX_TASKS_WRONG_PRIO_ERR = -2, +AZX_TASKS_STACK_SIZE_ERR = -3, + + AZX_TASKS_MSG_Q_SIZE_ERR = -4, +AZX_TASKS_NO_FREE_SLOTS_ERR = -5, +AZX_TASKS_ALLOC_ERR = -6, +AZX_TASKS_Q_ATTRIB_SET_ERR = -7, + + AZX_TASKS_Q_INIT_ERR = -8, +AZX_TASKS_ATTRIB_SET_ERR = -9, +AZX_TASKS_CREATE_ERR = -10, +AZX_TASKS_INVALID_ID_ERR = -20, + + AZX_TASKS_ID_NOT_DEFINED_ERR = -21, +AZX_TASKS_MSG_SEND_ERR = -22 + + } |
Task related return codes. More... | |
enum | AZX_TASKS_STACK_SIZE { + AZX_TASKS_STACK_S = 2048, +AZX_TASKS_STACK_M = 4096, +AZX_TASKS_STACK_L = 8192, +AZX_TASKS_STACK_XL = 16384, + + M2M_OS_TASK_STACK_LIMIT = 32768 + + } |
Task convenient task size values. More... | |
enum | AZX_TASKS_MBOX_SIZE { AZX_TASKS_MBOX_S = 10, +AZX_TASKS_MBOX_M = 50, +AZX_TASKS_MBOX_L = 100, +AZX_TASKS_MBOX_LIMIT = AZX_TASKS_MBOX_L + } |
Task convenient message box size values. More... | |
+Functions | |
INT32 | azx_tasks_init (void) |
Initializes the parameters needed to use tasks. More... | |
INT32 | azx_tasks_createTask (CHAR *task_name, INT32 stack_size, INT32 priority, INT32 msg_q_size, USER_TASK_CB cb) |
Creates a new user task. More... | |
INT32 | azx_tasks_destroyTask (INT8 task_id) |
Destroys an user task. More... | |
INT32 | azx_tasks_sendMessageToTask (INT8 task_id, INT32 type, INT32 param1, INT32 param2) |
Sends a message to a task. More... | |
INT32 | azx_tasks_getCurrentTaskId (void) |
Retrieves the current task ID value. More... | |
CHAR * | azx_tasks_getCurrentTaskName (CHAR *name) |
Retrieves the current task name string. More... | |
+Stack defines | |
+ | |
#define | AZX_TASKS_MIN_STACK_SIZE 1024 |
#define | AZX_TASKS_MAX_STACK_SIZE 32768 |
#define | AZX_TASKS_MIN_QUEUE_SIZE 1 |
#define | AZX_TASKS_MAX_QUEUE_SIZE 100 |
#define | AZX_TASKS_PRIORITY_MAX 1 |
#define | AZX_TASKS_PRIORITY_MIN 32 |
#define | AZX_TASKS_MAX_TASKS 32 |
#define | AZX_TASKS_QUEUE_MSG_SIZE 3 |
#define | AZX_TASKS_TASK_NAME_SIZE 64 |
Functions usable to simplify the tasks creation and usage.
+#define AZX_TASKS_MAX_QUEUE_SIZE 100 | +
Maximum task message queue size in slots
+ +#define AZX_TASKS_MAX_STACK_SIZE 32768 | +
Maximum task stack size in bytes
+ +#define AZX_TASKS_MAX_TASKS 32 | +
Maximum allowed tasks number
+ +#define AZX_TASKS_MIN_QUEUE_SIZE 1 | +
Minimum task message queue size in slots
+ +#define AZX_TASKS_MIN_STACK_SIZE 1024 | +
Minimum task stack size in bytes
+ +#define AZX_TASKS_PRIORITY_MAX 1 | +
Maximum task priority value
+ +#define AZX_TASKS_PRIORITY_MIN 32 | +
Minimum task priority value
+ +#define AZX_TASKS_QUEUE_MSG_SIZE 3 | +
Size in Words (4 bytes) of each queue message -> struct (INT32 type, INT32 param1, INT32 param2)
#define AZX_TASKS_TASK_NAME_SIZE 64 | +
Maximum task name length
+ +typedef INT32(* USER_TASK_CB) (INT32, INT32, INT32) | +
Task user callback signature.
+This is the structure of the task user callback. Each time a message is received by an user task, a callback with this structure will be called.
+It is responsibility of the user to define the callback logic.
+enum AZX_TASKS_ERR_E | +
Task related return codes.
+Enumerator | |
---|---|
AZX_TASKS_OK | Success + |
AZX_TASKS_NOTINIT_ERR | Task structures not initialized, see azx_tasks_init() + |
AZX_TASKS_WRONG_PRIO_ERR | Priority set in task creation out of bounds + |
AZX_TASKS_STACK_SIZE_ERR | Task stack size set in creation was out of bounds + |
AZX_TASKS_MSG_Q_SIZE_ERR | Task queue size set in creation was out of bounds + |
AZX_TASKS_NO_FREE_SLOTS_ERR | All of the tasks slots (32) are in use, cannot create more tasks + |
AZX_TASKS_ALLOC_ERR | Task resources allocation failed + |
AZX_TASKS_Q_ATTRIB_SET_ERR | Task message queue attributes set failed + |
AZX_TASKS_Q_INIT_ERR | Task message queue init failed + |
AZX_TASKS_ATTRIB_SET_ERR | Task attributes set failed + |
AZX_TASKS_CREATE_ERR | Task creation failed + |
AZX_TASKS_INVALID_ID_ERR | Task id is not valid (out of bounds) + |
AZX_TASKS_ID_NOT_DEFINED_ERR | Task id does not refer to a valid task + |
AZX_TASKS_MSG_SEND_ERR | Error when sending a message to task queue + |
enum AZX_TASKS_MBOX_SIZE | +
enum AZX_TASKS_STACK_SIZE | +
INT32 azx_tasks_createTask | +( | +CHAR * | +task_name, | +
+ | + | INT32 | +stack_size, | +
+ | + | INT32 | +priority, | +
+ | + | INT32 | +msg_q_size, | +
+ | + | USER_TASK_CB | +cb | +
+ | ) | ++ |
Creates a new user task.
+Creates a new user task with the provided stack size, priority, name and message queue size.
+Calling azx_tasks_init() is mandatory before using this.
+[in] | task_name | Name that will be applied to new task. If NULL, the default name "Task<ID_number>" will be given, where <ID_number> is the id of the created task. Max length 64. |
[in] | stack_size | Task stack size in bytes. Can be any value, within the range: AZX_TASKS_MIN_STACK_SIZE - AZX_TASKS_MAX_STACK_SIZE |
[in] | priority | Task priority. The greater the value, the smaller the priority of the task. Accepted range: AZX_TASKS_PRIORITY_MAX - AZX_TASKS_PRIORITY_MIN |
[in] | msg_q_size | Task message queue slots number. Accepted range: AZX_TASKS_MIN_QUEUE_SIZE - AZX_TASKS_MAX_QUEUE_SIZE |
[in] | cb | The user callback that will be executed every time a message is received in task message queue. See USER_TASK_CB for signature. |
INT32 azx_tasks_destroyTask | +( | +INT8 | +task_id | ) | ++ |
Destroys an user task.
+This will destroy the specified user task.
+[in] | task_id | The task id number to be destroyed, range: 1 - AZX_TASKS_MAX_TASKS |
INT32 azx_tasks_getCurrentTaskId | +( | +void | +) | ++ |
Retrieves the current task ID value.
+Retrieves the value of the current running task id (1-32)
+CHAR* azx_tasks_getCurrentTaskName | +( | +CHAR * | +name | ) | ++ |
Retrieves the current task name string.
+[out] | name | The current task name. |
INT32 azx_tasks_init | +( | +void | +) | ++ |
Initializes the parameters needed to use tasks.
+INT32 azx_tasks_sendMessageToTask | +( | +INT8 | +task_id, | +
+ | + | INT32 | +type, | +
+ | + | INT32 | +param1, | +
+ | + | INT32 | +param2 | +
+ | ) | ++ |
Sends a message to a task.
+Sends a message to the provided task id, passing 3 integer parameters as message parameters.
+[in] | task_id | The task id to receive the message range: 1 - AZX_TASKS_MAX_TASKS |
[in] | type | User parameter |
[in] | param1 | User parameter |
[in] | param2 | User parameter |
Configuration of logging functionalities | Configuration functions, macros and enumerators can be used to set the logging channel (Main UART, Auxiliary UART, USB0/ USB1) and the logging mask (which allows to enable each log level independently) |
Usage of logging functionalities | Macros that can be used to actually print log messages |
Usage of tasks example functionalities | Functions usable to simplify the tasks creation and usage |
![]() |
+
+ AZX (AppZone eXtensions) documentation
+ 1.0.6
+
+ A set of companion utilities that make AZ development easier
+ |
+
Structure holding the task message data. + More...
+ +#include <hdr/azx_tasks.h>
+Data Fields | |
INT32 | type |
INT32 | param1 |
INT32 | param2 |
Structure holding the task message data.
+This structure holds the parameters passed with a task message
+INT32 AZX_TASKS_MESSAGE_T::param1 | +
Parameter 1
+ +INT32 AZX_TASKS_MESSAGE_T::param2 | +
Parameter 2
+ +INT32 AZX_TASKS_MESSAGE_T::type | +
Type of message
+ +