I'm creating an simple message program in openDDS. This program uses a publisher and a subscriber. In the publisher I write a message with:
DDS::ReturnCode_t error = message_writer->write(message, DDS::HANDLE_NIL);
When I try to send from 180 bytes to 3012 bytes the writer fails with:
error 10 (== DDS::RETCODE_TIMEOUT)
, after about 260 messages (I'm trying to send 1500 messages). What I find strange is that it works when I send messages that are from 1 <= x < 180 and 3012 > x > 102400+ bytes.
I'm receiving the error on the writer side. Below the writer I do:
if (error != DDS::RETCODE_OK) {
std::cerr << "writer failed because of error" << error << std::endl;
}
my idl file is like so:
module Mess {
struct Mes {
string message;
};};
So this uses TAO string manager. I pass a char* into the message.
Messenger::Message message;
message.message = "some_Message";
Then write the message like before
Participant:
DDS::DomainParticipant_var participant = dpf->create_participant(DOMAIN_ID, PARTICIPANT_QOS_DEFAULT, 0, OpenDDS::DCPS::DEFAULT_STATUS_MASK);
Topic:
DDS::Topic_var topic = participant->create_topic("TopicName", type_name, TOPIC_QOS_DEFAULT, 0, OpenDDS::DCPS::DEFAULT_STATUS_MASK);
Publisher:
DDS::Publisher_var publisher = participant->create_publisher(PUBLISHER_QOS_DEFAULT, 0, OpenDDS::DCPS::DEFAULT_STATUS_MASK);
Writer:
DDS::DataWriter_var writer = publisher->create_datawriter(topic, DATAWRITER_QOS_DEFAULT, 0, OpenDDS::DCPS::DEFAULT_STATUS_MASK);
Any help is well appreciated. Thanks!