Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast DDS 2.3.0 could not subscribing properly. #2064

Closed
ilikecola opened this issue Jul 13, 2021 · 6 comments
Closed

Fast DDS 2.3.0 could not subscribing properly. #2064

ilikecola opened this issue Jul 13, 2021 · 6 comments

Comments

@ilikecola
Copy link

Expected Behavior

RTPS works properly.

Current Behavior

ReturnCode_t is RETCODE_NO_DATA.

Steps to Reproduce

datawriter code (excerpt)
datawriter

datareader code (excerpt)
datareader

powershell running
running

System information

  • Fast-RTPS version: 2.3.0
  • OS: windows10
  • Network interfaces: lo (127.0.0.1)
@ilikecola
Copy link
Author

The IDL strcuture is:


struct IdentifiedObject {
                @key                TC57CIM::JiangSu::CommonModule::uuidType mRID;
                TC57CIM::JiangSu::CommonModule::String64 name;
            };

struct BreakerStatusProfile : TC57CIM::JiangSu::CommonModule::StatusMessageInfo {
                TC57CIM::JiangSu::BreakerModule::BreakerStatus  breakerStatus; 
                TC57CIM::JiangSu::CommonModule::IEC61850IED  iEC61850IED; 
            };

struct IEC61850IED : TC57CIM::JiangSu::CommonModule::IED {
                sequence<TC57CIM::JiangSu::CommonModule::LogicalDevice,5>  logicalDevice;
            };
struct LogicalDevice : TC57CIM::JiangSu::CommonModule::IdentifiedObject {
                sequence<TC57CIM::JiangSu::CommonModule::DDSDomainparticipant,2>  dDSDomainparticipant; 
            };

@MiguelCompany
Copy link
Member

@ilikecola In order to analyze this properly, we will need the full IDL, including all modules

@ilikecola
Copy link
Author

Here is my full IDL:

module TC57CIM {
    module JiangSu {
        module CommonModule {
            struct IdentifiedObject;
            struct MessageInfo;
            struct StatusMessageInfo;
            struct IED;
            struct IEC61850IED;
            struct LogicalDevice;
            struct DDSDomainparticipant;
            typedef string String64;
            typedef string uuidType;
        };
        module BreakerModule {
            struct BreakerStatusProfile;
        }; /* module BreakerModule */
    };
};

module TC57CIM {
    module JiangSu {
        module CommonModule {
            struct IdentifiedObject {
                @key TC57CIM::JiangSu::CommonModule::uuidType mRID;
                TC57CIM::JiangSu::CommonModule::String64 name;
                @optional TC57CIM::JiangSu::CommonModule::String64 description;
                @optional TC57CIM::JiangSu::CommonModule::String64 aliasName;
            };
            struct MessageInfo : TC57CIM::JiangSu::CommonModule::IdentifiedObject {
                octet __dummy_prevent_empty_class_MessageInfo;
            };
            struct StatusMessageInfo : TC57CIM::JiangSu::CommonModule::MessageInfo {
                octet __dummy_prevent_empty_class_StatusMessageInfo;
            };
            struct IED : TC57CIM::JiangSu::CommonModule::MeasurementValueSourceEx {
                octet __dummy_prevent_empty_class_IED;
            };
            struct IEC61850IED : TC57CIM::JiangSu::CommonModule::IED {
                sequence<TC57CIM::JiangSu::CommonModule::LogicalDevice,5>  logicalDevice;
            };
            struct DDSDomainparticipant : TC57CIM::JiangSu::CommonModule::IdentifiedObject {
                @optional TC57CIM::JiangSu::CommonModule::String64 partition;
            };
            struct LogicalDevice : TC57CIM::JiangSu::CommonModule::IdentifiedObject {
                TC57CIM::JiangSu::CommonModule::String64 inst;
                sequence<TC57CIM::JiangSu::CommonModule::DDSDomainparticipant,2>  dDSDomainparticipant; 
            };
        };
        module BreakerModule {
            struct BreakerStatusProfile : TC57CIM::JiangSu::CommonModule::StatusMessageInfo {
                TC57CIM::JiangSu::CommonModule::IEC61850IED  iEC61850IED; 
            };
        };
    };
};

Here is my pre-compiled binary
x64Win64VS2017.zip

@MiguelCompany
Copy link
Member

@ilikecola I think this may be related with eProsima/Fast-DDS-Gen#60, which was solved by eProsima/Fast-DDS-Gen#61

Could you try changing @key with @Key ?

@ilikecola
Copy link
Author

Thank you!
The problem is solved perfectly!

@davidhjp01
Copy link

davidhjp01 commented Sep 11, 2021

Hi @MiguelCompany I recently tried to create dynamic data using IDL file with -typeobject option. But when I use @Key annotation -typeobject causes segmentation fault when I run GetCompleteXXXObject(). Example idl:

module a
{
	module b
	{
		typedef long long t1;
		struct c
		{
			@Key string aa;
			@Key string bb;
			long cc;
			a::b::t1 dd;
		};
	};
};

Also if I use lower case @key, the subscriber still receives RETCODE_NO_DATA when a publisher sends a DynamicData created by DynamicTypeBuilderFactory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants