Getting a tasks name from the Task ID?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Getting a tasks name from the Task ID?

775件の閲覧回数
ironsean
Contributor V

Did some searching through the community and the docs, but I haven't seen anything yet.

Is it possible to find the task name using just the Task ID?

More info:
I'm trying to create a simple error logging task to log errors onto an SD card. I had the idea that instead of making MFS available to multiple tasks and dealing with potential concurrent writes, I could instead have a single error logging task, with a lw-message queue to act as input. It's pretty simple to pass an error code and taskID to that logging task, but would like to be able to parse that back into the task name before I write it to the file.

Thanks,

Sean

2 返答(返信)

609件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

HI Sean:

I think you can use the function "_task_get_template_ptr", the input is task id, the output is template, and the task name is an element of the template.


Have a nice day,
Daniel

609件の閲覧回数
ironsean
Contributor V

Thanks, I'm giving that a try now.

Also, I've noticed there's an undocumented (that I can find) MFS_Error_text() function that takes an error code and returns a text string of the MFS error. Do you happen to know if there is anything else similar, or a more generic function in MQX?

Sean

0 件の賞賛
返信