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

change participant name to SafeDDS_Intel_Realsense_PoC + add compile … #48

Open
wants to merge 6 commits into
base: POC
Choose a base branch
from

Conversation

ynahum
Copy link

@ynahum ynahum commented Dec 4, 2022

…time flags for bypassing h2e/e2h pub/sub and bypass time sync code + debug prints

…time flags for bypassing h2e/e2h pub/sub and bypass time sync code + debug prints
@@ -106,11 +109,17 @@ int main( int argc, char** argv ) try
}
}

LOG_DEBUG( "domain id: " << domain);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already output when the participant comes online...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK will remove

@@ -72,10 +72,14 @@ int main( int argc, char** argv ) try
TCLAP::CmdLine cmd( "POC host computer", ' ' );
TCLAP::SwitchArg debug_arg( "", "debug", "Enable debug logging", false );
TCLAP::ValueArg< realdds::dds_domain_id > domain_arg( "d", "domain", "select domain ID to listen on", false, 0, "0-232" );
TCLAP::SwitchArg op_pub_sub_arg( "o", "op-pub-sub", "create op pub and sub", false );
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it automatically false if the time-sync is 0?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right. will not read/use time sync if no pub/sub

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I meant is that it's not needed -- just set the time-sync to 0 and e2h and h2e aren't needed any more...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it as if we need them for other usages

}

bool time_sync_enabled = false;
int time_sync_num_of_iterations = 0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above says the default is 10... this is confusing.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK will remove this variable


auto participant = std::make_shared< realdds::dds_participant >();
participant->init( domain, "poc-h" );
LOG_DEBUG( "init participant");
participant->init( domain, "SafeDDS_Intel_Realsense_PoC" );
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Participant name should be name of participant and should be distinctive. In this case, it shouldn't be the same as the embedded side.

LOG_DEBUG( "init participant");
participant->init( domain, "SafeDDS_Intel_Realsense_PoC" );
LOG_INFO( "init participant");
participant->init( domain, "POC_domain" );
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was wrong with poc-h?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NP

{
int64_t avg_time_offset = 0;
for( uint64_t i = 0; i < n_reps; ++i )
{
auto t0_ = realdds::now().to_ns();
h2e.write( poc::op_payload::SYNC, i, t0_ );
auto data = e2h.read( std::chrono::seconds( 3 ) );
auto data = e2h.read( std::chrono::seconds( 300 ) );
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should stay 3, no?

Copy link
Author

@ynahum ynahum Dec 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to block to inf

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

Successfully merging this pull request may close these issues.

2 participants