DDS_DataWriter_write_untyped_generalI:not enabled

3 posts / 0 new
Last post
Offline
Last seen: 2 days 2 hours ago
Joined: 01/13/2016
Posts: 58
DDS_DataWriter_write_untyped_generalI:not enabled

Hello,

My program reported this error “DDS_DataWriter_write_untyped_generalI:not enabled”.

there is my codes

public boolean CreateTopic(String topicname, String typename, int dt, String struname, int row, int col, int InOut)

{

m_dt = dt;

m_elements = row * col;

m_topicname = topicname;

m_typename = typename;

 

portTc = DynamicTopic_create();

if (portTc != null)

portTc.print_IDL(0);

 

DynamicDataTypeProperty_t props = new DynamicDataTypeProperty_t();

portTS = new DynamicDataTypeSupport(portTc, props);

portTS.register_type(m_domainParticipant, typename);

portTopic = m_domainParticipant.create_topic(topicname, typename, m_domainParticipant.TOPIC_QOS_DEFAULT, null, StatusKind.STATUS_MASK_NONE);

 

if ((InOut & 0x2) == 0x2)

{

DataWriterQos datawriter_qos = new DataWriterQos();

m_publisher.get_default_datawriter_qos(datawriter_qos);

datawriter_qos.history.depth = 100;

datawriter_qos.reliability.kind = ReliabilityQosPolicyKind.RELIABLE_RELIABILITY_QOS;

 

portData = new DynamicData(portTc, DynamicData.PROPERTY_DEFAULT);

portWriter = m_publisher.create_datawriter(portTopic, datawriter_qos, null, StatusKind.STATUS_MASK_NONE);

portDataWriter = (DynamicDataWriter)portWriter;

}

 

if ((InOut & 0x1) == 0x1)

{

DataReaderQos datareader_qos = new DataReaderQos();

m_subscriber.get_default_datareader_qos(datareader_qos);

datareader_qos.history.depth = 100;

datareader_qos.reliability.kind = ReliabilityQosPolicyKind.RELIABLE_RELIABILITY_QOS;

 

portReader = m_subscriber.create_datareader(portTopic, datareader_qos, null, StatusKind.STATUS_MASK_NONE);

portDataReader = (DynamicDataReader)portReader;

portCondition = portReader.get_statuscondition();

portWaitSet = new WaitSet();

portWaitSet.attach_condition(portCondition);

}

 

return true;

}

 

and some variables define:

 

private TypeCode portTc;

private DynamicDataTypeSupport portTS;

private Topic portTopic;

private DynamicData portData;

private DataWriter portWriter;

private DataReader portReader;

private DynamicDataWriter portDataWriter;

private DynamicDataReader portDataReader;

private StatusCondition portCondition;

private WaitSet portWaitSet;

 

when i run this program, it turns out that 

"DDS_DataWriter_write_untyped_generalI:not enabled , DDS_DynamicDataWriter_write:!write"

why?

Keywords:
Offline
Last seen: 2 days 2 hours ago
Joined: 01/13/2016
Posts: 58

what i'm confused about is when i call "portDataWriter.write(portData, InstanceHandle_t.HANDLE_NIL);" it cameout that 

DDS_DataWriter_write_untyped_generalI:not enabled

and 

DDS_DynamicDataWriter_write:!write

 

which step is wrong?

Howard's picture
Offline
Last seen: 1 day 15 hours ago
Joined: 11/29/2012
Posts: 565

Sorry, without actually trying to run your program, there's not enough information in your post to determine what the problem is.

I suggest that you set the verbosity of Connext DDS to a higher level and see if that give you additional information that you can use.