ChibiOS/RT
6.0.3
|
ChibiOS objects factory structures and macros. More...
Go to the source code of this file.
Data Structures | |
struct | ch_dyn_element |
Type of a dynamic object list element. More... | |
struct | ch_dyn_list |
Type of a dynamic object list. More... | |
struct | ch_registered_static_object |
Type of a registered object. More... | |
struct | ch_dyn_object |
Type of a dynamic buffer object. More... | |
struct | ch_dyn_semaphore |
Type of a dynamic semaphore. More... | |
struct | ch_dyn_mailbox |
Type of a dynamic buffer object. More... | |
struct | ch_dyn_objects_fifo |
Type of a dynamic buffer object. More... | |
struct | ch_dyn_pipe |
Type of a dynamic pipe object. More... | |
struct | ch_objects_factory |
Type of the factory main object. More... | |
Macros | |
#define | CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 |
Maximum length for object names. More... | |
#define | CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE |
Enables the registry of generic objects. More... | |
#define | CH_CFG_FACTORY_GENERIC_BUFFERS TRUE |
Enables factory for generic buffers. More... | |
#define | CH_CFG_FACTORY_SEMAPHORES TRUE |
Enables factory for semaphores. More... | |
#define | CH_CFG_FACTORY_MAILBOXES TRUE |
Enables factory for mailboxes. More... | |
#define | CH_CFG_FACTORY_OBJ_FIFOS TRUE |
Enables factory for objects FIFOs. More... | |
#define | CH_CFG_FACTORY_OBJ_FIFOS TRUE |
Enables factory for objects FIFOs. More... | |
#define | CH_CFG_FACTORY_PIPES TRUE |
Enables factory for Pipes. More... | |
#define | CH_CFG_FACTORY_SEMAPHORES FALSE |
Enables factory for semaphores. More... | |
#define | CH_CFG_FACTORY_MAILBOXES FALSE |
Enables factory for mailboxes. More... | |
#define | CH_CFG_FACTORY_OBJ_FIFOS FALSE |
Enables factory for objects FIFOs. More... | |
#define | CH_CFG_FACTORY_PIPES FALSE |
Enables factory for Pipes. More... | |
Typedefs | |
typedef struct ch_dyn_element | dyn_element_t |
Type of a dynamic object list element. More... | |
typedef struct ch_dyn_list | dyn_list_t |
Type of a dynamic object list. More... | |
typedef struct ch_registered_static_object | registered_object_t |
Type of a registered object. More... | |
typedef struct ch_dyn_object | dyn_buffer_t |
Type of a dynamic buffer object. More... | |
typedef struct ch_dyn_semaphore | dyn_semaphore_t |
Type of a dynamic semaphore. More... | |
typedef struct ch_dyn_mailbox | dyn_mailbox_t |
Type of a dynamic buffer object. More... | |
typedef struct ch_dyn_objects_fifo | dyn_objects_fifo_t |
Type of a dynamic buffer object. More... | |
typedef struct ch_dyn_pipe | dyn_pipe_t |
Type of a dynamic pipe object. More... | |
typedef struct ch_objects_factory | objects_factory_t |
Type of the factory main object. More... | |
Functions | |
void | _factory_init (void) |
Initializes the objects factory. More... | |
registered_object_t * | chFactoryRegisterObject (const char *name, void *objp) |
Registers a generic object. More... | |
registered_object_t * | chFactoryFindObject (const char *name) |
Retrieves a registered object. More... | |
registered_object_t * | chFactoryFindObjectByPointer (void *objp) |
Retrieves a registered object by pointer. More... | |
void | chFactoryReleaseObject (registered_object_t *rop) |
Releases a registered object. More... | |
dyn_buffer_t * | chFactoryCreateBuffer (const char *name, size_t size) |
Creates a generic dynamic buffer object. More... | |
dyn_buffer_t * | chFactoryFindBuffer (const char *name) |
Retrieves a dynamic buffer object. More... | |
void | chFactoryReleaseBuffer (dyn_buffer_t *dbp) |
Releases a dynamic buffer object. More... | |
dyn_semaphore_t * | chFactoryCreateSemaphore (const char *name, cnt_t n) |
Creates a dynamic semaphore object. More... | |
dyn_semaphore_t * | chFactoryFindSemaphore (const char *name) |
Retrieves a dynamic semaphore object. More... | |
void | chFactoryReleaseSemaphore (dyn_semaphore_t *dsp) |
Releases a dynamic semaphore object. More... | |
dyn_mailbox_t * | chFactoryCreateMailbox (const char *name, size_t n) |
Creates a dynamic mailbox object. More... | |
dyn_mailbox_t * | chFactoryFindMailbox (const char *name) |
Retrieves a dynamic mailbox object. More... | |
void | chFactoryReleaseMailbox (dyn_mailbox_t *dmp) |
Releases a dynamic mailbox object. More... | |
dyn_objects_fifo_t * | chFactoryCreateObjectsFIFO (const char *name, size_t objsize, size_t objn, unsigned objalign) |
Creates a dynamic "objects FIFO" object. More... | |
dyn_objects_fifo_t * | chFactoryFindObjectsFIFO (const char *name) |
Retrieves a dynamic "objects FIFO" object. More... | |
void | chFactoryReleaseObjectsFIFO (dyn_objects_fifo_t *dofp) |
Releases a dynamic "objects FIFO" object. More... | |
dyn_pipe_t * | chFactoryCreatePipe (const char *name, size_t size) |
Creates a dynamic pipe object. More... | |
dyn_pipe_t * | chFactoryFindPipe (const char *name) |
Retrieves a dynamic pipe object. More... | |
void | chFactoryReleasePipe (dyn_pipe_t *dpp) |
Releases a dynamic pipe object. More... | |
static dyn_element_t * | chFactoryDuplicateReference (dyn_element_t *dep) |
Duplicates an object reference. More... | |
static void * | chFactoryGetObject (registered_object_t *rop) |
Returns the pointer to the inner registered object. More... | |
static size_t | chFactoryGetBufferSize (dyn_buffer_t *dbp) |
Returns the size of a generic dynamic buffer object. More... | |
static uint8_t * | chFactoryGetBuffer (dyn_buffer_t *dbp) |
Returns the pointer to the inner buffer. More... | |
static semaphore_t * | chFactoryGetSemaphore (dyn_semaphore_t *dsp) |
Returns the pointer to the inner semaphore. More... | |
static mailbox_t * | chFactoryGetMailbox (dyn_mailbox_t *dmp) |
Returns the pointer to the inner mailbox. More... | |
static objects_fifo_t * | chFactoryGetObjectsFIFO (dyn_objects_fifo_t *dofp) |
Returns the pointer to the inner objects FIFO. More... | |
static pipe_t * | chFactoryGetPipe (dyn_pipe_t *dpp) |
Returns the pointer to the inner pipe. More... | |
ChibiOS objects factory structures and macros.
Definition in file chfactory.h.