JSON Serializers Definitions¶
JSON serializers for database models. Classes here parses python objects into JSON formats to be transmitted with HTTP requests to the Pi or to client Javascript code.
Jin Cheng, 02/12/16
-
class
server_side.controls.serializers.
CalorimeterSerializer
(*args, **kwargs)[source]¶ Bases:
rest_framework.serializers.ModelSerializer
JSON representation of calorimetry settings.
-
class
Meta
[source]¶ Bases:
object
-
fields
= ('id', 'serial', 'access_code', 'name', 'creation_time', 'current_sample_temp', 'current_ref_temp', 'K_p', 'K_i', 'K_d', 'idle_loop_interval', 'max_ramp_rate', 'temp_tolerance_range', 'temp_tolerance_duration', 'active_loop_interval', 'web_api_min_upload_length', 'last_changed_time', 'last_comm_time', 'is_active', 'has_active_runs')¶
-
model
¶ alias of
Calorimeter
-
read_only_fields
= ('access_code',)¶
-
-
class
-
class
server_side.controls.serializers.
DataPointSerializer
(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]¶ Bases:
rest_framework.serializers.ModelSerializer
JSON representation of measurements made at a certain point in time.
-
class
server_side.controls.serializers.
RunSerializer
(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]¶ Bases:
rest_framework.serializers.ModelSerializer
JSON representation of a calorimetry job.