Exemplo n.º 1
0
class cmGpsInfo_pkt(models.Packet):
    cmd = models.IntField8()
    imei = models.ArrayField(models.IntField8(), 8)
    year = models.IntField8()
    mon = models.IntField8()
    day = models.IntField8()
    hour = models.IntField8()
    min = models.IntField8()
    sec = models.IntField8()
    lat = models.ArrayField(models.IntField8(), 4)
    lon = models.ArrayField(models.IntField8(), 4)
    flag = models.IntField8()
    halfCourse = models.IntField8()
    speed = models.IntField8()
    csq = models.IntField8()
    sv_used_num = models.IntField8()
    gpsLevel = models.ArrayField(models.IntField8(), 6)
    mcc = models.ArrayField(models.IntField8(), 2)
    mnc = models.IntField8()
    lac = models.ArrayField(models.IntField8(), 2)
    ci = models.ArrayField(models.IntField8(), 2)

    def json(self):
        return (json_int('cmd', self.cmd))
Exemplo n.º 2
0
class tqLogin_pkt(models.Packet):
    cmd = models.IntField8()
    imei = models.ArrayField(models.IntField8(), 8)
Exemplo n.º 3
0
 class multi_int_field_packet2(models.Packet):
     arr_int_field = models.ArrayField(models.IntField(), 10)
Exemplo n.º 4
0
 class multi_int_field(models.Packet):
     arr_int_field = models.ArrayField(models.IntField(bit_len=4), 10)
Exemplo n.º 5
0
 class TenPoints(models.Packet):
     """
     A `Packet` class that will encapsulate the `Point` class and intended to be
     encapsulated within another `Packet` class.
     """
     points = models.ArrayField(models.PacketField(Point), 8)
Exemplo n.º 6
0
 class EncArray(models.Packet):
     """
     A `Packet` class that will encapsulate the `Point` class.
     """
     points = models.ArrayField(models.PacketField(Point), 10)