本文整理汇总了C++中saj_read_gapi_address函数的典型用法代码示例。如果您正苦于以下问题:C++ saj_read_gapi_address函数的具体用法?C++ saj_read_gapi_address怎么用?C++ saj_read_gapi_address使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了saj_read_gapi_address函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SAJ_FUNCTION
/**
* Class: DDS_WaitSet
* Method: jniDetachCondition
* Signature: (LDDS/Condition;)I
*/
JNIEXPORT jint JNICALL
SAJ_FUNCTION(jniDetachCondition)(
JNIEnv *env,
jobject jwaitSet,
jobject jcondition)
{
gapi_waitSet waitSet;
gapi_condition condition;
waitSet = (gapi_waitSet) saj_read_gapi_address(env, jwaitSet);
condition = (gapi_condition) saj_read_gapi_address(env, jcondition);
return (jint)gapi_waitSet_detach_condition(waitSet, condition);
}
示例2: SAJ_FUNCTION
/**
* Class: org_opensplice_dds_dcps_DataReaderViewImpl
* Method: jniGetQos
* Signature: (LDDS/DataReaderViewQosHolder;)V
*/
JNIEXPORT jint JNICALL
SAJ_FUNCTION(jniGetQos)(
JNIEnv *env,
jobject jdataReaderView,
jobject jqosHolder)
{
gapi_dataReaderViewQos* qos;
gapi_returnCode_t result;
saj_returnCode rc;
jobject jqos;
gapi_dataReaderView dataReaderView;
if(jqosHolder != NULL){
dataReaderView = (gapi_dataReaderView)saj_read_gapi_address(env, jdataReaderView);
jqos = NULL;
qos = gapi_dataReaderViewQos__alloc();
result = gapi_dataReaderView_get_qos(dataReaderView, qos);
if(result == GAPI_RETCODE_OK){
rc = saj_DataReaderViewQosCopyOut(env, qos, &jqos);
gapi_free(qos);
if(rc == SAJ_RETCODE_OK){
(*env)->SetObjectField(env, jqosHolder,
GET_CACHED(dataReaderViewQosHolder_value_fid), jqos);
(*env)->DeleteLocalRef(env, jqos);
} else {
result = GAPI_RETCODE_ERROR;
}
}
} else {
result = GAPI_RETCODE_BAD_PARAMETER;
}
return (jint)result;
}
示例3: SAJ_FUNCTION
/**
* Class: org_opensplice_dds_dcps_TopicImpl
* Method: jniGetAllDataDisposedTopicStatus
* Signature: ()LDDS/AllDataDisposedTopicStatus;
*/
JNIEXPORT jint JNICALL
SAJ_FUNCTION(jniGetAllDataDisposedTopicStatus)(
JNIEnv *env,
jobject jtopic,
jobject jstatusHolder)
{
gapi_topic topic;
jobject jstatus;
gapi_allDataDisposedTopicStatus status;
saj_returnCode rc;
gapi_returnCode_t result;
if(jstatusHolder){
topic = (gapi_topic) saj_read_gapi_address(env, jtopic);
result = gapi_topic_get_all_data_disposed_topic_status(topic, &status);
if(result == GAPI_RETCODE_OK){
rc = saj_statusCopyOutAllDataDisposedTopicStatus(env, &status, &jstatus);
if(rc == SAJ_RETCODE_OK){
(*env)->SetObjectField(env, jstatusHolder,
GET_CACHED(allDataDisposedTopicStatusHolder_value_fid), jstatus);
(*env)->DeleteLocalRef(env, jstatus);
} else {
result = GAPI_RETCODE_ERROR;
}
}
} else {
result = GAPI_RETCODE_BAD_PARAMETER;
}
return (jint)result;
}
示例4: SAJ_FUNCTION
/**
* Class: org_opensplice_dds_dcps_DataWriterImpl
* Method: jniSetListener
* Signature: (LDDS/DataWriterListener;I)I
*/
JNIEXPORT jint JNICALL
SAJ_FUNCTION(jniSetListener)(
JNIEnv *env,
jobject jdataWriter,
jobject jlistener,
jint jmask)
{
struct gapi_dataWriterListener *listener;
gapi_dataWriter dataWriter;
gapi_returnCode_t grc;
dataWriter = (gapi_dataWriter)saj_read_gapi_address(env, jdataWriter);
listener = saj_dataWriterListenerNew(env, jlistener);
if(listener != NULL){
saj_write_java_listener_address(env, dataWriter, listener->listener_data);
}
grc = gapi_dataWriter_set_listener(dataWriter, listener,
(unsigned long int)jmask);
if((grc != GAPI_RETCODE_OK) && (listener != NULL)){
saj_listenerDataFree(env, saj_listenerData(listener->listener_data));
}
return (jint)grc;
}
示例5: SAJ_FUNCTION
/**
* Class: org_opensplice_dds_dcps_PublisherImpl
* Method: jniSetListener
* Signature: (LDDS/PublisherListener;I)I
*/
JNIEXPORT jint JNICALL
SAJ_FUNCTION(jniSetListener)(
JNIEnv *env,
jobject jpublisher,
jobject jlistener,
jint jmask)
{
struct gapi_publisherListener *listener;
gapi_publisher publisher;
gapi_returnCode_t grc;
publisher = (gapi_publisher)saj_read_gapi_address(env, jpublisher);
listener = saj_publisherListenerNew(env, jlistener);
grc = gapi_publisher_set_listener(publisher, listener,
(unsigned long int)jmask);
if(grc == GAPI_RETCODE_OK){
if(listener != NULL){
saj_write_java_listener_address(env, publisher, listener->listener_data);
}
} else if(listener != NULL){
saj_listenerDataFree(env, saj_listenerData(listener->listener_data));
}
return (jint)grc;
}
示例6: SAJ_FUNCTION
/**
* Class: org_opensplice_dds_dcps_SubscriberImpl
* Method: jniLookupDatareader
* Signature: (Ljava/lang/String;)LDDS/DataReader;
*/
JNIEXPORT jobject JNICALL
SAJ_FUNCTION(jniLookupDatareader)(
JNIEnv *env,
jobject jsubscriber,
jstring jtopicName)
{
jobject jreader;
gapi_subscriber subscriber;
gapi_dataReader reader;
const gapi_char* topicName;
jreader = NULL;
reader = GAPI_OBJECT_NIL;
topicName = NULL;
subscriber = (gapi_subscriber)saj_read_gapi_address(env, jsubscriber);
if(jtopicName != NULL){
topicName = (*env)->GetStringUTFChars(env, jtopicName, 0);
}
reader = gapi_subscriber_lookup_datareader(subscriber, topicName);
if (reader != GAPI_OBJECT_NIL){
jreader = saj_read_java_address(reader);
}
if(jtopicName != NULL){
(*env)->ReleaseStringUTFChars(env, jtopicName, topicName);
}
return jreader;
}
示例7: SAJ_FUNCTION
/**
* Class: org_opensplice_dds_dcps_MultiTopicImpl
* Method: jniSetExpressionParameters
* Signature: ([Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL
SAJ_FUNCTION(jniSetExpressionParameters)(
JNIEnv *env,
jobject jmultiTopic,
jobjectArray jexprArray)
{
gapi_multiTopic multiTopic;
gapi_stringSeq *seq;
saj_returnCode rc;
jint jresult;
multiTopic = (gapi_multiTopic) saj_read_gapi_address(env, jmultiTopic);
jresult = (jint)GAPI_RETCODE_BAD_PARAMETER;
rc = SAJ_RETCODE_OK;
seq = gapi_stringSeq__alloc();
if(jexprArray != NULL){
rc = saj_stringSequenceCopyIn(env, jexprArray, seq);
}
if(rc == SAJ_RETCODE_OK){
jresult = (jint)gapi_multiTopic_set_expression_parameters(
multiTopic, seq);
}
gapi_free(seq);
return jresult;
}
示例8: SAJ_FUNCTION
/**
* Class: org_opensplice_dds_dcps_EntityImpl
* Method: jniGetStatuscondition
* Signature: ()LDDS/StatusCondition;
*/
JNIEXPORT jobject JNICALL
SAJ_FUNCTION(jniGetStatuscondition)(
JNIEnv *env,
jobject jentity)
{
gapi_entity entity;
gapi_statusCondition condition;
jobject jcondition;
saj_returnCode rc;
jcondition = NULL;
entity = (gapi_entity)saj_read_gapi_address(env, jentity);
condition = gapi_entity_get_statuscondition(entity);
if(condition != GAPI_OBJECT_NIL){
jcondition = saj_read_java_address(condition);
if(jcondition == NULL){
rc = saj_construct_java_object(env,
PACKAGENAME "StatusConditionImpl",
(PA_ADDRCAST)condition,
&jcondition);
if(rc == SAJ_RETCODE_OK){
saj_write_java_statusCondition_address(env, entity, condition, jcondition);
}
}
}
return jcondition;
}
示例9: SAJ_FUNCTION
/*
* Class: org_opensplice_dds_dcps_FooTypeSupportImpl
* Method: jniFree
* Signature: (Ljava/lang/Object;)I
*/
JNIEXPORT jint JNICALL
SAJ_FUNCTION(jniFree) (
JNIEnv *env,
jclass object,
jobject TypeSupport)
{
gapi_free ((gapi_fooTypeSupport)saj_read_gapi_address (env, TypeSupport));
return GAPI_RETCODE_OK;
}
示例10: SAJ_FUNCTION
/**
* Class: org_opensplice_dds_dcps_ConditionImpl
* Method: jniGetTriggerValue
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL
SAJ_FUNCTION(jniGetTriggerValue)(
JNIEnv *env,
jobject jcondition)
{
gapi_condition condition;
condition = (gapi_condition) saj_read_gapi_address(env, jcondition);
return (jboolean)gapi_condition_get_trigger_value(condition);
}
示例11: SAJ_FUNCTION
/**
* Class: org_opensplice_dds_dcps_ReadConditionImpl
* Method: jniGetInstanceStateMask
* Signature: ()I
*/
JNIEXPORT jint JNICALL
SAJ_FUNCTION(jniGetInstanceStateMask)(
JNIEnv *env,
jobject jreadCondition)
{
gapi_readCondition readCondition;
readCondition = (gapi_readCondition) saj_read_gapi_address(env, jreadCondition);
return (jint)gapi_readCondition_get_instance_state_mask(readCondition);
}
示例12: SAJ_FUNCTION
/**
* Class: org_opensplice_dds_dcps_GuardConditionImpl
* Method: jniSetTriggerValue
* Signature: (Z)V
*/
JNIEXPORT jint JNICALL
SAJ_FUNCTION(jniSetTriggerValue)(
JNIEnv *env,
jobject jguardCondition,
jboolean jvalue)
{
gapi_guardCondition guardCondition;
guardCondition = (gapi_guardCondition) saj_read_gapi_address(env,
jguardCondition);
return (jint)gapi_guardCondition_set_trigger_value(guardCondition,
(const gapi_boolean)jvalue);
}