Home » Eclipse Projects » DSDP - Target Management » Programatically creating a telnet connection?
|
Re: Programatically creating a telnet connection? [message #34836 is a reply to message #34767] |
Wed, 29 April 2009 14:21 |
Martin Oberhuber Messages: 1007 Registered: July 2009 |
Senior Member |
|
|
Hello John,
Right now there is no official API for programmatically creating a
connection. You can do it today through internal non-API with this snippet:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c16
https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c19
With respect to version numbering, the bundle versions are almost always
different than the product versions since they evolve based on different
rules ("technical versions" vs. "market version").
http://wiki.eclipse.org/Version_Numbering
In short, a bundle version is only incremented if that bundle changes.
The version of the entire TM/RSE product, however, is incremented on
every release. That's why after some time, the versions differ.
Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm
John Moule wrote:
> Hi,
>
> I'd like to programmatically create a telnet session, supplying the host
> and port as parameters, which opens in a Terminal view.
>
> I've read a previous post (sorry couldn't figure how to reply to that
> thread):
>
> Programatically creating a connection?
> http://dev.eclipse.org/newslists/news.eclipse.dsdp.tm/msg002 29.html
>
> and followed the bug:
>
> Need API to programmatically open the terminal for a specified connection
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348
>
> I've downloaded TM-terminal-3.0.3.zip and studied the
> org.eclipse.tm.terminal, but am now totally confused as to the API I
> should use to proceed.
>
> Please can anyone provide a short snippet of how I could get started
> with this.
>
> Also I'm confused about the version numbering of org.eclipse.tm.terminal
> - as I said I downloaded (from
> http://download.eclipse.org/dsdp/tm/downloads/drops/R-3.0.3- 200902181300/)
> TM-terminal-3.0.3.zip, but this expands to plugins with versions
> starting "2" (eg: org.eclipse.tm.terminal_2.0.3.v200902181600.jar).
>
> Any help gratefully received.
>
> Cheers john
>
|
|
|
Re: Programatically creating a telnet connection? [message #34900 is a reply to message #34836] |
Fri, 01 May 2009 12:27 |
John Moule Messages: 13 Registered: July 2009 |
Junior Member |
|
|
Hi Martin,
thanks for your reply.
I've adapted the code snippet to my needs, simply replacing Ssh with
Telnet, thus:
/*
* Adapted from the following bug:
* [terminal][api] Need API to programmatically open the terminal for a
specified connection
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c16
*/
private void startTelnetSession(String host, String networkPort) {
ITerminalConnector conn =
TerminalConnectorExtension.makeTerminalConnector(
"org.eclipse.tm.internal.terminal.telnet.TelnetConnector");
if(conn != null) {
//force instantiating the real connector
conn.makeSettingsPage();
TelnetConnector telnetc =
(TelnetConnector)conn.getAdapter(TelnetConnector.class);
if (telnetc != null) {
TelnetSettings settings = (TelnetSettings)
telnetc.getTelnetSettings();
settings.setHost(host);
settings.setNetworkPort(networkPort);
terminal.setConnector(conn);
conn.connect();
}
}
}
... but get compilation errors on the last two lines. I've a couple of
questions:
1) what is the definition of terminal?
2) In my ITerminalConnector
(org.eclipse.tm.terminal_2.0.3.v200902181600.jar) connect has a different
defintion:
void connect(ITerminalControl control);
Thanks for any help.
cheers john
Martin Oberhuber wrote:
> Hello John,
> Right now there is no official API for programmatically creating a
> connection. You can do it today through internal non-API with this snippet:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c16
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c19
> With respect to version numbering, the bundle versions are almost always
> different than the product versions since they evolve based on different
> rules ("technical versions" vs. "market version").
> http://wiki.eclipse.org/Version_Numbering
> In short, a bundle version is only incremented if that bundle changes.
> The version of the entire TM/RSE product, however, is incremented on
> every release. That's why after some time, the versions differ.
> Cheers,
> --
> Martin Oberhuber, Senior Member of Technical Staff, Wind River
> Target Management Project Lead, DSDP PMC Member
> http://www.eclipse.org/dsdp/tm
> John Moule wrote:
>> Hi,
>>
>> I'd like to programmatically create a telnet session, supplying the host
>> and port as parameters, which opens in a Terminal view.
>>
>> I've read a previous post (sorry couldn't figure how to reply to that
>> thread):
>>
>> Programatically creating a connection?
>> http://dev.eclipse.org/newslists/news.eclipse.dsdp.tm/msg002 29.html
>>
>> and followed the bug:
>>
>> Need API to programmatically open the terminal for a specified connection
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348
>>
>> I've downloaded TM-terminal-3.0.3.zip and studied the
>> org.eclipse.tm.terminal, but am now totally confused as to the API I
>> should use to proceed.
>>
>> Please can anyone provide a short snippet of how I could get started
>> with this.
>>
>> Also I'm confused about the version numbering of org.eclipse.tm.terminal
>> - as I said I downloaded (from
>> http://download.eclipse.org/dsdp/tm/downloads/drops/R-3.0.3- 200902181300/)
>> TM-terminal-3.0.3.zip, but this expands to plugins with versions
>> starting "2" (eg: org.eclipse.tm.terminal_2.0.3.v200902181600.jar).
>>
>> Any help gratefully received.
>>
>> Cheers john
>>
|
|
|
Re: Programatically creating a telnet connection? [message #34964 is a reply to message #34900] |
Tue, 12 May 2009 17:36 |
Martin Oberhuber Messages: 1007 Registered: July 2009 |
Senior Member |
|
|
Hi John,
the definition of "terminal" comes from this code:
http://dev.eclipse.org/newslists/news.eclipse.dsdp.tm/msg002 29.html
which is referenced here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c4
instead of conn.connect() I think you need
terminal.connectTerminal();
Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm
John Moule wrote:
> Hi Martin,
>
> thanks for your reply.
>
> I've adapted the code snippet to my needs, simply replacing Ssh with
> Telnet, thus:
>
> /*
> * Adapted from the following bug:
> * [terminal][api] Need API to programmatically open the terminal for a
> specified connection
> * https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c16
> */
> private void startTelnetSession(String host, String networkPort) {
>
> ITerminalConnector conn =
> TerminalConnectorExtension.makeTerminalConnector(
> "org.eclipse.tm.internal.terminal.telnet.TelnetConnector");
> if(conn != null) {
> //force instantiating the real connector
> conn.makeSettingsPage();
> TelnetConnector telnetc =
> (TelnetConnector)conn.getAdapter(TelnetConnector.class);
> if (telnetc != null) {
> TelnetSettings settings = (TelnetSettings)
> telnetc.getTelnetSettings();
> settings.setHost(host);
> settings.setNetworkPort(networkPort);
> terminal.setConnector(conn);
> conn.connect();
> }
> }
> }
>
> .. but get compilation errors on the last two lines. I've a couple of
> questions:
>
> 1) what is the definition of terminal?
>
> 2) In my ITerminalConnector
> (org.eclipse.tm.terminal_2.0.3.v200902181600.jar) connect has a
> different defintion:
>
> void connect(ITerminalControl control);
>
> Thanks for any help.
>
> cheers john
>
>
>
> Martin Oberhuber wrote:
>
>> Hello John,
>
>> Right now there is no official API for programmatically creating a
>> connection. You can do it today through internal non-API with this
>> snippet:
>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c16
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c19
>
>> With respect to version numbering, the bundle versions are almost
>> always different than the product versions since they evolve based on
>> different rules ("technical versions" vs. "market version").
>
>> http://wiki.eclipse.org/Version_Numbering
>
>> In short, a bundle version is only incremented if that bundle changes.
>> The version of the entire TM/RSE product, however, is incremented on
>> every release. That's why after some time, the versions differ.
>
>> Cheers,
>> --
>> Martin Oberhuber, Senior Member of Technical Staff, Wind River
>> Target Management Project Lead, DSDP PMC Member
>> http://www.eclipse.org/dsdp/tm
>
>
>
>
>> John Moule wrote:
>>> Hi,
>>>
>>> I'd like to programmatically create a telnet session, supplying the
>>> host and port as parameters, which opens in a Terminal view.
>>>
>>> I've read a previous post (sorry couldn't figure how to reply to that
>>> thread):
>>>
>>> Programatically creating a connection?
>>> http://dev.eclipse.org/newslists/news.eclipse.dsdp.tm/msg002 29.html
>>>
>>> and followed the bug:
>>>
>>> Need API to programmatically open the terminal for a specified
>>> connection
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348
>>>
>>> I've downloaded TM-terminal-3.0.3.zip and studied the
>>> org.eclipse.tm.terminal, but am now totally confused as to the API I
>>> should use to proceed.
>>>
>>> Please can anyone provide a short snippet of how I could get started
>>> with this.
>>>
>>> Also I'm confused about the version numbering of
>>> org.eclipse.tm.terminal - as I said I downloaded (from
>>> http://download.eclipse.org/dsdp/tm/downloads/drops/R-3.0.3- 200902181300/)
>>> TM-terminal-3.0.3.zip, but this expands to plugins with versions
>>> starting "2" (eg: org.eclipse.tm.terminal_2.0.3.v200902181600.jar).
>>>
>>> Any help gratefully received.
>>>
>>> Cheers john
>>>
>
>
|
|
|
Re: Programatically creating a telnet connection? [message #580577 is a reply to message #34767] |
Wed, 29 April 2009 14:21 |
Martin Oberhuber Messages: 1007 Registered: July 2009 |
Senior Member |
|
|
Hello John,
Right now there is no official API for programmatically creating a
connection. You can do it today through internal non-API with this snippet:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c16
https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c19
With respect to version numbering, the bundle versions are almost always
different than the product versions since they evolve based on different
rules ("technical versions" vs. "market version").
http://wiki.eclipse.org/Version_Numbering
In short, a bundle version is only incremented if that bundle changes.
The version of the entire TM/RSE product, however, is incremented on
every release. That's why after some time, the versions differ.
Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm
John Moule wrote:
> Hi,
>
> I'd like to programmatically create a telnet session, supplying the host
> and port as parameters, which opens in a Terminal view.
>
> I've read a previous post (sorry couldn't figure how to reply to that
> thread):
>
> Programatically creating a connection?
> http://dev.eclipse.org/newslists/news.eclipse.dsdp.tm/msg002 29.html
>
> and followed the bug:
>
> Need API to programmatically open the terminal for a specified connection
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348
>
> I've downloaded TM-terminal-3.0.3.zip and studied the
> org.eclipse.tm.terminal, but am now totally confused as to the API I
> should use to proceed.
>
> Please can anyone provide a short snippet of how I could get started
> with this.
>
> Also I'm confused about the version numbering of org.eclipse.tm.terminal
> - as I said I downloaded (from
> http://download.eclipse.org/dsdp/tm/downloads/drops/R-3.0.3- 200902181300/)
> TM-terminal-3.0.3.zip, but this expands to plugins with versions
> starting "2" (eg: org.eclipse.tm.terminal_2.0.3.v200902181600.jar).
>
> Any help gratefully received.
>
> Cheers john
>
|
|
|
Re: Programatically creating a telnet connection? [message #580617 is a reply to message #34836] |
Fri, 01 May 2009 12:27 |
John Moule Messages: 13 Registered: July 2009 |
Junior Member |
|
|
Hi Martin,
thanks for your reply.
I've adapted the code snippet to my needs, simply replacing Ssh with
Telnet, thus:
/*
* Adapted from the following bug:
* [terminal][api] Need API to programmatically open the terminal for a
specified connection
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c16
*/
private void startTelnetSession(String host, String networkPort) {
ITerminalConnector conn =
TerminalConnectorExtension.makeTerminalConnector(
"org.eclipse.tm.internal.terminal.telnet.TelnetConnector");
if(conn != null) {
//force instantiating the real connector
conn.makeSettingsPage();
TelnetConnector telnetc =
(TelnetConnector)conn.getAdapter(TelnetConnector.class);
if (telnetc != null) {
TelnetSettings settings = (TelnetSettings)
telnetc.getTelnetSettings();
settings.setHost(host);
settings.setNetworkPort(networkPort);
terminal.setConnector(conn);
conn.connect();
}
}
}
... but get compilation errors on the last two lines. I've a couple of
questions:
1) what is the definition of terminal?
2) In my ITerminalConnector
(org.eclipse.tm.terminal_2.0.3.v200902181600.jar) connect has a different
defintion:
void connect(ITerminalControl control);
Thanks for any help.
cheers john
Martin Oberhuber wrote:
> Hello John,
> Right now there is no official API for programmatically creating a
> connection. You can do it today through internal non-API with this snippet:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c16
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c19
> With respect to version numbering, the bundle versions are almost always
> different than the product versions since they evolve based on different
> rules ("technical versions" vs. "market version").
> http://wiki.eclipse.org/Version_Numbering
> In short, a bundle version is only incremented if that bundle changes.
> The version of the entire TM/RSE product, however, is incremented on
> every release. That's why after some time, the versions differ.
> Cheers,
> --
> Martin Oberhuber, Senior Member of Technical Staff, Wind River
> Target Management Project Lead, DSDP PMC Member
> http://www.eclipse.org/dsdp/tm
> John Moule wrote:
>> Hi,
>>
>> I'd like to programmatically create a telnet session, supplying the host
>> and port as parameters, which opens in a Terminal view.
>>
>> I've read a previous post (sorry couldn't figure how to reply to that
>> thread):
>>
>> Programatically creating a connection?
>> http://dev.eclipse.org/newslists/news.eclipse.dsdp.tm/msg002 29.html
>>
>> and followed the bug:
>>
>> Need API to programmatically open the terminal for a specified connection
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348
>>
>> I've downloaded TM-terminal-3.0.3.zip and studied the
>> org.eclipse.tm.terminal, but am now totally confused as to the API I
>> should use to proceed.
>>
>> Please can anyone provide a short snippet of how I could get started
>> with this.
>>
>> Also I'm confused about the version numbering of org.eclipse.tm.terminal
>> - as I said I downloaded (from
>> http://download.eclipse.org/dsdp/tm/downloads/drops/R-3.0.3- 200902181300/)
>> TM-terminal-3.0.3.zip, but this expands to plugins with versions
>> starting "2" (eg: org.eclipse.tm.terminal_2.0.3.v200902181600.jar).
>>
>> Any help gratefully received.
>>
>> Cheers john
>>
|
|
|
Re: Programatically creating a telnet connection? [message #580654 is a reply to message #34900] |
Tue, 12 May 2009 17:36 |
Martin Oberhuber Messages: 1007 Registered: July 2009 |
Senior Member |
|
|
Hi John,
the definition of "terminal" comes from this code:
http://dev.eclipse.org/newslists/news.eclipse.dsdp.tm/msg002 29.html
which is referenced here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c4
instead of conn.connect() I think you need
terminal.connectTerminal();
Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm
John Moule wrote:
> Hi Martin,
>
> thanks for your reply.
>
> I've adapted the code snippet to my needs, simply replacing Ssh with
> Telnet, thus:
>
> /*
> * Adapted from the following bug:
> * [terminal][api] Need API to programmatically open the terminal for a
> specified connection
> * https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c16
> */
> private void startTelnetSession(String host, String networkPort) {
>
> ITerminalConnector conn =
> TerminalConnectorExtension.makeTerminalConnector(
> "org.eclipse.tm.internal.terminal.telnet.TelnetConnector");
> if(conn != null) {
> //force instantiating the real connector
> conn.makeSettingsPage();
> TelnetConnector telnetc =
> (TelnetConnector)conn.getAdapter(TelnetConnector.class);
> if (telnetc != null) {
> TelnetSettings settings = (TelnetSettings)
> telnetc.getTelnetSettings();
> settings.setHost(host);
> settings.setNetworkPort(networkPort);
> terminal.setConnector(conn);
> conn.connect();
> }
> }
> }
>
> .. but get compilation errors on the last two lines. I've a couple of
> questions:
>
> 1) what is the definition of terminal?
>
> 2) In my ITerminalConnector
> (org.eclipse.tm.terminal_2.0.3.v200902181600.jar) connect has a
> different defintion:
>
> void connect(ITerminalControl control);
>
> Thanks for any help.
>
> cheers john
>
>
>
> Martin Oberhuber wrote:
>
>> Hello John,
>
>> Right now there is no official API for programmatically creating a
>> connection. You can do it today through internal non-API with this
>> snippet:
>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c16
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348#c19
>
>> With respect to version numbering, the bundle versions are almost
>> always different than the product versions since they evolve based on
>> different rules ("technical versions" vs. "market version").
>
>> http://wiki.eclipse.org/Version_Numbering
>
>> In short, a bundle version is only incremented if that bundle changes.
>> The version of the entire TM/RSE product, however, is incremented on
>> every release. That's why after some time, the versions differ.
>
>> Cheers,
>> --
>> Martin Oberhuber, Senior Member of Technical Staff, Wind River
>> Target Management Project Lead, DSDP PMC Member
>> http://www.eclipse.org/dsdp/tm
>
>
>
>
>> John Moule wrote:
>>> Hi,
>>>
>>> I'd like to programmatically create a telnet session, supplying the
>>> host and port as parameters, which opens in a Terminal view.
>>>
>>> I've read a previous post (sorry couldn't figure how to reply to that
>>> thread):
>>>
>>> Programatically creating a connection?
>>> http://dev.eclipse.org/newslists/news.eclipse.dsdp.tm/msg002 29.html
>>>
>>> and followed the bug:
>>>
>>> Need API to programmatically open the terminal for a specified
>>> connection
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=185348
>>>
>>> I've downloaded TM-terminal-3.0.3.zip and studied the
>>> org.eclipse.tm.terminal, but am now totally confused as to the API I
>>> should use to proceed.
>>>
>>> Please can anyone provide a short snippet of how I could get started
>>> with this.
>>>
>>> Also I'm confused about the version numbering of
>>> org.eclipse.tm.terminal - as I said I downloaded (from
>>> http://download.eclipse.org/dsdp/tm/downloads/drops/R-3.0.3- 200902181300/)
>>> TM-terminal-3.0.3.zip, but this expands to plugins with versions
>>> starting "2" (eg: org.eclipse.tm.terminal_2.0.3.v200902181600.jar).
>>>
>>> Any help gratefully received.
>>>
>>> Cheers john
>>>
>
>
|
|
|
Goto Forum:
Current Time: Tue Apr 23 06:33:26 GMT 2024
Powered by FUDForum. Page generated in 0.03655 seconds
|