jrosti / lumikki

Automatically exported from code.google.com/p/lumikki
0 stars 0 forks source link

Create mock-device #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

Create mock-device-server and mockConf(). After this is done you should be able 
to do:

mockServer.run()
config = mockConf()

import cam
try:
  ret = cam.ConnectAndSendStart()
  if not ret == correctRet: raise ValueError() 

Requirements:

- written in python
- listen to local ports
- 127.0.0.1:40001 = cam
- 127.0.0.1:40002 = ttm
- 127.0.0.1:40003 = ir
- 127.0.0.1:40004 = ae

- expect JSON http-post as input
- write JSON http-post as output

- ready before 1.6.2011
- read responses from a dict = {'inputCommand1': {'inputValue1':responce1, 
'inputValue2':responce2'}, 'inputCommand2': {...}, ...}

- if response exists in dict: print header + dict[corresponding responce]
- else: print header + dict['inputCommand1']['inputValue1']

Original issue reported on code.google.com by jhkoi...@gmail.com on 1 Apr 2011 at 1:58

GoogleCodeExporter commented 9 years ago
done

Original comment by jhkoi...@gmail.com on 27 Apr 2011 at 12:10