Crinit -- Configurable Rootfs Init
|
Header defining the runtime commands available through the notification/service interface. More...
Go to the source code of this file.
Classes | |
struct | crinitRtimOpMap_t |
Macros | |
#define | CRINIT_RTIMCMD_ARGDELIM '\n' |
Delimiting character between arguments of a response or command message. More... | |
#define | crinitGenOpMap(f) |
#define | crinitGenOpEnum(x) CRINIT_RTIMCMD_C_##x, CRINIT_RTIMCMD_R_##x, |
#define | crinitGenOpStruct(x) {CRINIT_RTIMCMD_C_##x, "C_" #x}, {CRINIT_RTIMCMD_R_##x, "R_" #x}, |
Typedefs | |
typedef enum crinitRtimOp_t | crinitRtimOp_t |
typedef struct crinitRtimOpMap_t | crinitRtimOpMap_t |
Enumerations | |
enum | crinitRtimOp_t { crinitGenOpMap =(crinitGenOpEnum) } |
Functions | |
int | crinitRtimOpGetByOpStr (crinitRtimOp_t *out, const char *opStr) |
int | crinitOpStrGetByRtimOp (const char **out, crinitRtimOp_t opCode) |
void | crinitRtimOpMapDebugPrintAll (void) |
Variables | |
const crinitRtimOpMap_t | crinitRtimOps [] |
Header defining the runtime commands available through the notification/service interface.
#define CRINIT_RTIMCMD_ARGDELIM '\n' |
Delimiting character between arguments of a response or command message.
#define crinitGenOpEnum | ( | x | ) | CRINIT_RTIMCMD_C_##x, CRINIT_RTIMCMD_R_##x, |
Macro to generate the opcode enum for crinitGenOpMap().
Each command gets a command (C_
) and a result/response (R_
) opcode.
#define crinitGenOpMap | ( | f | ) |
Macro to generate a mapping array for the specified commands.
#define crinitGenOpStruct | ( | x | ) | {CRINIT_RTIMCMD_C_##x, "C_" #x}, {CRINIT_RTIMCMD_R_##x, "R_" #x}, |
Macro to generate the opcode-to-string mapping for crinitGenOpMap().
typedef enum crinitRtimOp_t crinitRtimOp_t |
Enum of the available opcodes, including commands and results/responses.
typedef struct crinitRtimOpMap_t crinitRtimOpMap_t |
Structure holding a single mapping between opcode and string representation.
enum crinitRtimOp_t |
int crinitOpStrGetByRtimOp | ( | const char ** | out, |
crinitRtimOp_t | opCode | ||
) |
Given an crinitRtimOp_t opcode, obtain its string representation.
The returned point points to static memory that shall not be changed.
out | Return pointer for the string representation. |
opCode | The opcode. |
int crinitRtimOpGetByOpStr | ( | crinitRtimOp_t * | out, |
const char * | opStr | ||
) |
Given its string representation, find the correct opcode.
out | Return pointer for the opcode. |
opStr | The string representaiton. |
void crinitRtimOpMapDebugPrintAll | ( | void | ) |
List available opcodes.
Will print the full list of available opcodes in their string representation and the corresponding numerical opcode. Output will only be generated if global option DEBUG
is true
as it uses crinitDbgInfoPrint().
|
extern |
The string/opcode map for all opcodes, initialized in rtimopmap.c.