User Tools

Site Tools


proj:gatd:walkthroughs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
proj:gatd:walkthroughs [2014/07/10 22:27]
mclarkk [How to send a new type of data stream to GATD]
proj:gatd:walkthroughs [2014/07/22 23:01] (current)
mclarkk [How to send a new type of data stream to GATD]
Line 18: Line 18:
 Make sure you have checked out the two Git repos [[https://​github.com/​lab11/​gatd|lab11/​gatd]],​ [[https://​github.com/​lab11/​gatd-lab11|lab11/​gatd-lab11]],​ and our SVN repo, [[priv:​shed:​start|shed]],​ which contains private configuration information specific to our instance of GATD under shed/​projects/​gatd in gatd.config. Make sure you have checked out the two Git repos [[https://​github.com/​lab11/​gatd|lab11/​gatd]],​ [[https://​github.com/​lab11/​gatd-lab11|lab11/​gatd-lab11]],​ and our SVN repo, [[priv:​shed:​start|shed]],​ which contains private configuration information specific to our instance of GATD under shed/​projects/​gatd in gatd.config.
  
-You have to do some crazy thing with gatd.config so that all of the scripts that communicate with our instance of GATD magically work.+You will have to copy our specific ​gatd.config from shed into gatd-lab11/config so that all of the scripts ​in the gatd-lab11 repo that communicate with our instance of GATD magically work.
  
 === 1. Obtaining a profile ID === === 1. Obtaining a profile ID ===
  
-In the lab11/gatd repo, go to the scripts directory. Run ''​python profile.py %%--%%parser PARSER'',​ where ''​PARSER''​ is going to be the class name of the formatter you will write in a bit (sorry, there is no way to order these instructions without forward references). You can find examples of formatter class names in [[https://​github.com/​lab11/​gatd-lab11/​tree/​master/​formatters|lab11/​gatd-lab11/​formatters]]. The formatter class names follow the general format ''​deviceNameParser'',​ where the class name should be written in camelCase and end with ''​Parser''​. ​+In the (Github) ​gatd repo, go to the scripts directory. Run ''​python profile.py %%--%%parser PARSER'',​ where ''​PARSER''​ is going to be the class name of the formatter you will write in a bit (sorry, there is no way to order these instructions without forward references). You can find examples of formatter class names in [[https://​github.com/​lab11/​gatd-lab11/​tree/​master/​formatters|lab11/​gatd-lab11/​formatters]]. The formatter class names follow the general format ''​deviceNameParser'',​ where the class name should be written in camelCase and end with ''​Parser''​. ​
  
 Since this is a new parser, the script will ask you if you want to generate a new profile ID for that parser. You sure do. Since this is a new parser, the script will ask you if you want to generate a new profile ID for that parser. You sure do.
Line 47: Line 47:
 === 3. Writing a formatter within GATD === === 3. Writing a formatter within GATD ===
  
-You write the formatter ​in lab11/gatd-lab11. ​Lots of examples of formatters already there. If you use HTTP POST, it's all translated into JSON for you by the receiver. Convenient!+You write the formatter ​and add it to gatd-lab11/formattersThe easiest way to figure this out is to look at the many formatters already there. If you use HTTP POST, it's all translated into JSON for you by the receiver. Convenient!
  
 Once you write a formatter and check it in to the repo, it //should// be automatically incorporated into the GATD instance running on inductor. However, this can be a bit tricky. If the automatic integration doesn'​t work, let Brad know so that he can figure out why and make sure your formatter gets deployed. Once you write a formatter and check it in to the repo, it //should// be automatically incorporated into the GATD instance running on inductor. However, this can be a bit tricky. If the automatic integration doesn'​t work, let Brad know so that he can figure out why and make sure your formatter gets deployed.
Line 55: Line 55:
 Once the formatter is live, you should be able to start streaming. This is a good time to check if it worked. ​ Once the formatter is live, you should be able to start streaming. This is a good time to check if it worked. ​
  
-In lab11/gatd/​scripts there'​s a script called formatter_test.py. You can use this to test if your setup is working end-to-end.+In (Github) ​gatd/​scripts there'​s a script called formatter_test.py. You can use this to test if your setup is working end-to-end.
  
 If you have access to shed, another way to test is to go into shed/​projects/​gatd and add another list_xxx.py script specific to your profile ID and run that. If you have access to shed, another way to test is to go into shed/​projects/​gatd and add another list_xxx.py script specific to your profile ID and run that.
Line 61: Line 61:
 === 4. Configuring the streams page to include your stream === === 4. Configuring the streams page to include your stream ===
  
-Something like lab11/gatd/​scripts/​explorer_edit.py.+Something like (Github) ​gatd/​scripts/​explorer_edit.py.
  
 ---- ----
proj/gatd/walkthroughs.txt · Last modified: 2014/07/22 23:01 by mclarkk