fplayer
C99 Falcon Sequence (fseq) file player for Light-O-Rama hardware (like xLights)
Loading...
Searching...
No Matches
cell.h File Reference

Cell table for tracking output states. More...

#include <stdint.h>
Include dependency graph for cell.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ctgroup_s
 Represents a group of linked cells that share the same unit number, channel selection bitmask, and output intensity value. More...
 

Functions

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.
 

Detailed Description

Cell table for tracking output states.

Function Documentation

◆ 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
tabletable to change the output on
indexindex of the cell to change
outputintensity to change to
Here is the caller graph for this function:

◆ CT_free()

void CT_free ( struct ctable_s * table)

Frees the table and any held resources.

Parameters
tabletable to free
Here is the caller graph for this function:

◆ CT_groupof()

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.

Parameters
tabletable to search
atindex to start the group search
grouppointer to store the group
Returns
1 if a group was found, 0 if no group was found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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
cmapchannel map to use for lookup
sizenumber of indexes to map
tablepointer to store the table
Returns
0 on success, or a negative error code on failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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
tabletable to set the output on
indexindex of the cell to set
outputintensity to set