ThreadCmd Class¶
Namespace: id3.Devices
Definition¶
typedef struct id3DevicesThreadCmd *ID3_DEVICES_THREAD_CMD;
Usage¶
ID3_DEVICES_THREAD_CMD hThreadCmd{};
int err = id3DevicesThreadCmd_Initialize(&hThreadCmd);
if (err == ID3_SUCCESS) {
    // ...
    id3DevicesThreadCmd_Dispose(&hThreadCmd);
}
Properties¶
Name  | 
Type  | 
Description  | 
|---|---|---|
Defines the callback for executing specific commands within the thread, allowing for dynamic command processing.  | 
||
Sets the process callback, responsible for handling more complex processing tasks that might be queued within the thread.  | 
||
Specifies the main worker thread callback, handling the primary tasks assigned to the thread.  | 
Methods¶
Name  | 
Description  | 
|---|---|
Accesses the semaphore controlling command execution, allowing for the synchronization of command processing.  | 
|
Retrieves the status of the thread’s loop flag, indicating whether the thread is in a continuous operation mode.  | 
|
Obtains the event used to signal the thread to stop, facilitating external control over thread termination.  | 
|
Processes commands queued in the FIFO, taking a generic argument for command-specific data.  | 
|
Dispatches a simple command to be executed by the thread, identified by an integer index.  | 
|
Sends a command along with a data buffer, optionally specifying if the buffer should be released after execution.  | 
|
Sends a command accompanied by up to three integer parameters, providing detailed instruction for command execution.  | 
|
Issues a command that triggers an event upon completion, supporting synchronization with other thread activities.  | 
|
Configures the size of the command queue, determining how many commands can be queued before processing.  | 
|
Alters the thread’s priority, influencing its execution order relative to other system threads.  | 
|
Adjusts the worker thread’s wait time, optimizing thread responsiveness or conserving resources.  | 
|
Initiates the thread, starting its execution cycle and enabling it to process tasks.  | 
|
Safely stops the thread, with an optional timeout to ensure the thread does not hang indefinitely.  | 
|
Waits for a specified command to complete, offering mechanisms to poll command status and apply a timeout.  |