Global

group Global_bufferDouble

bufferDouble globals

lorem

Macros

group Macros_bufferDouble_h

Variables

group Variables_bufferDouble_h

API’s

group Apis_bufferDouble_h

Getters

group Getters_bufferDouble_h

Functions

CosmOS_BufferDoublePairConfigurationType *bufferDouble_getBufferDoublePair(CosmOS_BufferDoubleConfigurationType *bufferCfg)

Get bufferDouble pair.

Parameters

bufferCfg[in] pointer

Returns

CosmOS_BufferDoublePairConfigurationType *

BitWidthType bufferDouble_getBufferDoubleKernelBufferId(CosmOS_BufferDoubleConfigurationType *bufferCfg)

Get bufferDouble kernelBufferId.

Parameters

bufferCfg[in] pointer

Returns

BitWidthType

BitWidthType bufferDouble_getBufferDoubleUserBufferId(CosmOS_BufferDoubleConfigurationType *bufferCfg)

Get bufferDouble userBufferId.

Parameters

bufferCfg[in] pointer

Returns

BitWidthType

CosmOS_BufferConfigurationType *bufferDouble_getBufferDoubleKernelBuffer(CosmOS_BufferDoubleConfigurationType *bufferCfg)

Get bufferDouble kernelBuffer.

Parameters

bufferCfg[in] pointer

Returns

CosmOS_BufferConfigurationType *

CosmOS_BufferConfigurationType *bufferDouble_getBufferDoubleUserBuffer(CosmOS_BufferDoubleConfigurationType *bufferCfg)

Get bufferDouble userBuffer.

Parameters

bufferCfg[in] pointer

Returns

CosmOS_BufferConfigurationType *

Setters

group Setters_bufferDouble_h

Functions

void bufferDouble_setBufferDoubleKernelBuffer(CosmOS_BufferDoubleConfigurationType *bufferCfg, BitWidthType activeKernelBufferIdParam)

Set bufferDouble activeKernelBufferId. This function cannot be called from the unprivileged context directly.

Parameters

bufferCfg[in] pointer

Returns

none

void bufferDouble_setBufferDoubleUserBuffer(CosmOS_BufferDoubleConfigurationType *bufferCfg, BitWidthType activeUserBufferIdParam)

Set bufferDouble activeUserBufferId. This function cannot be called from the unprivileged context directly.

Parameters

bufferCfg[in] pointer

Returns

none

General

group General_bufferDouble_h

Functions

CosmOS_BufferStateType bufferDouble_readArray(BitWidthType id, void *buffer, BitWidthType size, CosmOS_BufferDoubleAccessType access)

Reading array from the bufferDouble. DEMO.

The implementation contains obtaining of the operating system generated variable structure by os_getOsCfg function that stores all system double buffers in it. Then the double buffer variable is obtained by the function os_getOsBufferDoubleCfg based on the id argument which is mapped with the routes to the proper entity, in this case one of the system double buffers. After this point the buffer variable is obtained based on the access type either BUFFER_DOUBLE_ACCESS_ENUM__USER or BUFFER_DOUBLE_ACCESS_ENUM__KERNEL. with functions bufferDouble_getBufferDoubleUserBuffer or bufferDouble_getBufferDoubleKernelBuffer. In the case of wrong access type the BUFFER_STATE_ENUM__ERROR_ACCESS_DENIED is returned as bufferState. From the buffer variable the buffer id is extracted by calling buffer_getBufferId function and then the function buffer_readArray to read specific number of bytes from the buffer. Finally the bufferState is returned.

Parameters
  • id[in] doubleBuffer identifier

  • buffer[in] pointer to the user buffer array

  • size[in] of the bytes to read

  • access[in] type of the access

Returns

CosmOS_BufferStateType

CosmOS_BufferStateType bufferDouble_writeArray(BitWidthType id, void *buffer, BitWidthType size, CosmOS_BufferDoubleAccessType access)

Writing array into the bufferDouble. DEMO.

The implementation contains obtaining of the operating system generated variable structure by os_getOsCfg function that stores all system double buffers in it. Then the double buffer variable is obtained by the function os_getOsBufferDoubleCfg based on the id argument which is mapped with the routes to the proper entity, in this case one of the system double buffers. After this point the buffer variable is obtained based on the access type either BUFFER_DOUBLE_ACCESS_ENUM__USER or BUFFER_DOUBLE_ACCESS_ENUM__KERNEL. with functions bufferDouble_getBufferDoubleUserBuffer or bufferDouble_getBufferDoubleKernelBuffer. In the case of wrong access type the BUFFER_STATE_ENUM__ERROR_ACCESS_DENIED is returned as bufferState. From the buffer variable the buffer id is extracted by calling buffer_getBufferId function and then the function buffer_writeArray to write specific number of bytes to the buffer. Finally the bufferState is returned.

Parameters
  • id[in] doubleBuffer identifier

  • buffer[in] pointer to the user buffer array

  • size[in] of the bytes to read

  • access[in] type of the access

Returns

CosmOS_BufferStateType

CosmOS_BooleanType bufferDouble_isUserAndKernelBufferSame(CosmOS_BufferDoubleConfigurationType *bufferCfg)

Does user and kernel use the same buffer.

Parameters

bufferCfg[in] pointer

Returns

CosmOS_BooleanType

void bufferDouble_switchUserAndKernelBuffer(CosmOS_BufferDoubleConfigurationType *bufferCfg)

Switch user and kernel buffer. This function cannot be called from the unprivileged context directly.

Parameters

bufferCfg[in] pointer

Returns

none