MPS issue job003386

TitleTelemetry control interface is poorly designed
Statusclosed
Priorityoptional
Assigned userGareth Rees
OrganizationRavenbrook
DescriptionRB says [1]:

48. Ugh. mps_telemetry_control ought to be replaced by three functions. It breaks the rules on candy-machine interfaces.

50. mps_telemetry_intern should return a typed value (mps_label_t?), not mps_word_t.
AnalysisFor (48), I propose that the three functions should be:

void mps_telemetry_set(mps_word_t)
void mps_telemetry_reset(mps_word_t)
mps_word_t mps_telemetry_get(void)

mps_telemetry_control will be left in the interface, but deprecated in the reference manual.

For (50), I propose just making a typedef:

typedef mps_word_t mps_label_t;
mps_label_t mps_telemetry_intern(const char *);

Is this a transparent typedef, or partially transparent (e.g. "some unsigned integer type", or opaque?
How foundinspection
Evidence[1] <https://info.ravenbrook.com/mail/2012/11/16/13-21-30/0/>
Observed in1.110.0
Created byGareth Rees
Created on2012-11-16 14:05:17
Last modified byGareth Rees
Last modified on2012-11-19 12:44:34
History2012-11-16 GDR Created.

Fixes

Change Effect Date User Description
180495 closed 2012-11-16 16:42:41 Gareth Rees New type mps_label_t for telemetry labels.
Deprecate "candy machine" interface to telemetry control.
Implement and document straightforward get/set/reset interface.
Put a TODO referencing job003387 and job003388.