• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ PH_THROW函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Java_com_phidgets_RFIDPhidget_getLastTagProtocol

JNIEXPORT jint JNICALL
Java_com_phidgets_RFIDPhidget_getLastTagProtocol (JNIEnv *env, jobject obj)
{
	CPhidgetRFIDHandle h = (CPhidgetRFIDHandle)(uintptr_t)
	    (*env)->GetLongField( env, obj, handle_fid);
	int error;
	char *tag;
	CPhidgetRFID_Protocol proto;
	if ((error = CPhidgetRFID_getLastTag2(h, &tag, &proto)))
		PH_THROW(error);

	return (jint)proto;
}
开发者ID:pbehrens,项目名称:ph-doser,代码行数:13,代码来源:com_phidgets_RFIDPhidget.c


示例17: Java_com_phidgets_Phidget_setDeviceLabel

JNIEXPORT void JNICALL
Java_com_phidgets_Phidget_setDeviceLabel(JNIEnv *env, jobject obj, jstring v)
{
	CPhidgetHandle h = (CPhidgetHandle)(uintptr_t)
	    (*env)->GetLongField(env, obj, handle_fid);
	int error;
    jboolean iscopy;
    const char *textString = (*env)->GetStringUTFChars(
                env, v, &iscopy);
	if ((error = CPhidget_setDeviceLabel(h, (char *)textString)))
		PH_THROW(error);
	(*env)->ReleaseStringUTFChars(env, v, textString);
}
开发者ID:wjvaandrager,项目名称:ros,代码行数:13,代码来源:com_phidgets_Phidget.c


示例18: Java_com_phidgets_Phidget_getSerialNumber

JNIEXPORT jint JNICALL
Java_com_phidgets_Phidget_getSerialNumber(JNIEnv *env, jobject obj)
{
	CPhidgetHandle h = (CPhidgetHandle)(uintptr_t)(*env)->GetLongField(env,
	    obj, handle_fid);
	int error;
	int ser;
	
	if ((error = CPhidget_getSerialNumber(h, &ser)))
		PH_THROW(error);

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


示例19: Java_com_phidgets_Dictionary_isAttached

JNIEXPORT jboolean JNICALL
Java_com_phidgets_Dictionary_isAttached(JNIEnv *env, jobject obj)
{
    CPhidgetHandle h = (CPhidgetHandle)(uintptr_t)(*env)->GetLongField(env,
                       obj, dictionary_handle_fid);
    int error;
    int s;

    if ((error = CPhidget_getDeviceStatus(h, &s)))
        PH_THROW(error);

    return s == PHIDGET_ATTACHED;
}
开发者ID:gitter-badger,项目名称:HiveControl,代码行数:13,代码来源:com_phidgets_Dictionary.c


示例20: Java_com_phidgets_Phidget_getDeviceVersion

JNIEXPORT jint JNICALL
Java_com_phidgets_Phidget_getDeviceVersion(JNIEnv *env, jobject obj)
{
	CPhidgetHandle h = (CPhidgetHandle)(uintptr_t)(*env)->GetLongField(env,
	    obj, handle_fid);
	int error;
	int ver;
	
	if ((error = CPhidget_getDeviceVersion(h, &ver)))
		PH_THROW(error);

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ PHeadSetB函数代码示例发布时间:2022-05-30
下一篇:
C++ PH_LOG_HELPER_EXECUTE函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap