Skip to content

broken examples #110

@douglas-raillard-arm

Description

@douglas-raillard-arm

"examples/video-short.json" is broken in two ways:

  • It's not valid JSON
  • Once the syntax errors are fixed, it's misleading:
    Phases like this one:

		"NuPlayerDriver1" : {
			"priority" : -15,
			"loop" : -1,
			"suspend",
			"run" : 100,
			"lock" : "NuPlayerDriver",
			"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
			"unlock" : "NuPlayerDriver",
			"run" : 50,
			"suspend" : "NuPlayerDriver",
			"run" : 80,
			"lock" : "NuPlayerDriver",
			"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
			"unlock" : "NuPlayerDriver",
			"run" : 370,
			"lock" : "NuPlayerDriver",
			"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
			"unlock" : "NuPlayerDriver",
			"run" : 135,
			"resume" : "NuPlayerDriver"
		},

are parsed as containing 6 events: duplicated keys are handled by json-c this way:

  • the order is insertion order
  • the value is the value of the last appearance of the key.

This means that the first 2 events will be "suspend" and then "run 135" (135 being the value of the last run). This can be easily observed by running rt-app -l100 video-short.json to get the details of what rt-app is effectively parsing.

This pull request would allow describing such configuration by using an array of events rather than directly have the keys in the phase body: #108

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions