Closed GoogleCodeExporter closed 9 years ago
I'm working on this. Currently the codes are formed to represent the codes of
lumikki.js
Quote:
errmap = { "000":"Cannot connect to anything"
, "010":"Server sent unknown status"
, "020":"Server response did not contain status"
, "100":"Disabled from server."
, "110":"Target machine did not respond"
, "120":"Server received malformed command."
, "122":"Connection refused."
, "200":"Target available, values not set"
, "210":"Ready to measure"
, "220":"Measuring"
, "230":"System is busy, please try again in a while."
};
These codes map the number that the status.cgi returns to a message that is
shown beside the status code.
The logic of these codes is that 0**-codes are server errors, 1**-codes are
connection errors between lumikki and machine and 2**-codes are machine's
internal codes.
Currently there are three different error code mappings in the code.
First: lumikki mapping -> this should remain
Second: HTTP-response mapping -> I'll write a library that will map these codes
into lumikki codes
Third: Machine response mapping -> machines should respond with a corresponding
lumikki response so that it can be sent back as it is
Can the code 503 for 'not ready' be changed into something, for example, 230 if
current 'wait'-response would be changed to 230->240?
Original comment by st.tuomisto
on 22 Mar 2011 at 7:57
Original comment by st.tuomisto
on 22 Mar 2011 at 7:57
Added a StatusCodeAPI
http://code.google.com/p/lumikki/wiki/StatusCodeAPI
Added status functions to ttm.py, ir.py and camera.py. Legacy versions are also
in place and currently used.
TODO in code:
-creation of status functions on the devices
-bug testing the new status functions
TODO in API:
-some definition for the returned value of command calls. Currently: status code
-some definition for the different states of the device.
-should the status be reflected to the usability of functions, or should they
just return errors as currently?
Original comment by st.tuomisto
on 22 Mar 2011 at 12:50
As the camera and AE status queries do not exist, added a 130-not implemented
status code to the status api. This is now the returned code.
TODO: camera should have at least a "server is online"-style status query. Same
kind as with ttm.
Original comment by st.tuomisto
on 31 Mar 2011 at 7:16
Signals work for camera and ttm
Original comment by jhkoi...@gmail.com
on 31 Mar 2011 at 6:44
Original issue reported on code.google.com by
jhkoi...@gmail.com
on 17 Mar 2011 at 5:43