[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [tcf-dev] Adding value-add server
|
Hi,
Making the value-add known to the Target Explorer is done via a very small contribution. The class to implement looks like
public class ValueAdd extends AbstractExternalValueAdd {
@Override
protected IPath getLocation() {
Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
return <path to the value add executable>;
}
}
The Value Add is registerd via plugin.xml:
<extension point="org.eclipse.tcf.te.tcf.core.valueadds">
<valueadd
class="<package>.ValueAdd"
id="MyValueAddID"
label="Value Add"
optional="true">
</valueadd>
</extension>
And
<extension point="org.eclipse.tcf.te.tcf.core.valueaddBindings">
<binding
id="MyValueAddBinding"
valueAddId=" MyValueAddID ">
<enablement>
<with variable="peer">
<instanceof value="org.eclipse.tcf.protocol.IPeer"/>
<adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
<test property="org.eclipse.tcf.te.tcf.locator.isValueAdd" value="false"/>
</adapt>
</with>
</enablement>
</binding>
</extension>
You can extend the enablement to make the value-add to be used only for particular peers or use this standard (minimum) enablement.
That's all you need. The value-add launch and shutdown and the setup of the redirection chain is handled by the Target Explorer.
Best regards, Uwe
> -----Original Message-----
> From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Oberhuber,
> Martin
> Sent: Freitag, 28. Juni 2013 17:23
> To: TCF Development
> Subject: Re: [tcf-dev] Adding value-add server
>
> Hi Vladimir,
>
> The Target Explorer has code that can setup the communication chain for you, it can even launch the
> value-add for you when you connect the agent. But you need to tell is some details (eg location of the
> value-add executable). This is done by registering an extension and writing a tiny bit of Java code
> (ValueAdd / ValueAddLauncher). That bit of setup also helps "hiding" value-add peers which you don't
> want to see in Target Explorer directly.
>
> Our team is currently working on updating the docs, and your questions are very helpful for us to
> understand the gaps. I hope to be able and give you some more details early next week.
>
> The Econ 2009 Tutorial has a commandline example on slide 52, which I also demoed live at that time;
> the commandline example might help you understand what happens under the hood. You can also use
> that to manually setup the communication chain, by launching the value-add on commandline. If you
> launch it with "-i" flag ("interactive") you can enter the "tcf Locator redirect" command on the
> commandline of the value-add. Then what you do in the UI (debugger, RSE, other client) is connect to the
> value-add-peer instead of the real agent but you can execute any command on the agent (through the
> value-add).
> http://download.eclipse.org/tools/tcf/documents/TCF_ECon09.ppt
>
> I hope that this rough outline helps a little for now, feel free to ask any more questions and we'll do our
> best to answer next week.
>
> Thanks,
> Martin
> --
> Martin Oberhuber, SMTS / Product Architect - Development Tools, Wind River direct
> +43.662.457915.85 fax +43.662.457915.6
>
>
> -----Original Message-----
> From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Vladimir Prus
> Sent: Friday, June 28, 2013 4:58 PM
> To: tcf-dev@xxxxxxxxxxx
> Subject: Re: [tcf-dev] Adding value-add server
>
> On 26.06.2013 17:34, Oberhuber, Martin wrote:
> > To build your C value-add on a Linux host, simply take the instructions from here:
> > http://wiki.eclipse.org/TCF/Raspberry_Pi#Building_the_TCF_Agent
> > and you'll find them in agent/obj/GNU/Linux/x86_64/Debug/
> > - tcflog
> > - valueadd
> >
> > Some information about tcflog and the value-add (and the C tools' commandline options in general) is
> on slide 53 of the 2009 TCF Tutorial:
> > http://download.eclipse.org/tools/tcf/documents/TCF_ECon09.ppt
>
> Martin,
>
> thanks for response. But I think I'm still missing something. If I run agent from that directory I can debug,
> everything is fine.
> If I also run valueadd binary it adds another agent in "System Management" view, but it's not clear to me
> what I can do with it.
>
> The source code say:
>
> it supports Locator.redirect command, which can forward TCF traffic to other TCF agents.
>
> but how would I issue such command from Eclipse? When I click on this value-add server, it gives me a
> page of properties, and nothing looks like a redirection. One of the attributes say "Proxy", but I would not
> expect that underlying agent be called proxy and I would not know what to enter in this field either.
>
> What am I missing?
>
> Thanks,
>
> --
> Vladimir Prus
> CodeSourcery / Mentor Graphics
> http://www.mentor.com/embedded-software/
> _______________________________________________
> tcf-dev mailing list
> tcf-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/tcf-dev
> _______________________________________________
> tcf-dev mailing list
> tcf-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/tcf-dev