Cell table for tracking output states.
More...
#include <stdint.h>
Go to the source code of this file.
|
struct | ctgroup_s |
| Represents a group of linked cells that share the same unit number, channel selection bitmask, and output intensity value. More...
|
|
|
int | CT_init (const struct cr_s *cmap, uint32_t size, struct ctable_s **table) |
| Initializes table that maps the raw fseq sequence indexes to a known LOR unit and channel number using the provided channel map. The lookup is cached into the table for faster access. The table is dynamically allocated and must be freed with CT_free .
|
|
void | CT_set (struct ctable_s *table, uint32_t index, uint8_t output) |
| Sets the output intensity for the cell at the given index. This marks the cell as modified, regardless if the new output intensity is the same as the current value.
|
|
void | CT_change (struct ctable_s *table, uint32_t index, uint8_t output) |
| Changes the output intensity for the cell at the given index. This only marks the cell as modified if the new output intensity is different from the current value.
|
|
int | CT_groupof (struct ctable_s *table, uint32_t at, struct ctgroup_s *group) |
| Returns a group of linked cells starting at the given index. The group is identified by the unit number, channel section, and output intensity value. Any cells that have not been modified, or do not match, are excluded from the grouping. Assuming the cell at at is valid and modified, group should always contain at least one cell.
|
|
void | CT_free (struct ctable_s *table) |
| Frees the table and any held resources.
|
|
Cell table for tracking output states.
◆ CT_change()
void CT_change |
( |
struct ctable_s * | table, |
|
|
uint32_t | index, |
|
|
uint8_t | output ) |
Changes the output intensity for the cell at the given index. This only marks the cell as modified if the new output intensity is different from the current value.
- Parameters
-
table | table to change the output on |
index | index of the cell to change |
output | intensity to change to |
◆ CT_free()
Frees the table and any held resources.
- Parameters
-
◆ CT_groupof()
Returns a group of linked cells starting at the given index. The group is identified by the unit number, channel section, and output intensity value. Any cells that have not been modified, or do not match, are excluded from the grouping. Assuming the cell at at
is valid and modified, group
should always contain at least one cell.
- Parameters
-
table | table to search |
at | index to start the group search |
group | pointer to store the group |
- Returns
- 1 if a group was found, 0 if no group was found
◆ CT_init()
int CT_init |
( |
const struct cr_s * | cmap, |
|
|
uint32_t | size, |
|
|
struct ctable_s ** | table ) |
Initializes table that maps the raw fseq sequence indexes to a known LOR unit and channel number using the provided channel map. The lookup is cached into the table for faster access. The table is dynamically allocated and must be freed with CT_free
.
- Parameters
-
cmap | channel map to use for lookup |
size | number of indexes to map |
table | pointer to store the table |
- Returns
- 0 on success, or a negative error code on failure
◆ CT_set()
void CT_set |
( |
struct ctable_s * | table, |
|
|
uint32_t | index, |
|
|
uint8_t | output ) |
Sets the output intensity for the cell at the given index. This marks the cell as modified, regardless if the new output intensity is the same as the current value.
- Parameters
-
table | table to set the output on |
index | index of the cell to set |
output | intensity to set |