本文整理汇总了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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}