当前位置: 首页>>代码示例>>C++>>正文


C++ PH_THROW函数代码示例

本文整理汇总了C++中PH_THROW函数的典型用法代码示例。如果您正苦于以下问题:C++ PH_THROW函数的具体用法?C++ PH_THROW怎么用?C++ PH_THROW使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了PH_THROW函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Java_com_phidgets_Phidget_disableLogging

JNIEXPORT void JNICALL
Java_com_phidgets_Phidget_disableLogging(JNIEnv *env, jclass cls)
{
	int error;
	if ((error = CPhidget_disableLogging()))
		PH_THROW(error);
}
开发者ID:wjvaandrager,项目名称:ros,代码行数:7,代码来源:com_phidgets_Phidget.c

示例2: Java_com_phidgets_Dictionary_nativeGetKey

JNIEXPORT jstring JNICALL
Java_com_phidgets_Dictionary_nativeGetKey(JNIEnv *env, jobject obj, jstring key)
{
    int error;

    char val[1024];

    jboolean iscopy;
    const char *keyString = (*env)->GetStringUTFChars(env, key, &iscopy);

    CPhidgetDictionaryHandle h = (CPhidgetDictionaryHandle)(uintptr_t)
                                 (*env)->GetLongField(env, obj, dictionary_handle_fid);

    if ((error = CPhidgetDictionary_getKey(h, keyString, val, sizeof(val))))
    {
        PH_THROW(error);
        (*env)->ReleaseStringUTFChars(env, key, keyString);
        return NULL;
    }
    else
    {
        (*env)->ReleaseStringUTFChars(env, key, keyString);
        return (*env)->NewStringUTF(env, val);
    }
}
开发者ID:gitter-badger,项目名称:HiveControl,代码行数:25,代码来源:com_phidgets_Dictionary.c

示例3: Java_com_phidgets_ServoPhidget_setServoParameters

JNIEXPORT void JNICALL
Java_com_phidgets_ServoPhidget_setServoParameters(JNIEnv *env, jobject obj, jint index, jdouble minUs, jdouble maxUs, jdouble degrees)
{
	CPhidgetServoHandle h = (CPhidgetServoHandle)(uintptr_t)
	    (*env)->GetLongField(env, obj, handle_fid);
	int error;
	if ((error = CPhidgetServo_setServoParameters(h, index, minUs, maxUs, degrees)))
		PH_THROW(error);
}
开发者ID:2TSIRIS,项目名称:ParkingProject,代码行数:9,代码来源:com_phidgets_ServoPhidget.c

示例4: Java_com_phidgets_Phidget_nativeDelete

JNIEXPORT void JNICALL
Java_com_phidgets_Phidget_nativeDelete(JNIEnv *env, jobject obj)
{
	CPhidgetHandle h = (CPhidgetHandle)(uintptr_t)(*env)->GetLongField(env,
	    obj, handle_fid);
	int error;
	
	if ((error = CPhidget_delete(h)))
		PH_THROW(error);
}
开发者ID:wjvaandrager,项目名称:ros,代码行数:10,代码来源:com_phidgets_Phidget.c

示例5: Java_com_phidgets_FrequencyCounterPhidget_reset

JNIEXPORT void JNICALL
Java_com_phidgets_FrequencyCounterPhidget_reset(JNIEnv *env, jobject obj, jint index)
{
	CPhidgetFrequencyCounterHandle h = (CPhidgetFrequencyCounterHandle)(uintptr_t)
	    (*env)->GetLongField(env, obj, handle_fid);
	int error;

	if ((error = CPhidgetFrequencyCounter_reset(h, index)))
		PH_THROW(error);
}
开发者ID:asteever,项目名称:thirdparty_phidget,代码行数:10,代码来源:com_phidgets_FrequencyCounterPhidget.c

示例6: Java_com_phidgets_Dictionary_create

JNIEXPORT jlong JNICALL
Java_com_phidgets_Dictionary_create(JNIEnv *env, jobject obj)
{
    int error;
    CPhidgetDictionaryHandle dict;

    if ((error = CPhidgetDictionary_create(&dict)))
        PH_THROW(error);
    return (jlong)(uintptr_t)dict;
}
开发者ID:gitter-badger,项目名称:HiveControl,代码行数:10,代码来源:com_phidgets_Dictionary.c

示例7: Java_com_phidgets_Manager_create

JNIEXPORT jlong JNICALL
Java_com_phidgets_Manager_create(JNIEnv *env, jobject obj)
{
	int error;
	CPhidgetManagerHandle phidm;
	
	if ((error = CPhidgetManager_create(&phidm)))
		PH_THROW(error);
	return (jlong)(uintptr_t)phidm; 
}
开发者ID:2TSIRIS,项目名称:ParkingProject,代码行数:10,代码来源:com_phidgets_Manager.c

示例8: Java_com_phidgets_BridgePhidget_getGain

JNIEXPORT jint JNICALL
Java_com_phidgets_BridgePhidget_getGain(JNIEnv *env, jobject obj, jint index)
{
	CPhidgetBridgeHandle h = (CPhidgetBridgeHandle)(uintptr_t)
	    (*env)->GetLongField(env, obj, handle_fid);
	int error;
	CPhidgetBridge_Gain v;
	if ((error = CPhidgetBridge_getGain(h, index, &v)))
		PH_THROW(error);
	return (jint)v;
}
开发者ID:binary42,项目名称:RPi-CTD-Server,代码行数:11,代码来源:com_phidgets_BridgePhidget.c

示例9: Java_com_phidgets_FrequencyCounterPhidget_getFilter

JNIEXPORT jint JNICALL
Java_com_phidgets_FrequencyCounterPhidget_getFilter(JNIEnv *env, jobject obj, jint index)
{
	CPhidgetFrequencyCounterHandle h = (CPhidgetFrequencyCounterHandle)(uintptr_t)
	    (*env)->GetLongField(env, obj, handle_fid);
	int error;
	CPhidgetFrequencyCounter_FilterType v;
	if ((error = CPhidgetFrequencyCounter_getFilter(h, index, &v)))
		PH_THROW(error);
	return (jint)v;
}
开发者ID:asteever,项目名称:thirdparty_phidget,代码行数:11,代码来源:com_phidgets_FrequencyCounterPhidget.c

示例10: Java_com_phidgets_ServoPhidget_getServoType

JNIEXPORT jint JNICALL
Java_com_phidgets_ServoPhidget_getServoType(JNIEnv *env, jobject obj, jint index)
{
	CPhidgetServoHandle h = (CPhidgetServoHandle)(uintptr_t)
	    (*env)->GetLongField(env, obj, handle_fid);
	int error;
	CPhidget_ServoType v;
	if ((error = CPhidgetServo_getServoType(h, index, &v)))
		PH_THROW(error);
	return (jint)v;
}
开发者ID:2TSIRIS,项目名称:ParkingProject,代码行数:11,代码来源:com_phidgets_ServoPhidget.c

示例11: Java_com_phidgets_TemperatureSensorPhidget_getThermocoupleType

JNIEXPORT jint JNICALL
Java_com_phidgets_TemperatureSensorPhidget_getThermocoupleType(JNIEnv *env, jobject obj, jint index)
{
	CPhidgetTemperatureSensorHandle h = (CPhidgetTemperatureSensorHandle)(uintptr_t)
	    (*env)->GetLongField(env, obj, handle_fid);
	int error;
	CPhidgetTemperatureSensor_ThermocoupleType v;
	if ((error = CPhidgetTemperatureSensor_getThermocoupleType(h, index, &v)))
		PH_THROW(error);
	return (jint)v;
}
开发者ID:binary42,项目名称:RPi-CTD-Server,代码行数:11,代码来源:com_phidgets_TemperatureSensorPhidget.c

示例12: Java_com_phidgets_Phidget_nativeEnableLogging

JNIEXPORT void JNICALL
Java_com_phidgets_Phidget_nativeEnableLogging(JNIEnv *env, jclass cls, jint level, jstring file)
{
	int error;
    jboolean iscopy;
    const char *textString = file ? (*env)->GetStringUTFChars(
		env, file, &iscopy) : NULL;
	if ((error = CPhidget_enableLogging(level, (char *)textString)))
		PH_THROW(error);
	(*env)->ReleaseStringUTFChars(env, file, textString);
}
开发者ID:wjvaandrager,项目名称:ros,代码行数:11,代码来源:com_phidgets_Phidget.c

示例13: Java_com_phidgets_Manager_nativeClose

JNIEXPORT void JNICALL
Java_com_phidgets_Manager_nativeClose(JNIEnv *env, jobject obj)
{
	int error;
	
	CPhidgetManagerHandle h = (CPhidgetManagerHandle)(uintptr_t)
	    (*env)->GetLongField(env, obj, manager_handle_fid);

	if ((error = CPhidgetManager_close(h)))
		PH_THROW(error);
}
开发者ID:2TSIRIS,项目名称:ParkingProject,代码行数:11,代码来源:com_phidgets_Manager.c

示例14: Java_com_phidgets_Dictionary_nativeDelete

JNIEXPORT void JNICALL
Java_com_phidgets_Dictionary_nativeDelete(JNIEnv *env, jobject obj)
{
    int error;

    CPhidgetDictionaryHandle h = (CPhidgetDictionaryHandle)(uintptr_t)
                                 (*env)->GetLongField(env, obj, dictionary_handle_fid);

    if ((error = CPhidgetDictionary_delete(h)))
        PH_THROW(error);
}
开发者ID:gitter-badger,项目名称:HiveControl,代码行数:11,代码来源:com_phidgets_Dictionary.c

示例15: Java_com_phidgets_Phidget_waitForAttachment

JNIEXPORT void JNICALL 
Java_com_phidgets_Phidget_waitForAttachment(JNIEnv *env, jobject obj, jint timeout)
{
	CPhidgetHandle h = (CPhidgetHandle)(uintptr_t)(*env)->GetLongField(env,
	    obj, handle_fid);
	int error;
	
	if ((error = CPhidget_waitForAttachment(h, timeout)))
		PH_THROW(error);

	return;
}
开发者ID:wjvaandrager,项目名称:ros,代码行数:12,代码来源:com_phidgets_Phidget.c


注:本文中的PH_THROW函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。