Пример #1
0
    class Children(Document):
        class Options(object):
            definition_id = 'children'

        children = OneOfField([
            DocumentField('A', ),
        ])
Пример #2
0
class JobsDocument(Document):
    infinite_loops = BooleanField()
    jobs = ArrayField(
        OneOfField(fields=[
            DocumentField(WifiJobDocument),
            DocumentField(GnssAutonomousDocument),
            DocumentField(GnssAssistedDocument),
        ]))
class JobsDocument(Document):
    infinite_loops = BooleanField(
        description="Configures the repetition of the jobs. If set to true, the job file will be repeated infinitely. If set to false, the field test will end at the end of the last job in this file."
    )
    scan_interval = NumberField(
        minimum=0,
        multiple_of=1,
        description="Number of seconds to wait between two consecutive list of jobs execution. Useful only if infinite_loops is true. Value in seconds. 0 means that there is no wait between list of jobs.",
        required=True,
    )
    jobs = ArrayField(
        OneOfField(
            fields=[
                DocumentField(WifiJobDocument),
                DocumentField(GnssAutonomousDocument),
                DocumentField(GnssAssistedDocument),
            ]
        ),
        description="Array of jobs description to be executed during field tests.",
    )
Пример #4
0
 class Z(Document):
     main_or_x = OneOfField([DocumentField(Main), DocumentField(X)])