Object construction and destruction
| 533 | |
| 534 | // Object construction and destruction |
| 535 | Analyzer::Analyzer(AnalyzerParams ¶ms, Source::Config const &config) |
| 536 | { |
| 537 | this->requestId = SCAST(uint32_t, rand() ^ (rand() << 16)); |
| 538 | this->inspectorId = SCAST(uint32_t, rand() ^ (rand() << 16)); |
| 539 | |
| 540 | assertTypeRegistration(); |
| 541 | |
| 542 | SU_ATTEMPT(this->instance = suscan_analyzer_new( |
| 543 | ¶ms.getCParams(), |
| 544 | config.instance, |
| 545 | &mq.mq)); |
| 546 | |
| 547 | this->asyncThread = new AsyncThread(this); |
| 548 | |
| 549 | connect( |
| 550 | this->asyncThread, |
| 551 | SIGNAL(message(quint32, void *)), |
| 552 | this, |
| 553 | SLOT(captureMessage(quint32, void *)), |
| 554 | Qt::QueuedConnection); |
| 555 | |
| 556 | this->asyncThread->start(); |
| 557 | } |
| 558 | |
| 559 | Analyzer::~Analyzer() |
| 560 | { |