# GRL Struct Reference

A GRL is a "General Reflex Locator". More...

`#include <SFBReactor.h>`

## Data Fields
u8 | tableIndex
u8 | entryIndex

## Detailed Description

A GRL is a "General Reflex Locator".

Conceptually, a GRL is just a 16 bit index into a set of function pointers (specificially, PacketHandler's). It exists primarily so that a SFBDispatchEntry can unite a PacketHandler with a u8 type code and eight bits of flags, and fit it all in a word.

Within the 16 bits of a GRL, a two-level (table, entry) structure different parts of the codebase (sketch, reflex core, external libraries..) each to provide their own arrays of PacketHandler pointers. Each such array is assigned a table number (when passed to SFBReactor::reflexes), and then the associated entry numbers are its array indices. Such arrays will typically be declared "const", so they are stored in flash memory, avoiding the need to waste RAM on the function pointers themselves.

The documentation for this struct was generated from the following file:

- src/include/SFBReactor.h