Entrypoint Function for LiteOS SDK Device-Cloud Interconnect Components
To connect the LiteOS SDK device-cloud interconnect component Agent Tiny to OceanConnect, create an entrypoint function agent_tiny_entry().
Function |
Description |
void agent_tiny_entry(void) |
Entrypoint function for LiteOS SDK device-cloud interconnect components. This function can be used to initialize Agent Tiny, create report tasks, and call the main function body of Agent Tiny. Parameter list: N/A Return value: null |
Based on the task mechanism provided by the LiteOS kernel, a developer can create a main task main_task, and call the entrypoint function agent_tiny_entry() in the main task to enable the Agent Tiny workflow.
UINT32 creat_main_task() { UINT32 uwRet = LOS_OK; TSK_INIT_PARAM_S task_init_param; task_init_param.usTaskPrio = 0; task_init_param.pcName = "main_task"; task_init_param.pfnTaskEntry = (TSK_ENTRY_FUNC)main_task; task_init_param.uwStackSize = 0x1000; uwRet = LOS_TaskCreate(&g_TskHandle, &task_init_param); if(LOS_OK != uwRet) { return uwRet; } return uwRet; }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot