user42151: For a project, I need to store an array of structures in PROGMEM. Array MessageTable[] will be composed of about ten struct InMessage elements. InMessage looks sort of like this:
struct AvcInMessage {
  MessageHandler  msgHandler;
  byte            dataSize;
  byte            data[8];
  char            description[20];
};

MessageHandler is not a data type... yet. I'm not really sure what data type to use. I want to be able to pick a message from the table and then call MessageTable[x].msgHandler() if that makes sense. I'm almost positive that this involves a pointer. Does someone here have an idea about what I'm looking for?

user313: typedef void (*MessageHandler)(void);   // def messagehandler as pointer to func

struct AvcInMessage {
  MessageHandler  msgHandler;
  byte            dataSize;
  byte            data[8];
  char            description[20];
} InMessage[] = {
   {
      function1, <datasize>, {<byte0>, <byte1>, ..., }, "DescriptionHere"
   },
   // etc, for however many elements InMessage[] has.
};

The typedef defines a "pointer to function of void returning void" - fix up the argument count and types, and the return type to your needs. We're assuming each element's function has the same kind of arglist and return type. (Update: Sorry for the bug in my first iteration).
The next statement both defines the array of struct and initializes N of them. Provide an element count in the [] if you don't have a full set of initializers at compile time.

42151: <p>For a project, I need to store an array of structures in PROGMEM. Array <code>MessageTable[]</code> will be composed of about ten <code>struct InMessage</code> elements. InMessage looks sort of like this:</p>

<pre><code>struct AvcInMessage {
  MessageHandler  msgHandler;
  byte            dataSize;
  byte            data[8];
  char            description[20];
};
</code></pre>

<p>MessageHandler is not a data type... yet. I'm not really sure what data type to use. I want to be able to pick a message from the table and then call <code>MessageTable[x].msgHandler()</code> if that makes sense. I'm almost positive that this involves a pointer. Does someone here have an idea about what I'm looking for?</p>
 313: <pre><code>typedef void (*MessageHandler)(void);   // def messagehandler as pointer to func

struct AvcInMessage {
  MessageHandler  msgHandler;
  byte            dataSize;
  byte            data[8];
  char            description[20];
} InMessage[] = {
   {
      function1, &lt;datasize&gt;, {&lt;byte0&gt;, &lt;byte1&gt;, ..., }, "DescriptionHere"
   },
   // etc, for however many elements InMessage[] has.
};
</code></pre>

<p>The <code>typedef</code> defines a "pointer to function of void returning void" - fix up the argument count and types, and the return type to your needs. We're assuming each element's function has the same kind of arglist and return type. (Update: Sorry for the bug in my first iteration).</p>

<p>The next statement both defines the array of struct and initializes N of them. Provide an element count in the <code>[]</code> if you don't have a full set of initializers at compile time.</p>
