Jump to content

Unable to bind pointer target socket to Initiator socket


Recommended Posts

HI 

i created pointer of target socket 

tlm_utils :: simple_target_socket_tagged<MODULE> * socket;

in SCTOR()

{

   socket  = new tlm_utils::simple_target_socket__tagged<MODULE> ("My_socket");
}

 

when i am binding the socket 

    Initiator->socket(MODULE->socket )

 

I am getting error 

can any one please help me ...

Link to comment
Share on other sites

This is basic C++, you need to dereference the pointer:

Initiator->socket(*(MODULE->socket));

Using raw pointer and new is discouraged, yyou should use std::unique_ptr. My advise is to spend some time in getting more familiar with modern C++

Link to comment
Share on other sites

55 minutes ago, Eyck said:

This is basic C++, you need to dereference the pointer:

Initiator->socket(*(MODULE->socket));

Using raw pointer and new is discouraged, yyou should use std::unique_ptr. My advise is to spend some time in getting more familiar with modern C++

Thank you .....

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...