ankitks Posted February 8, 2017 Report Share Posted February 8, 2017 Is there a way to identify each generic payload transactions with id? I need some id that I can print out as my transaction flows from initiator to target via different modules. Thanks Quote Link to comment Share on other sites More sharing options...
ankitks Posted February 10, 2017 Author Report Share Posted February 10, 2017 Looks like I can just use tlm_extention and add static counter there. That will work, right? Quote Link to comment Share on other sites More sharing options...
iamgame Posted July 1, 2020 Report Share Posted July 1, 2020 Hi SC/TLM experts, I have same question/need. Could someone please enlighten ? Are there examples which illustrates usage of gp extensions ? Thanks. Quote Link to comment Share on other sites More sharing options...
iamgame Posted July 1, 2020 Report Share Posted July 1, 2020 Hi All Basically for debugging purpose I want to trace every transaction (Tx) going around in my model. I would like to assign an ID to each Tx so that it becomes easy to trace them. I have following questions in this context. I am in early stages of using TLM . 1. What is best way to annotate each Tx ? a) I am thinking of using extensions in generic payload - following ./tlm-2/examples/lock_example.cpp b) Could there be some generic TLM classes in open source that people developed for this specific purpose ? I am thinking of wrappers around core gp, and enhanced sockets classes which could facilitate monitoring and logging of Tx using IDs. 2. What is best way to switch between debug and release version - wherein debug version each Tx is traced ? I guess, like 1.b, I am again asking if you know of open source wrapper classes which can facilitate this in run time ? Thanks. Quote Link to comment Share on other sites More sharing options...
iamgame Posted July 3, 2020 Report Share Posted July 3, 2020 Dear TLM Experts, Could someone please shed some light on this ? I have been able to create a transactionID using extension in GP. In order to trace how each transaction is progressing in my system, I am thinking of using transport_dbg API of sockets, such that every time a socket sends or receives a Tx - it will get logged. Would this be right / clean way of logging every Tx ? I am not clear yet about who would call transport_dbg (with in socket class) after I register a callback for transport_dbg ? Also when is transport_dbg called when Tx travels via non blocking interfaces of an initiator or target sockets ? Thanks. Quote Link to comment Share on other sites More sharing options...
mm317 Posted July 17, 2020 Report Share Posted July 17, 2020 Can we add one integer to denote id in payload data ? Quote Link to comment Share on other sites More sharing options...
David Black Posted July 18, 2020 Report Share Posted July 18, 2020 Create a class auto-extension with an id that automatically increments. Be sure to include <cstdint> and define it as uintmax_t to ensure portability. You could even automatically add it in your memory manager so that it is always there for your models. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.