On Fri, Sep 19, 2014 at 12:12 PM, Shakthi Kannan <[email protected]> wrote:
> Hi, > > The setup is as follows: > > Device <-> Adapter <-> Agent <-> Client > > The adapter talks to a device and gets data periodically, and converts > it into time|key|value lines, which is sent to the agent. A sample > output of the adapter is: > > 2|execution|INTERRUPTED > 2|tool_id|1 > 2|execution|ACTIVE > 2|execution|READY > > The agent converts this plain text into an XML using 'Devices.xml' and > 'agent.cfg' files. The agent pushes this formed XML to the client > periodically. We will use a simulator for hardware-adapter and curl > for the client, and run the agent. > > For reference, these are the steps to build the cppagent: > > $ git clone https://github.com/mtconnect/cppagent.git > $ cd cppagent > $ mkdir build; cd build > $ cmake .. > $ make > > To test, please try the following: > > #1 From the build/agent folder, copy VMC-3Axis.xml from the simulator > folder: > > $ cp ../../simulator/VMC-3Axis.xml . > > #2 From the build/agent folder, copy agent.cfg from the agent folder: > > $ cp ../../agent/agent.cfg . > > #3 Edit this copied agent.cfg to use: > > Devices = VMC-3Axis.xml > > and set the Host to '127.0.0.1': > > Host = 127.0.0.1 > > #4 Open three terminals. In one of the terminals, start the 'agent' > from the build folder: > > $ ./agent > > Expected output: > > MTConnect Agent Version 1.3.0.4 - built on Fri Sep 19 10:29:53 2014 > > #5 Open a second terminal, and run: > > $ curl localhost:5000/current > > Expected output: > > You will see an XML output. > > #6 In the third terminal, enter into the simulator folder, and run the > adapter simulator: > > $ ruby run_scenario.rb -l -p 7878 --scenario -v simple_scenario_1.txt > > Expected output: > > Waiting on 0.0.0.0 7878 > Client connected > 2014-09-19T05:02:05.072691|execution|INTERRUPTED > Received * PING, responding with pong > 2014-09-19T05:02:07.072925|tool_id|1 > 2014-09-19T05:02:09.073188|execution|ACTIVE > 2014-09-19T05:02:11.073450|execution|READY > 2014-09-19T05:02:13.073701|program|Tap|execution|READY > 2014-09-19T05:02:15.073961|tool_id|2 > Received * PING, responding with pong > 2014-09-19T05:02:17.074220|execution|ACTIVE > 2014-09-19T05:02:19.074549|execution|READY > 2014-09-19T05:02:21.074820|tool_id|3 > 2014-09-19T05:02:23.075074|program|Countersink|execution|ACTIVE > > Every two seconds, from the second terminal, re-run $ curl > localhost:5000/current and you should see a different XML output. If > you see a different XML in the output, please acknowledge the same. > > If things fail, please let me know the output at each stage and the > error you faced. > > Thanks! > > SK > > -- > Shakthi Kannan > http://www.shakthimaan.com > _______________________________________________ > Users mailing list > [email protected] > http://lists.dgplug.org/listinfo.cgi/users-dgplug.org > Hi Shakti, I followed your steps to build cppagent but got the following error [1]. [1]http://fpaste.org/134947/11147722/ Thank You, Subhendu _______________________________________________ Users mailing list [email protected] http://lists.dgplug.org/listinfo.cgi/users-dgplug.org
