MCPcopy Create free account
hub / github.com/Tencent/Hardcoder / testSystemEvent

Method testSystemEvent

libapp2sys/src/main/cpp/server.cpp:233–257  ·  view source on GitHub ↗

for test system event

Source from the content-addressed store, hash-verified

231
232 //for test system event
233 static void* testSystemEvent(void *args) {
234 sleep(10);
235 ManufacturerCoder *coder = (ManufacturerCoder *) args;
236 coder->onEvent(testSystemEventCode);
237 /**
238 IHardCoderDataCallback *callback = coder->callback;
239 list<int>& cbL = coder->systemEventCallbackList;
240 if (cbL.empty()) {
241 pdbg("testSystemEvent but systemEventCallbackList is empty size:%d", cbL.size());
242 return NULL;
243 }
244
245 amc::DataCallback dataCallback;
246 dataCallback.set_type(1);
247 dataCallback.set_data(testSystemEvent);
248
249 int len = dataCallback.ByteSize();
250 uint8_t body[len];
251 dataCallback.SerializeToArray(body,len);
252 pdbg("testSystemEvent systemEventCallbackList size:%d %d", cbL.size());
253 int64_t ret = callback->onCallback(cbL.front(), FUNC_REG_SYSTEM_EVENT_CALLBACK, body, len);
254 **/
255 pdbg("testSystemEvent exit tid:%d", gettid());
256 return NULL;
257 }
258
259 // for test anr
260 static void* testANR(void *args) {

Callers

nothing calls this directly

Calls 1

onEventMethod · 0.80

Tested by

no test coverage detected