Platform Objects

Introduction

The Platform module provides a common interface to platform-specific functionality, such as memory allocation, resource locking, interrupts, signalling, and others.

The Platform object provides low-level platform-specific functionality and depends upon the combination of the operating system and the C compiler used for development. The Platform module was written to provide platform-independent access functions for use by the MPI. Unless your application needs to be written for compatibility with different platforms, MEI encourages the use of OS-specific functions. If an MPIPlatform object handle is required, one should obtain this handle from the MPIControl method mpiControlPlatform.

The mpiObjectGive/Take(...) methods all use the mpiPlatformLockGive/Take(...) methods. When you take a lock, you take exclusive access to the resource (i.e., the section of XMP firmware memory associated with that Object). When you give a lock, you release (give up) that exclusive access. Think of it as TakeAccessOf and GiveUpAccess.

| Error Messages |

Methods

mpiPlatformAlloc Allocate system memory.
mpiPlatformAssertSet Set an assertion handling function to be used by the MPI library.
mpiPlatformAtof Convert a numeric string to a double.
mpiPlatformAtol Convert a numeric string to a int32_t.
mpiPlatformBoardType  
mpiPlatformControllerCheck Checks condition of controller.
mpiPlatformFileClose Close a file handle.
mpiPlatformFileOpen Open a file handle.
mpiPlatformFileRead Read data from a file handle created by mpiPlatformFileOpen.
mpiPlatformFileValidate  
mpiPlatformFileWrite Writes data to a file whose handle was created by mpiPlatformFileOpen.
mpiPlatformFirmwareAddress16To32 Converts 16 bit firmware address to 32 bits
mpiPlatformFirmwareAddress32To16 Converts 32 bit firmware address to 16 bits
mpiPlatformFirmwareAddress32To64 Converts 32 bit firmware address to 64 bits
mpiPlatformFirmwareAddress64To32 Converts 64 bit firmware address to 32 bits
mpiPlatformFirmwareAddressModify Increments the @p firmware address by \bytecount
mpiPlatformFirmwareAddressModify16 Increments the @p firmware address by \bytecount
mpiPlatformFirmwareMemoryGet Reads platform memory to application memory
mpiPlatformFirmwareMemorySet Writes application memory to platform memory
mpiPlatformFree Free system memory.
mpiPlatformHostAddress32To64
mpiPlatformHostAddress64To32
mpiPlatformKey Return an input character if an input character is available.
mpiPlatformMemoryGet64
mpiPlatformMemorySet64
mpiPlatformMemoryToFirmware Convert a host memory address to a controller memory address.
mpiPlatformMemoryToHost Covert a controller memory address to a host memory address.
mpiPlatformSleep Put the current thread to sleep for the number of milliseconds specified.
mpiPlatformProcessId Return the process identification number of the current process.
mpiPlatformTimerCount Write to ticks the current timer count.
mpiPlatformTimerFrequency Write to frequency the timer frequency of the current platform.
mpiPlatformTrace Display printf(...)-style trace information
mpiPlatformTraceEol Set the end-of-line (eol) to be used by mpiPlatformTrace(...).
mpiPlatformTraceFile Redirect trace output.
mpiPlatformTraceFunction Display the trace output.
mpiPlatformWord64Orient

Data Types

MPIPlatformBoardType
MPIPlatformFileMode
MPIPlatformInfo

Constants

MPIPlatformControlCountMax
MPIPlatformInfoCHAR_MAX