--- tags: AVer --- # Draco Ladon ## Thread ### Thread Create ```flow st=>start: start 1 e=>end: end e1=>end: return init=>condition: init attribute stk_sz=>operation: Set Stack Size chk_poli=>condition: FIFO or Run Robin set_poli=>operation: set policy chk_cpu=>condition: cpu != -1 set_cpu=>operation: set CPU create=>operation: create distory=>operation: distory attribute st->init init(yes@success)->stk_sz->chk_poli init(no@failed, right)->e1 chk_poli(yes)->set_poli->chk_cpu chk_poli(no, right)->chk_cpu chk_cpu(yes)->set_cpu->create chk_cpu(no, right)->create create->distory->e ``` ## Ladon ### Main ```flow st=>start: start e=>end: exit set_up=>subroutine: set up poll=>operation: polling net funs=>subroutine: creating function eloop=>inputoutput: event loop tear=>operation: teardown st->set_up->poll->funs->eloop(bottom)->tear->e ``` ### Setup ```flow st=>start: start e=>end: end opt=>operation: load camera option init=>operation: init options read=>operation: read: HW version, MAC address, FW version, serial number stm=>operation: init streaming queue net=>subroutine: init net st->opt->init->read->stm->net->e ``` ### net init ```flow st=>start: start e=>end: end queue=>operation: init queue cli=>condition: new client dev=>operation: get device proxy=>condition: new proxy conn=>operation: connect g_singal ret=>end: return st->queue->cli cli(yes@success)->dev cli(no@failed, right)->ret dev->proxy proxy(yes@success)->conn proxy(no@failed, right)->ret conn->e ``` ## Option ### Option Set ```flow st=>start: CAM_OPT_SET e=>end: return p1=>inputoutput: param 1 "m" p2=>inputoutput: param 2 "w" p3=>inputoutput: param 3 "v" p4=>inputoutput: param 4 "f" f1=>operation: find option instance f2=>operation: find value array max/min/current/default s1=>operation: set value s2=>operation: set if need force run cb=>subroutine: call set callback function st->p1->f1->p2->f2->p3->s1->p4->s2->cb->e ``` ### Get ```flow st=>start: CAM_OPT_GET e=>end: return value p1=>inputoutput: param 1 "m" p2=>inputoutput: param 2 "w" f1=>operation: find option instance f2=>operation: find value array max/min/current/default cb=>subroutine: call get callback function st->p1->f1->p2->f2->cb->e ```