Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] Help Regarding TCF Agent C Code

Hi Shashanka,

 

> In which function does the handler to a particular command is getting mapped?

 

In add_command_handler() or add_command_handler2().

 

> How to give commands in the client executed by the C code?

 

tcf <service> <command> <arguments>

 

For example:

 

 

> help

Unknown command: help

Available commands:

  exit       - quit the program

  tcf        - send TCF command

  peers      - show list of known peers

  peerinfo   - show info about a peer

  connect    - connect a peer

  redirect   - redirect connection to another peer

  services   - display list of services for the current connection

> connect TCP:127.0.0.1:1534

Connection established with TCP:127.0.0.1:1534

> tcf SysMonitor getChildren null

["P4","P420","P640","P684","P704","P752","P776","P792","P800","P920","P984","P1

008","P140","P436","P488","P868","P1032","P1084","P1108","P1140","P1396","P1572"

,"P1584","P1592","P1600","P1700","P1924","P1968","P2000","P1324","P1492","P1676"

,"P1864","P2060","P2160","P2200","P2340","P2364","P2680","P2712","P2752","P2820"

,"P2976","P2996","P3036","P2544","P2624","P2484","P3096","P3124","P3132","P3236"

,"P3316","P3328","P3404","P3444","P3548","P3568","P3656","P3992","P4644","P4768"

,"P5128","P5212","P2772","P5448","P3812","P6284","P6460","P6468","P6568","P6664"

,"P6692","P6756","P6804","P6864","P6888","P6980","P7036","P7048","P2360","P6388"

,"P1692","P6776","P6596","P6832","P6876","P6900","P6956","P7596","P7220","P7252"

,"P7848","P392","P600","P5012","P5020","P3792","P4128","P7712","P7404","P2020","

P1420","P400","P7536","P6656","P2864","P2392","P888"]

> 

 

Note that 'main_client.c' is just an example, it is too primitive for any practical use. The real client of TCF agent is Eclipse.

 

Regards,

Eugene

 

From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Shashanka Navada
Sent: Sunday, August 28, 2016 10:40 PM
To: tcf-dev@xxxxxxxxxxx
Subject: [tcf-dev] Help Regarding TCF Agent C Code

 

Hello,

 

I was working on the TCF Agent C code on this link. I have few queries regarding the same and require your help.

 

I am executing two sessions - agent and client - in Visual Studio 2012 Express.

 

  • I am running a session of TCF agent with 'main.c' (in the main filter) enabled.
    • Now, server / agent has been set up.
  • Using another instance of the same solution, I disable 'main.c' and enable 'main_client.c' (in the main filter). 
    • When I execute this instance, client has been set up.
  • Now, I give "connect" command and it connects to TCF agent at 1534 port.

 

Now, my questions are:

  1. In which function does the handler to a particular command is getting mapped? My understanding is that, member "handler" in structure "event_node" in code file "events.c" has the pointer to the function that needs to be executed for a particular command. But, I am unsure of the point where this mapping occurs.
  2. Also, I wanted the list of commands for few services to work on. The documents in this link is talks about TCF command and properties but, not on the command which I need to give in the command line interface of client. How to give commands in the client executed by the C code?

 

Correct me if my understanding is wrong. Thank you for your help.

 

Regards,


Shashanka Navada,

India.
Contact No.: (+91) 81051 81087 | Email: shashankanavada@xxxxxxxxxxx



This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.


Back to the top