Renesas M3T-MR100 Network Card User Manual


 
- 20 -
3.3 Object
The object operated by the service call of a semaphore, a task, etc. is called an "object." An object is identified by the ID
number
3.3.1 The specification method of the object in a service call
Each task is identified by the ID number internally in MR100.
For example, the system says, "Start the task having the task ID number 1."
However, if a task number is directly written in a program, the resultant program would be very low in readability. If, for
instance, the following is entered in a program, the programmer is constantly required to know what the No. 2 task is.
act_tsk(2);
Further, if this program is viewed by another person, he/she does not understand at a glance what the No. 2 task is. To avoid
such inconvenience, the MR100 provides means of specifying the task by name (function or symbol name).
The program named "configurator cfg100 ,"which is supplied with the MR100, then automatically converts the task name
to the task ID number. This task identification system is schematized in Figure 3.14.
ID number
Name
Real-time OSProgram
Configurator
sta_tsk(Task name)
Starting the task
having the designated
ID number
Figure 3.14 Task Identification
act_tsk(ID_task);
This example specifies that a task corresponding to "ID_task" be invoked.
It should also be noted that task name-to-ID number conversion is effected at the time of program generation. Therefore,
the processing speed does not decrease due to this conversion feature.