add: agent template
This commit is contained in:
7
agent/src/schema/accelerometer_schema.py
Normal file
7
agent/src/schema/accelerometer_schema.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from marshmallow import Schema, fields
|
||||
|
||||
|
||||
class AccelerometerSchema(Schema):
|
||||
x = fields.Int()
|
||||
y = fields.Int()
|
||||
z = fields.Int()
|
||||
9
agent/src/schema/aggregated_data_schema.py
Normal file
9
agent/src/schema/aggregated_data_schema.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from marshmallow import Schema, fields
|
||||
from schema.accelerometer_schema import AccelerometerSchema
|
||||
from schema.gps_schema import GpsSchema
|
||||
|
||||
|
||||
class AggregatedDataSchema(Schema):
|
||||
accelerometer = fields.Nested(AccelerometerSchema)
|
||||
gps = fields.Nested(GpsSchema)
|
||||
time = fields.DateTime("iso")
|
||||
6
agent/src/schema/gps_schema.py
Normal file
6
agent/src/schema/gps_schema.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from marshmallow import Schema, fields
|
||||
|
||||
|
||||
class GpsSchema(Schema):
|
||||
longitude = fields.Number()
|
||||
latitude = fields.Number()
|
||||
Reference in New Issue
Block a user