Added a handle_socket_disconnection method and added the signal as well to dispatch the event on disconnection (Hub). Also made the necessary additions to the views and urls
Changed the command prefixes to construct_command, construct_query, parse_reply and parse_result. Added an is_message_of_type method to the handler. Added in get_disconnected_devices, map_device_to_socket, handle_message and started changing up device_data. Command prefix name changes also applied to decorators.py, handlers.py.
In the devices/models.py changed Command to Message. We're now using MessageType instead of Command. MessageTypes have a category of either command, query, reply or result or just plain ol information (not yet implemented). Arguments also thrown and replaced by input and output Parameters and message_type now uses a foreign key link.
Added in memcache cache
Adding messages.py.. needs alot of work but ye
Added in the disconnection callback functionality
Added in a get_port_disconnnection_callback method
handler.get_message_type now returns a tuple (message_type_name, category). Did some bug fixes to the get_device_function methods. Changed all the writes to either query/command and the reads to reply/result. Result is from a query, reply is from a command. Added some more to is_message_of_type, also threw Exception for null message types. Truncated the add_device_type methods and other methods that were heavy on commands. Added a send device_socket_message that talks to the hub for us. Had to make some changes to disconnected_devices because it wasn't actually returning the disconnected ones. map_socket_to_device now returns the device. Made major changes to device_data. First we check for pending commands that we didn't get replies for and see if the device_id is in it. Second we check disconnected devices to see if the device is reconnecting and sending a similar message.
Added in DeviceMessageAdmin class and added filters for origin and device
Fixed a bug caused by name_command not being updated to reflect the new command prefixes in decorators.py
Restructured messages.py. We now have a message_id and the different categories describe it
Added a get(message_type_name, category) function in MessageType that creates the MessageType based on messages.py if it's not already created and returns it. Added identified to functions that return messages so we can filter by the message types that we have already identified.
Made sure location checks for the type of message before trying to save the location update
Removed the command tests and changes the keywords to reflect the new message prefixes
Put back in Status and StatusUpdate in mixin models