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

Channel range map interface. More...

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

Go to the source code of this file.

Functions

int CMap_read (const char *fp, struct cr_s **cr)
 Reads a channel range map from the given file path. The channel range map is a linked list of channel range nodes that map sequence channel indices to unit and circuit numbers. The caller is responsible for freeing the returned channel range map using CMap_free.
 
void CMap_free (struct cr_s *cr)
 Frees the given channel range map by walking the linked list and freeing each node.
 
int CMap_lookup (const struct cr_s *cr, uint32_t id, uint8_t *unit, uint16_t *circuit)
 Remaps the given sequence channel index to a unit and circuit number using the channel range mapping. The result is written to the given unit and circuit pointers.
 

Detailed Description

Channel range map interface.

Function Documentation

◆ CMap_free()

void CMap_free ( struct cr_s * cr)

Frees the given channel range map by walking the linked list and freeing each node.

Parameters
crchannel range map to free
Here is the caller graph for this function:

◆ CMap_lookup()

int CMap_lookup ( const struct cr_s * cr,
uint32_t id,
uint8_t * unit,
uint16_t * circuit )

Remaps the given sequence channel index to a unit and circuit number using the channel range mapping. The result is written to the given unit and circuit pointers.

Parameters
crchannel range map to use for remapping
idsequence channel index to remap
unitpointer to write the unit number to
circuitpointer to write the circuit number to
Returns
non-zero on success, zero on failure
Here is the caller graph for this function:

◆ CMap_read()

int CMap_read ( const char * fp,
struct cr_s ** cr )

Reads a channel range map from the given file path. The channel range map is a linked list of channel range nodes that map sequence channel indices to unit and circuit numbers. The caller is responsible for freeing the returned channel range map using CMap_free.

Parameters
fpfile path to read from
crpointer to write the channel range map to
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: