Closed nunoguedelha closed 2 years ago
js
user interface filedictionary-plugin.js
to the const DOMAIN_OBJECTS_TYPES
in the new user interface file openmctStaticServer/domainObjTypes.js
.reportSchedule
, listing all the supported modes of telemetry scheduling:
provider.supportsRequest()
returns true
).provider.supportsSubscribe()
returns true
).
This field is used only on the end user interface, not on the OpenMCT API (openmct.objects.addProvider(...)
).Example of a Domain Object Type definition in openmctStaticServer/domainObjTypes.js
:
https://github.com/ami-iit/yarp-openmct/blob/299bb801c4c9efb3b24fb1c6af0acbd4cbda57dc/openmctStaticServer/domainObjTypes.js#L2-L7
The Domain Object Types are identified by the respective keys, so far yarpopenmct.sensormeas
and yarpopenmct.veccollectionmap
. Those keys are used to map the types to the telemetry entries in the dictionaries openmctStaticServer/dictionaryIcubTelemetry.json
and openmctStaticServer/dictionaryWalkingControllerTemplate.json
.
reportSchedule
is of type ReportSchedule
, an equivalent definition of an enumeration type in Javascript.
We can use a POJO(Plain Old Javascript Object) or a class for defining an enumeration[1].
References:
This approach has some limitations:
...we can solve (1) and (3) by making the class immutable with Object.freeze()
[2].
Using a class adds some overhead but is more elegant from a syntax point of view. We can use Symbol
[3] primitives to set the enumeration values (class static properties).
type: All objects in Open MCT have a type. Types allow you to form an ontology of knowledge and provide an abstraction for grouping, visualizing, and interpreting data.
Updated types definitions so far are: https://github.com/ami-iit/yarp-openmct/blob/556832d79679cd21c8cfd165e75eff413bd1a626/openmctStaticServer/domainObjTypes.js#L1-L32
The Domain Object Type field "icon" is a cssClass:
a string identifying a CSS class to apply to this clock when it's displayed in the UI. This will be used to represent the time system with an icon. There are a number of built-in icon classes available in Open MCT, ...
_Originally posted by @traversaro in https://github.com/ami-iit/yarp-openmct/pull/94#discussion_r813662794_
js
user interface file.