• No results found

8.5 IOC

8.5.1 Imported types

8.5.4.3 IocSendGroup/IocWriteGroup

The IocWriteGroupAPI call is generated for "data" (unqueued) semantics and the IocSendGroupAPI call is generated for "event" (queued) semantics.

[SWS_Os_00728] d

Service Name IocSendGroup_<IocId>

Reentrancy This function is generated individually for each sender. The individual function is not reentrant (if called from different runnable entities that belong to the same sender), but different functions can be called in parallel.

IN1 List of parameters with data values to be sent over a

communication identified by the <IocId>. The parameters will be passed by value for simple data elements and by reference for all other types.

Example:

Std_ReturnType IocSendGroup_RTE_G1 (const uint32 UI_

Value1, const uint16 Value2, const uint8 Value3, const uint16 Value4);

numberOfBytesIN1 (optional) number of bytes for parameter IN1 to be send.

IN2

Return value Std_ReturnType IOC_E_OK: The data has been passed successfully to the communication service.

IOC_E_LIMIT: IOC internal communication buffer is full (Case:

Receiver is slower than sender). This error produces an IOC_E_

LOST_DATA Overlayed Error on the receiver side at the next data reception.

IOC_E_LENGTH: Al least one of the <numberOfBytesIN<x>>

exceeds either the internal buffer or is equal zero, so no data is send.

Description Performs an "explicit" sender-receiver transmission of data elements with "event" semantic for a unidirectional 1:1 communication between OS-Applications located on the same or on different cores.

This API involves a group of data elements which values are specified in parameter.

<IocId> is a unique identifier that references a unidirectional 1:1 communication involving many data elements.

The optional parameter <numberOfBytesIN<x>> specifies the size of the data to be transmitted (in bytes) for parameter <IN<x>>.

Available via Ioc.h

c(SRS_Os_80020) [SWS_Os_91004] d

Service Name IocWriteGroup_<IocId>

5

4

Reentrancy This function is generated individually for each sender. The individual function is not reentrant (if called from different runnable entities that belong to the same sender), but different functions can be called in parallel.

IN1 List of parameters with data values to be sent over a

communication identified by the <IocId>. The parameters will be passed by value for simple data elements and by reference for all other types.

Example:

Std_ReturnType IocWriteGroup_RTE_G1 (const uint32 UI_

Value1, const uint16 Value2, const uint8 Value3, const uint16 Value4);

numberOfBytesIN1 (optional) number of bytes for parameter IN1 to be send.

IN2

Return value Std_ReturnType IOC_E_OK: The data has been passed successfully to the communication service.

IOC_E_LENGTH: Al least one of the <numberOfBytesIN<x>>

exceeds either the internal buffer or is equal zero, so no data is send.

Description Performs an "explicit" sender-receiver transmission of data elements with "data" semantic for a unidirectional 1:1 communication between OS-Applications located on the same or on different cores.

This API involves a group of data elements which values are specified in parameter.

<IocId> is a unique identifier that references a unidirectional 1:1 communication involving many data elements.

The optional parameter <numberOfBytesIN<x>> specifies the size of the data to be transmitted (in bytes) for parameter <IN<x>>.

Available via Ioc.h

c()

General:

[SWS_Os_00729] dIocSendGroup/IocWriteGroup is asynchronous in that way it shall not have to wait for the reception of the data on the receiving side to return from execution.c(SRS_Os_80020)

[SWS_Os_00730] dThe IocSendGroup/IocWriteGroup function shall not return until the data given in parameter have been completely physically sent over the

com-IocSendGroup/IocWriteGroup shall return when all data have been copied in the target shared RAM.c(SRS_Os_80020)

[SWS_Os_00731] dIn case of "event" semantic, the IocSendGroup function shall guarantee the order of delivery.c(SRS_Os_80020)

[SWS_Os_00732] dThe IocSendGroup/IocWriteGroup function shall support mechanisms to guarantee data-Integrity during transmission.

TheIocSendGroup/IocWriteGroupfunction shall solve the crossing of the protec-tion boundaries of OS-Applicaprotec-tions. It has to be generated in case of intra-core and inter-core communication.c(SRS_Os_80020)

[SWS_Os_00821] dThe IocSendGroup/IocWriteGroupfunction shall be wrapped with the memory allocation keywords mechanism

1 #define OS_<IE>_START_SEC_CODE

2 #include "Os_MemMap.h"

3

4 <IocSendGroup, IocWriteGroup>

5

6 #define OS_<IE>_STOP_SEC_CODE

7 #include "Os_MemMap.h"

where <IE> is the shortName of the sending OsApplication configured in OsIoc-SendingOsApplicationRef of the respectiveOsIocCommunicationchannel.c() Parameters:

[SWS_Os_00733] dThe IN <DataN> parameters of the IocSendGroup/ IocWrite-Group function shall be passed by values for primitive data types, as pointer to the array base type for arrays and by references for all other types.c(SRS_Os_80020) [SWS_Os_00734] dFor data passed as an pointer to the array base type or by refer-ence, theIocSendGroup/IocWriteGroupfunction shall guarantee upon return that the parameter is safe for re-use.c(SRS_Os_80020)

Returned values:

[SWS_Os_00735] dTheIocSendGroup/IocWriteGroup function shall return IOC_

E_OK if the data was passed successfully to the communication service.c(SRS_Os_-80020)

[SWS_Os_00736] dIn case of "event" semantic theIocSendGroup function shall re-turn IOC_E_LIMIT if an IOC internal transmission buffer got full (Case: Receiver is slower than sender or/and configured internal IOC buffer size is too small).

If this error occurs the IOC Internal buffer could not be filled with the parameter. In that case this error produces an IOC_E_LOST_DATAOverlayed Error on the receiver side at the next data reception.c(SRS_Os_80020)

Internal structures:

[SWS_Os_00737] dIn case of "event" semantic the IOC shall configure its internal transmission buffer size with the value of the attributeOsIocBufferLength .c(SRS_-Os_80020)