int main(int argc, char *argv[]) { const int port = 8888; QApplication app(argc, argv); app.setApplicationName("TrikServer"); trikKernel::ApplicationInitHelper initHelper(app); if (!initHelper.parseCommandLine()) { return 0; } initHelper.init(); QLOG_INFO() << "TrikServer started on port" << port; qDebug() << "Running TrikServer on port" << port; QScopedPointer<trikControl::BrickInterface> brick(trikControl::BrickFactory::create( initHelper.configPath(), trikKernel::Paths::mediaPath())); trikKernel::Configurer configurer( initHelper.configPath() + "/system-config.xml" , initHelper.configPath() + "/model-config.xml" ); QScopedPointer<trikNetwork::MailboxInterface> mailbox(trikNetwork::MailboxFactory::create(configurer)); trikCommunicator::TrikCommunicator communicator(*brick, mailbox.data()); communicator.startServer(port); return app.exec(); }
void Ut_MStatusBarView::testWhenUsingSwipeTapDoesNothing() { initHelper(); mouseDownWorker(START_POINT); mouseUpWorker(START_POINT); QVERIFY(gDBusInterfaceCallModeValue != QDBus::NoBlock); }
ScalarUnaryExpression::ScalarUnaryExpression(const UnaryOperation &operation, Scalar *operand) : Scalar(*operation.resultTypeForArgumentType(operand->getType())), operation_(operation), operand_(operand) { initHelper(false); }
void Ut_MStatusBarView::testWhenSwipeLessThanThresholdStatusIndicatorMenuDoesNotAppear() { initHelper(); mouseDownWorker(START_POINT); mouseMoveWorker(START_POINT + QPointF(0, SWIPE_THRESHOLD - 1)); QVERIFY(gDBusInterfaceCallModeValue != QDBus::NoBlock); }
ComparisonPredicate::ComparisonPredicate(const Comparison &comparison, Scalar *left_operand, Scalar *right_operand) : comparison_(comparison), left_operand_(left_operand), right_operand_(right_operand) { initHelper(false); }
void Ut_MStatusBarView::testStatusIndicatorMenuDisabling() { initHelper(); m_subject->modifiableStyle()->setEnableStatusIndicatorMenu(false); mouseDownWorker(START_POINT); mouseMoveWorker(START_POINT + QPointF(0, SWIPE_THRESHOLD + 1)); QVERIFY(gDBusInterfaceCallModeValue != QDBus::NoBlock); }
void Ut_MStatusBarView::testWhenUsingTapSwipeDoesNothing() { initHelper(); m_subject->modifiableStyle()->setUseSwipeGesture(false); mouseDownWorker(START_POINT); mouseMoveWorker(START_POINT + QPointF(0, SWIPE_THRESHOLD - 1)); QVERIFY(gDBusInterfaceCallModeValue != QDBus::NoBlock); }
void Ut_MStatusBarView::testWhenMouseMovesAboveThresholdStatusIndicatorMenuAppears() { initHelper(); mouseDownWorker(START_POINT); mouseMoveWorker(START_POINT + QPointF(0, SWIPE_THRESHOLD + 1)); QCOMPARE(gDBusInterfaceCallModeValue, QDBus::NoBlock); QCOMPARE(gDBusInterfaceCallMethodValue, QString("open")); }
bool PythonSensor::setProvider(const ssi_char_t *name, IProvider *provider) { if (!_helper) { initHelper(); } return _helper->setProvider(name, provider); }
IChannel *PythonSensor::getChannel(ssi_size_t index) { if (!_helper) { initHelper(); } return _helper->getChannel(index); }
ssi_size_t PythonSensor::getChannelSize() { if (!_helper) { initHelper(); } return _helper->getChannelSize(); }
void PythonSensor::listen_flush() { if (!_helper) { initHelper(); } _helper->listen_flush(); }
void PythonSensor::send_flush() { if (!_helper) { initHelper(); } _helper->send_flush(); }
ssi_size_t PythonFeature::getSampleBytesOut(ssi_size_t sample_bytes_in) { if (!_helper) { initHelper(); } return _helper->getSampleBytesOut(sample_bytes_in); }
ssi_type_t PythonFeature::getSampleTypeOut(ssi_type_t sample_type_in) { if (!_helper) { initHelper(); } return _helper->getSampleTypeOut(sample_type_in); }
const ssi_char_t *PythonObject::getEventAddress() { if (!_helper) { initHelper(); } return _helper->getEventAddress(); }
bool PythonSensor::disconnect() { if (!_helper) { initHelper(); } return _helper->disconnect(); }
void PythonObject::send_enter() { if (!_helper) { initHelper(); } _helper->send_enter(); }
void PythonObject::listen_flush() { if (!_helper) { initHelper(); } _helper->listen_flush(); }
bool PythonObject::setEventListener(IEventListener *listener) { if (!_helper) { initHelper(); } return _helper->setEventListener(listener); }
bool PythonObject::update(ssi_event_t &e) { if (!_helper) { initHelper(); } return _helper->update(e); }
bool PythonObject::update(IEvents &events, ssi_size_t n_new_events, ssi_size_t time_ms) { if (!_helper) { initHelper(); } return _helper->update(events, n_new_events, time_ms); }
void LSHReservoirSampler::restart(LSH *hashFamIn, unsigned int numHashPerFamily, unsigned int numHashFamilies, unsigned int reservoirSize, unsigned int dimension, unsigned int numSecHash, unsigned int maxSamples, unsigned int queryProbes, unsigned int hashingProbes, float tableAllocFraction) { unInit(); initVariables(numHashPerFamily, numHashFamilies, reservoirSize, dimension, numSecHash, maxSamples, queryProbes, hashingProbes, tableAllocFraction); _hashFamily = hashFamIn; initHelper(_numTables, _rangePow, _reservoirSize); }
ssi_size_t PythonFeature::getSampleDimensionOut(ssi_size_t sample_dimension_in) { if (!_helper) { initHelper(); } return _helper->getSampleDimensionOut(sample_dimension_in); }
void PythonFeature::listen_flush() { if (!_helper) { initHelper(); } _helper->listen_flush(); }
void PythonFeature::send_flush() { if (!_helper) { initHelper(); } _helper->send_flush(); }
static void initializeAllHelpers(TestCompiler::JitConfig *jitConfig, TR_RuntimeHelper *helperIDs, void **helperAddresses, int32_t numHelpers) { initializeJitRuntimeHelperTable(false); if (numHelpers > 0) { for (int32_t h=0;h < numHelpers;h++) initHelper(helperAddresses[h], helperIDs[h]); #if defined(LINUXPPC64) && !defined(__LITTLE_ENDIAN__) jitConfig->setInterpreterTOC(((size_t *)helperAddresses[0])[1]); #endif } }
void Ut_MStatusBarView::testTapFunctionality() { initHelper(); m_subject->modifiableStyle()->setUseSwipeGesture(false); // Test that a tap where a release is out of bounds is not recognised mouseDownWorker(START_POINT); mouseUpWorker(START_POINT + QPointF(SCENE_WIDTH, SCENE_WIDTH) * 2); QVERIFY(gDBusInterfaceCallModeValue != QDBus::NoBlock); // Test that a tap where a release is within bounds is recognised mouseDownWorker(START_POINT); mouseUpWorker(START_POINT + QPointF(5,5)); QCOMPARE(gDBusInterfaceCallModeValue, QDBus::NoBlock); QCOMPARE(gDBusInterfaceCallMethodValue, QString("open")); }
void PythonImageConsumer::setMetaData(ssi_size_t size, const void *meta) { if (sizeof(_format_in) != size) { ssi_err("meta data does not describe image format"); } if (!_helper) { initHelper(); } memcpy(&_format_in, meta, size); _has_meta_data = true; ssi_msg(SSI_LOG_LEVEL_BASIC, "format of input image '%dx%dx%dx%d'", _format_in.widthInPixels, _format_in.heightInPixels, _format_in.numOfChannels, _format_in.depthInBitsPerChannel / 8) _helper->setImageFormatIn(_format_in); };
void PythonSensor::run() { if (!_helper) { initHelper(); } _is_providing = _helper->read(_options.block, !_is_providing); if (_is_providing) { if (!_timer) { _timer = new Timer(_options.block); } _timer->wait(); } else { sleep_ms(10); } }