include/mboard.h File Reference

This should be the only header file that has to be included by libmboard users. More...

Go to the source code of this file.

Defines

#define MB_NULL_MBOARD   (MBt_Board)OM_NULL_INDEX
 Null Message Board.
#define MB_NULL_ITERATOR   (MBt_Iterator)OM_NULL_INDEX
 Null Iterator.
#define MB_NULL_FUNCTION   (MBt_Function)OM_NULL_INDEX
 Null Function.
#define MB_NULL_FILTER   (MBt_Filter)OM_NULL_INDEX
 Null Filter.
#define MB_NULL_INDEXMAP   (MBt_IndexMap)OM_NULL_INDEX
 Null Function.
#define MB_MODE_READWRITE   100
 Mode: Read-Write.
#define MB_MODE_READONLY   200
 Mode: Read-only.
#define MB_MODE_WRITEONLY   300
 Mode: Write-only.
#define MB_MODE_IDLE   400
 Mode: Idle.
#define MB_TRUE   1
 Internal representation of a logical TRUE.
#define MB_FALSE   0
 Internal representation of a logical FALSE.
#define MB_SUCCESS   0
 Return Code: Success.
#define MB_ERR_MEMALLOC   1
 Return Code: Memory allocation error.
#define MB_ERR_INVALID   2
 Return Code: Input error.
#define MB_ERR_LOCKED   3
 Return Code: Object locked.
#define MB_ERR_MPI   4
 Return Code: MPI Error.
#define MB_ERR_ENV   5
 Return Code: Environment Error.
#define MB_ERR_OVERFLOW   6
 Return Code: Overflow Error.
#define MB_ERR_INTERNAL   7
 Return Code: Internal Error.
#define MB_ERR_USER   8
 Return Code: User Error.
#define MB_ERR_NOTREADY   9
 Return Code: Not Ready.
#define MB_ERR_DUPLICATE   10
 Return Code: Duplicate value.
#define MB_ERR_NOT_FOUND   11
 Return Code: Required value not found.
#define MB_ERR_DISABLED   12
 Return Code: Routine disabled.
#define MB_SUCCESS_2   100
 Return Code: Success.
#define MB_ERR_NOT_IMPLEMENTED   111
 Return Code: Not Implemented.
#define MB_ERR_DEPRECATED   123
 Return Code: Funtion deprecated.

Typedefs

typedef OM_key_t MBt_handle
 Mapping of opaque object handle to internal representation.
typedef MBt_handle MBt_Board
 A handle to reference Message Board objects.
typedef MBt_handle MBt_Iterator
 A handle to reference Iterator objects.
typedef MBt_handle MBt_Function
 A handle to reference Registered Functions.
typedef MBt_handle MBt_Filter
 A handle to reference Registered Filter.
typedef MBt_handle MBt_IndexMap
 A handle to reference Index Map objects.

Functions

int MB_Env_Init (void)
 Initialises the libmboard environment.
int MB_Env_Finalise (void)
 Finalises the libmboard environment.
int MB_Env_Initialised (void)
 Indicates whether MB_Env_Init() has been called successfully.
int MB_Env_Finalised (void)
 Indicates whether MB_Env_Finalise() has been called.
int MB_Create (MBt_Board *mb_ptr, size_t msgsize)
 Instantiates a new Message Board object.
int MB_SetAccessMode (MBt_Board mb, int MODE)
 Sets access mode of the Message Board.
int MB_SetSyncPattern (MBt_Board mb, unsigned int *sync_matrix)
 Sets sync pattern of the Message Board.
int MB_AddMessage (MBt_Board mb, void *msg)
 Adds a message to the Message Board.
int MB_Clear (MBt_Board mb)
 Clears the Message Board.
int MB_Delete (MBt_Board *mb_ptr)
 Deletes a Message Board.
int MB_Iterator_Create (MBt_Board mb, MBt_Iterator *itr_ptr)
 Creates a new Iterator for accessing messages in board mb.
int MB_Iterator_CreateSorted (MBt_Board mb, MBt_Iterator *itr_ptr, int(*cmpFunc)(const void *msg1, const void *msg2))
 Creates a new Iterator for accessing sorted messages in board mb.
int MB_Iterator_CreateFiltered (MBt_Board mb, MBt_Iterator *itr_ptr, int(*filterFunc)(const void *msg, const void *params), void *filterFuncParams)
 Creates a new Iterator for accessing a selection of messages in board mb.
int MB_Iterator_CreateFilteredSorted (MBt_Board mb, MBt_Iterator *itr_ptr, int(*filterFunc)(const void *msg, const void *params), void *filterFuncParams, int(*cmpFunc)(const void *msg1, const void *msg2))
 Instantiates a new Iterator for accessing a sorted selection of messages in board mb.
int MB_Iterator_Delete (MBt_Iterator *itr_ptr)
 Deletes an Iterator.
int MB_Iterator_GetMessage (MBt_Iterator itr, void **msg_ptr)
 Returns next available message from Iterator.
int MB_Iterator_Rewind (MBt_Iterator itr)
 Rewinds an Iterator.
int MB_Iterator_Randomise (MBt_Iterator itr)
 Randomises the order of entries in an Iterator.
int MB_SyncStart (MBt_Board mb)
 Synchronises the content of the board across all processes.
int MB_SyncTest (MBt_Board mb, int *flag)
 Inspects the completion status of a board synchronisation.
int MB_SyncComplete (MBt_Board mb)
 Completes the synchronisation of a board.
int MB_Filter_Create (MBt_Filter *fh_ptr, int(*filterFunc)(const void *msg, int pid))
 Creates a filter object.
int MB_Filter_Assign (MBt_Board mb, MBt_Filter fh)
 Assigns a filter handle to a message board.
int MB_Filter_Delete (MBt_Filter *fh_ptr)
 Deallocates a registered function.
int MB_Function_Register (MBt_Function *fh_ptr, int(*filterFunc)(const void *msg, const void *params))
 This function is deprecated. Use MB_Filter_Create() instead.
int MB_Function_Assign (MBt_Board mb, MBt_Function fh, void *params, size_t param_size)
 This function is deprecated. Use MB_Filter_Assign() instead.
int MB_Function_Free (MBt_Function *fh_ptr)
 This function is deprecated. Use MB_Filter_Delete() instead.
int MB_IndexMap_Create (MBt_IndexMap *im_ptr, const char *name)
 Instantiates a new Index Map object.
int MB_IndexMap_Delete (MBt_IndexMap *im_ptr)
 Deletes an Index Map.
int MB_IndexMap_AddEntry (MBt_IndexMap im, int value)
 Adds an entry into the Index Map.
int MB_IndexMap_Sync (MBt_IndexMap im)
 Distributes/gathers the map content across/from all processors.
int MB_IndexMap_MemberOf (MBt_IndexMap im, int pid, int value)
 Query the map to determine if a value exists on a particular processor.

Detailed Description

This should be the only header file that has to be included by libmboard users.

      Author: Lee-Shawn Chin 
      Date  : August 2009 
      Copyright (c) 2009 STFC Rutherford Appleton Laboratory
Warning:
This library is designed to work only on homogenous systems

Generated on 1 Oct 2009 for libmboard by  doxygen 1.6.1