KymoCore/Documentation
v8.0.0 Stable⌄
Versions8.0.0 Current
GitHub ↗
KYMOCORE / API REFERENCE

kymo_core_param.h Source File

API contracts in their original English. Navigation and guides are bilingual.
Go to the documentation of this file.
1/* SPDX-License-Identifier: MIT */
10#ifndef KYMO_CORE_PARAM_H
11#define KYMO_CORE_PARAM_H
12#include "kymo_types.h"
13#if KYMO_EFFECTIVE_PARAMETERS || defined(DOXYGEN)
14#ifdef __cplusplus
15extern "C"
16{
17#endif
18
25#define KYMO_PARAM_NAME_MAX 24u
26
33#define KYMO_PARAM_UNIT_MAX 8u
34
41#define KYMO_PARAM_FRAME_MAX_SIZE (19u + KYMO_PARAM_NAME_MAX + KYMO_PARAM_UNIT_MAX)
42
56#define KYMO_PARAM(id_, variable_, minimum_, maximum_, unit_) \
57 {(uint8_t)(id_), &(variable_), (float)(minimum_), (float)(maximum_), #variable_, (unit_)}
58
67 typedef struct
68 {
74 uint8_t id;
75
80 float *pTarget;
81
86 float minimum;
87
92 float maximum;
93
99 const char *pName;
100
105 const char *pUnit;
107
113 typedef struct
114 {
117
121
122#if KYMO_EFFECTIVE_CORE || defined(DOXYGEN)
123
135#endif
136#ifdef __cplusplus
137}
138#endif
139#endif
140#endif
KymoStatus KymoCoreParam_init(const KymoCoreParamConfig *pConfig)
Initialize parameters and activate their processing in Core Main.
Status codes and callback types shared by every KymoCore module.
uint8_t KymoStatus
Result of a KymoCore operation.
Definition kymo_types.h:40
Parameter-only configuration for the default Core.
const KymoParameter * pParametersAv
Persistent parameter definitions.
size_t parameterCount
Entry count, 1..KYMO_MAX_PARAMETERS.
One parameter the host may write.
uint8_t id
Wire ID of writes to this parameter and of its readback.
float * pTarget
Application variable that accepted writes update.
float maximum
Largest accepted value, inclusive.
const char * pName
Name shown by the host, e.g. "kp".
float minimum
Smallest accepted value, inclusive.
const char * pUnit
Unit shown by the host, e.g. "°C".