Ejemplo n.º 1
0
void SensorRule::onHeartRateSelectChanged(QString value)
{
    OC::OCRepresentation rep;

    rep.setValue("heartRate", value.toInt());

    m_resource->put(rep, OC::QueryParamsMap(), IoTivity::onPut);
}
Ejemplo n.º 2
0
JNIEXPORT void JNICALL setValueString(JNIEnv *env, jobject jobj, jstring jstr, jstring jval)
{
    OC::OCRepresentation *rep = getHandle<OC::OCRepresentation>(env, jobj);
	string str = env->GetStringUTFChars(jstr,0);
	string val = env->GetStringUTFChars(jval,0);

    rep->setValue(str, val);
}
Ejemplo n.º 3
0
void SensorRule::onCrazyJumpingChecked(bool checkedState)
{
    bool state;
    OC::OCRepresentation rep;

    if (m_resource == nullptr)
        return;

    state = checkedState == Qt::Unchecked ? false : true;

    rep.setValue(IoTivity::IOTIVITY_CRAZY_JUMPING_RULE, state);

    m_resource->put(rep, OC::QueryParamsMap(), IoTivity::onPut);
}