[great-users] Debug via attribute mapping

Joe Porter joe.porter at gmail.com
Fri Aug 10 15:37:51 CDT 2007


I'll post what worked, in case anyone else needs list later:

I added code like the following to the rule in an attribute mapping:

std::set< ECSL_DP::Task > tasks = BusMessage.sender();
std::cout << Task.name() << std::endl;

for ( std::set< ECSL_DP::Task >::iterator idx = tasks.begin(); idx !=
tasks.end(); idx++ )
{
    std::cout << "Linked to ... " << idx->name() << std::endl;
}

std::cout  << std::endl;

The crosslinked relationship is sender() above.
Note that I had to use std::cout, because I couldn't figure out how to pause
the generated code and add "#include <ofstream>".  This is OK, because I was
able to run the GREngine from the command line with this command:

gre.exe Config.mga -dv

My attribute mapping output was added to the results, like this:

C:\src\svn\HCDDES\trunk\Scheduler\Meta>gre Config.mga -dv
GR Engine v1.6.1.
Copyright (c) 2000-2007 ISIS, Vanderbilt University


Engine Started. Loading relevent files...
Start generation. config path= C:\src\svn\HCDDES\trunk\Scheduler\Meta\.\
Start load dll.
Running...

Executing Block TopBlock
    Executing Rule CreateSystems
        -- InputPackets:1 Matches:1 OutputPackets:1
    Executing Rule CreateProcs
        -- InputPackets:1 Matches:2 OutputPackets:2
    Executing Rule CreateBuses
        -- InputPackets:1 Matches:1 OutputPackets:1
    Executing Rule CreateLinks
        -- InputPackets:1 Matches:2 OutputPackets:2
    Executing Rule CreateTasks
        -- InputPackets:1 Matches:3 OutputPackets:3
    Executing Rule CreateMessages
        -- InputPackets:1 Matches:2 OutputPackets:2
    Executing Rule CreateMessages2
        -- InputPackets:1 Matches:4 OutputPackets:4
    Executing Rule FindSenders
BusMessage1
Linked to ... Task2

        -- InputPackets:2 Matches:1 OutputPackets:2
    Executing Rule CreateSenders
        -- InputPackets:2 Matches:6 OutputPackets:6
    Executing Rule CreateSendersN
        -- InputPackets:6 Matches:6 OutputPackets:6

 The Transformation took 3.89seconds
Done!

C:\src\svn\HCDDES\trunk\Scheduler\Meta>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/great-users/attachments/20070810/4f092b40/attachment.htm


More information about the great-users mailing list