|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The programmer's private seam between kst_prog.c, kst_prog_card.c and kst_prog_file.c: the wait and file-write kinds the state holds, and the helpers of kst_prog.c that the card part and the journal file part call. More...
Go to the source code of this file.
Enumerations | |
| enum | { W_NONE = 0 , W_SAVE , W_FILE , W_ANSWER , W_OUTCOME } |
| enum | { FILE_NONE = 0 , FILE_KEEP , FILE_JOURNAL } |
Functions | |
| bool | kst_prog_same (const kst_image_t *a, const kst_image_t *b) |
| Whether two images hold the same values. | |
| unsigned | kst_prog_lowest (uint64_t set) |
| The index of the lowest field bit set in a set. | |
| unsigned | kst_prog_ones (uint64_t set) |
| The number of field bits set in a set. | |
| bool | kst_prog_field_editable (kst_field_id_t id) |
| Whether a field may be edited. | |
| kst_field_set_t | kst_prog_differ (const kst_image_t *a, const kst_image_t *b) |
| The fields in which two images differ. | |
| kst_rules_t | kst_prog_hard_new (const kst_prog_t *p, const kst_image_t *target) |
| The hard rules the target image breaks. | |
| kst_rules_t | kst_prog_soft_asks (const kst_prog_t *p, const kst_image_t *from, const kst_image_t *target) |
| The soft rules an edit from one image to another asks about. | |
| const kst_image_t * | kst_prog_file_image (const kst_prog_t *p) |
| The image the file before a write takes: the servo as the session found it. | |
| kst_prog_msg_id_t | kst_prog_say_reg (kst_prog_t *p, unsigned id, unsigned arg, unsigned reg) |
| Sets the message with an argument and a register. | |
| kst_prog_msg_id_t | kst_prog_say (kst_prog_t *p, unsigned id, unsigned arg) |
| Sets the message with an argument. | |
| void | kst_prog_send (kst_prog_t *p, const kst_link_request_t *req) |
| Queues a command for the task that owns the link module. | |
| void | kst_prog_card_ask (kst_prog_t *p, kst_prog_card_op_t op, const char *name) |
| Asks the card side for a save, a list or a load. | |
| void | kst_prog_write_go (kst_prog_t *p) |
| Starts the write that is held: its journal, its file, then the request. | |
| kst_prog_msg_id_t | kst_prog_held_gate (const kst_prog_t *p) |
| The start gate of the held write as it is now, the wait for its own files left out: the port in PROGRAMMING and idle, the port the write was held for, no STOP, the bench not ARMED and the switch on. | |
| bool | kst_prog_journal_classify (kst_prog_t *p) |
| Classifies the held journal record against the servo read. | |
| void | kst_prog_not_started (kst_prog_t *p, unsigned id, unsigned arg) |
| Ends a command that was not taken, with its message. | |
| void | kst_prog_load_take (kst_prog_t *p, const kst_image_t *target) |
| Takes a loaded file's target into the draft. | |
The programmer's private seam between kst_prog.c, kst_prog_card.c and kst_prog_file.c: the wait and file-write kinds the state holds, and the helpers of kst_prog.c that the card part and the journal file part call.
Nothing outside shared/bench includes this header; the programmer's interface is kst_prog.h.
SPDX-License-Identifier: MIT
| void kst_prog_card_ask | ( | kst_prog_t * | p, |
| kst_prog_card_op_t | op, | ||
| const char * | name ) |
Asks the card side for a save, a list or a load.
| p | The programmer state. |
| op | The card operation. |
| name | The file name, or NULL. |
| kst_field_set_t kst_prog_differ | ( | const kst_image_t * | a, |
| const kst_image_t * | b ) |
The fields in which two images differ.
| a | The first image. |
| b | The second image. |
| bool kst_prog_field_editable | ( | kst_field_id_t | id | ) |
Whether a field may be edited.
| id | The field. |
| const kst_image_t * kst_prog_file_image | ( | const kst_prog_t * | p | ) |
The image the file before a write takes: the servo as the session found it.
| p | The programmer state. |
| kst_rules_t kst_prog_hard_new | ( | const kst_prog_t * | p, |
| const kst_image_t * | target ) |
The hard rules the target image breaks.
| p | The programmer state. |
| target | The image to check. |
| kst_prog_msg_id_t kst_prog_held_gate | ( | const kst_prog_t * | p | ) |
The start gate of the held write as it is now, the wait for its own files left out: the port in PROGRAMMING and idle, the port the write was held for, no STOP, the bench not ARMED and the switch on.
| p | The programmer state. |
| bool kst_prog_journal_classify | ( | kst_prog_t * | p | ) |
Classifies the held journal record against the servo read.
| p | The programmer state. |
| void kst_prog_load_take | ( | kst_prog_t * | p, |
| const kst_image_t * | target ) |
Takes a loaded file's target into the draft.
| p | The programmer state. |
| target | The file's target image. |
| unsigned kst_prog_lowest | ( | uint64_t | set | ) |
The index of the lowest field bit set in a set.
| set | A set of fields, one bit each. |
| void kst_prog_not_started | ( | kst_prog_t * | p, |
| unsigned | id, | ||
| unsigned | arg ) |
Ends a command that was not taken, with its message.
| p | The programmer state. |
| id | The message id. |
| arg | The argument of the message. |
| unsigned kst_prog_ones | ( | uint64_t | set | ) |
The number of field bits set in a set.
| set | A set of fields, one bit each. |
| bool kst_prog_same | ( | const kst_image_t * | a, |
| const kst_image_t * | b ) |
Whether two images hold the same values.
| a | The first image. |
| b | The second image. |
| kst_prog_msg_id_t kst_prog_say | ( | kst_prog_t * | p, |
| unsigned | id, | ||
| unsigned | arg ) |
Sets the message with an argument.
| p | The programmer state. |
| id | The message id. |
| arg | The argument of the message. |
| kst_prog_msg_id_t kst_prog_say_reg | ( | kst_prog_t * | p, |
| unsigned | id, | ||
| unsigned | arg, | ||
| unsigned | reg ) |
Sets the message with an argument and a register.
| p | The programmer state. |
| id | The message id. |
| arg | The argument of the message. |
| reg | The register the message names. |
| void kst_prog_send | ( | kst_prog_t * | p, |
| const kst_link_request_t * | req ) |
Queues a command for the task that owns the link module.
| p | The programmer state. |
| req | The request to send. |
| kst_rules_t kst_prog_soft_asks | ( | const kst_prog_t * | p, |
| const kst_image_t * | from, | ||
| const kst_image_t * | target ) |
The soft rules an edit from one image to another asks about.
| p | The programmer state. |
| from | The image before the edit. |
| target | The image after the edit. |
| void kst_prog_write_go | ( | kst_prog_t * | p | ) |
Starts the write that is held: its journal, its file, then the request.
| p | The programmer state. |