Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [dsdp-tcf-dev] Custom TCF Service

Hi Florian,
 
A simple approach to implement "read" command would be to call read(), then send a reply that contains error report, end-of-file flag and data. Data can be encoded with json_write_binary() or formatted into text and sent with json_write_string() - your choice. Clients would need to send multiple "read" commands to read all data.
 
Since read() function is blocking, much better approach is to use asynchronous I/O instead of calling read() directly from command handler. It would allow agent to process other commands while waiting for read() to return. You can see an example of asynchronous implementation of "read" command in filesystem.c
 
Regards,
Eugene


From: dsdp-tcf-dev-bounces@xxxxxxxxxxx [mailto:dsdp-tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Florian Guillochon
Sent: Thursday, July 16, 2009 6:09 AM
To: DSDP TCF dev list
Subject: Re: [dsdp-tcf-dev] Custom TCF Service

Hello,

I'm currently creating my new TCF service. On TCF, I've added a list of trivial commands manipulating the /dev/entry ioctls (GETSIZE, SETSIZE) and I'm now trying to implement the "read" action.
Reading the /dev/entry results in the obtention of binary data that I have to format into text (no problem) and send line by line to Eclipse. My problem is that I don't know how to transfer these lines of text (do I have to use the "intermediate" type of result ?) and how to receive them on the Eclipse side. Do you have any tip to do so ? (I hope I was clear enough for you to understand)

Regards,
Florian

2009/7/9 Florian Guillochon <florian.guillochon@xxxxxxxxx>
I use RSE to propose a cohesive interface with the target (custom terminal subsystem, custom TCF files subsystem, custom actions...).
Ideally, I was thinking about a popup menu action (on a RSE connection) which would fetch data from the target (text, line by line).
That wouldn't bother me to avoid the creation of a subsystem just for this particular action.

Regards,

Florian

2009/7/9 Tarassov, Eugene <eugene.tarassov@xxxxxxxxxxxxx>
Hi Florian,
 
It depends on what you want to achieve. You can, but don't have to create RSE subsystem for the TCF service. TCF is usable without RSE.
 
Regards,
Eugene.


From: dsdp-tcf-dev-bounces@xxxxxxxxxxx [mailto:dsdp-tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Florian Guillochon
Sent: Thursday, July 09, 2009 10:49 AM
To: DSDP TCF dev list
Subject: [dsdp-tcf-dev] Custom TCF Service

Hi,

My new goal is to extend the TCF agent by adding a custom service.
That service should allow the user to open a /dev/ entry on the target, and getting its data (through the channel), in order to display it in Eclipse.
I've been studying the daytime example, but i'm a little confused about the Eclipse-side of the problem.
Do I have to create a new RSE subsystem relative to this service ?

Regards,

Florian

_______________________________________________
dsdp-tcf-dev mailing list
dsdp-tcf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dsdp-tcf-dev




Back to the top