On Tue, 10 Dec 2019 04:28:28 -0800 "Guowei Lv" <guowei@xxxxxxxxxx> wrote: > Hi, > > I have been reading the taskmanager source code, but some parts I do > not understand. > > void TaskManager::query() { > callService("get_process_list", > QJsonValue(QJsonObject({{"processes", QJsonValue()}}))); > callService("get_netstat", QJsonValue()); > } > > void TaskManager::callService(const QString& command, QJsonValue > value) { Message *msg = new Message(); > msg->createRequest("taskmanager", command, value); > qDebug() << "sending message " << msg->toJson(); > m_loop->sendMessage(msg); > delete msg; > } > > This looks to me like the application sends messages like > "get_process_list" to some kind of message loop. My question is where > are these messages defined? And where are these messages get received > the processed? Hi Guowei, Sorry for the late answer. I expected someone more aware of task manager to answer, but... So yes it sends messages to a back end service. The back end service is the taskmanager backend service. That is an important to point in AGL that services are disjoint from applications. The picture is to ensure existing services available to build applications on top of it. So if you don't like the taskmanager look-and-feel (maybe not branded to your firm) just replace the HMI. Here, the service is the service taskmanager, see https://git.automotivelinux.org/apps/agl-service-taskmanager/ About the question of how are the messages defined, this is in debate. You can check the jira ticket https://jira.automotivelinux.org/browse/SPEC-1903 > Is it related to this? > https://docs.automotivelinux.org/docs/en/guppy/apis_services/reference/signaling/signaling/architecture.html I don't think that it is related but I have not checked. > In our case, we have built the image with the command line tool > "filefrag" included. How can I call it from the Qt application? You are free to call a binary from your application, a "exec" or "spawn" or the old "system". Just be aware that it may not have some required privilege. This is intended that execution of applications are under control of security framework. Best regards José Bollo > > Thanks > > Guowei > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#7899): https://lists.automotivelinux.org/g/agl-dev-community/message/7899 Mute This Topic: https://lists.automotivelinux.org/mt/66430094/2167316 Group Owner: agl-dev-community+owner@xxxxxxxxxxxxxxxxxxxxxxxxx Unsubscribe: https://lists.automotivelinux.org/g/agl-dev-community/leave/4543822/883735764/xyzzy [list-automotive-discussions82@xxxxxxxxxxx] -=-=-=-=-=-=-=-=-=-=-=-